تبلیغات در اینترنت

تبلیغات در اینترنتگیفت کارت گوگل پلی
نمایش نتایج: از 1 به 6 از 6

موضوع: درخواست یک تاپیک از vBulletin.org

  1. Top | #1
    کاربر ویژه

    تاریخ عضویت
    May 2011
    ورژن ویبولتین
    4.1.2
    نوشته ها
    119
    مورد پسند
    99 بار
    اطلاعات
    Windows 7/Server 2008 R2 Chrome 21.0.1180.75
    میزان امتیاز
    19

    پیش فرض درخواست یک تاپیک از vBulletin.org

    سلام . دوستان عزیزی که لایسنس دارن ممنون میشم این صفحه رو برای ما قرار بدن :

    First Look at vBulletin 4 Template Tags - vBulletin.org Forum

    گویا condition ها در vb4 تغییر کرده و این صفحه توضیح داده.

    تشکر

    کاربر مقابل از NOjAN بابت این پست مفید تشکر کرده است:

    Any way the wind blows.. Doesn't Really Matter




  2. گیفت کارت آیتونز

  3. Top | #2
    کاربر سایت

    تاریخ عضویت
    Jun 2012
    ورژن ویبولتین
    2.4.0
    نوشته ها
    90
    مورد پسند
    35 بار
    اطلاعات
    Windows 7/Server 2008 R2 Chrome 21.0.1180.77
    میزان امتیاز
    14

    پیش فرض

    First Look at vBulletin 4 Template Tags
    Wayne Luke
    vB.com Team

    Join Date: Jan 2002
    Posts: 1,680
    Southern California



    by Wayne Luke 01 Jul 2009
    Rating: (28 votes - 4.79 average)

    Reposted from my site at www.vbcodex.com

    Following my previous article, I want to give some information about the new template tags in vBulletin 4. The use of template tags is not a new concept to vBulletin 4 developers and designers. We have been using them for years for conditional statements and building phrases that had parameters.

    In vBulletin 4, Phrase parsing has been moved to the variable parsing system but conditional usage has been improved and several new tags have been added to make things easier. Like the variable system I talked about earlier, tags are in their own namespace so all tags are prefixed with 'vb:'. This actually provides several benefits but the primary one is that you can program scriptable web editors like Dreamweaver or Expressions Web to parse these conditionals and provide output based on values you provide. They also allow proper syntax highlighting to occur in most web editors.

    Template Conditionals

    Everyone who has worked with vBulletin templates in the past should be familiar with template conditionals. They provide a wide range of use in determining what information to show depending on various conditions. In vBulletin 3.X, the IF conditional was simple and easy to use. In fact, you can still use pretty much the same format in vBulletin 4. However a couple of new tags were added to make conditionals more robust.

    Here is an example:
    HTML Code:

    <vb:if condition="$show['guest']"> <div class="alert">You are a guest, no soup for you.</div><vb:elseif condition="$is_member_of($bbuserinfo,6)" /> <div class="adminalert">Hello {vb:raw bbuserinfo.musername}! Let's get to work.</div><vb:else /> <div class="useralert">Welcome Back {vb:raw bbuserinfo.musername}!</div></vb:if>

    The new thing here is the <vb:elseif /> tag. It allows you to branch your conditions better and reduce the number of nested conditions you may need to make.

    Conditionals also have a new shorthand using a curly brace syntax. In today's templates, you see a lot of code that looks like this:
    HTML Code:

    <a href="somepage.php<if condition="$album['albumid']">album=$album[albumid]<else />group=$group[groupid]</if>">link text</a>

    That is a brief example but makes a real mess of syntax highlighting and can't even be validated. With the new shortform notation it would look like this:
    HTML Code:

    <a href="somepage.php{vb:if $album['albumid'] : album=$album[albumid] ? group=$group[groupid]}">link text</a>

    As you can see the second examples looks a lot cleaner and maintains syntax highlighting.


    Each
    For a long time, users have wanted a way to do loops in templates. Heck, I have wanted to be able to do loops in templates. vBulletin 4.0 includes the <vb:each> tag which accomplishes just that. While it is not being used for the default templates at this time, it will probably be used in the future to eliminate some of the many 'bit' templates in the system. The Each tag will allow you to easily process an array and apply formatting to its elements.

    Example:
    HTML Code:

    Welcome this week's new users: <ul><vb:each from="newusers" key="userid" value="newuserinfo"> <li><a href="member.php?u={vb:var userid}">{vb:var newuserinfo.username}</a></li></vb:each></ul>

    If the array looked like:
    PHP Code:
    $newusers = array(
    1 => array('username' => 'Adam', 'email' => [email protected]'),
    2 => array('username' => 'Ben', 'email' => [email protected]'),
    3 => array('username' => 'Chris', 'email' => [email protected]')
    );


    The output could look like:
    Code:

    Welcome this week's new users: Adam Ben Chris


    Comment

    How many times have you wanted to leave commented notes in a template so you can understand why you did what you did? Or you work on a team so others need to know what is being done in a template? Before now, you would have had to use HTML comments that would have been output to the Browser and visible in the page's source code. vBulletin 4.0 introduces the comment tag so you can add your comments and not worry about them being sent to the client. Comments will be stripped when the template is compiled into PHP. Can also be used for hiding code blocks from being output to the user.

    Example:
    HTML Code:

    <vb:comment>This is a comment and won't be shown in page source code.</vb:comment>


    Literals

    The final new tag is the literal tag. It allows you to stop the parsing of any nested tags or variable syntax within the tags. It works similar to the noparse BB Code. It is handy when you want the template to simply output the raw HTML instead of putting it through the template parser.

    Example:
    HTML Code:

    <vb:literal>This will output exactly like this {vb:raw somevariable}</vb:literal>


    Summary

    While the changes to tags are not as extensive as variable handling, the new tags provide new ways of handling templates and will provide better abilities to create addon products in the future. The Each and Comment tags will come in especially handy while doing customizations in the future. I hope this gives you another good glimpse into the vBulletin 4.0 template system.

    سلام بفرمایید
    حالا ماجراش چی هست؟

    کاربر مقابل از Bihamta بابت این پست مفید تشکر کرده است:


  4. Top | #3
    مدیر بخش

    تاریخ عضویت
    Apr 2011
    ورژن ویبولتین
    4.2
    سن
    30
    نوشته ها
    4,743
    مورد پسند
    6,904 بار
    نوشته های وبلاگ
    1
    اطلاعات
    Windows 7/Server 2008 R2 Chrome 22.0.1207.1
    میزان امتیاز
    621

    پیش فرض

    نقل قول نوشته اصلی توسط bita1500 نمایش پست ها
    First Look at vBulletin 4 Template Tags
    Wayne Luke
    vB.com Team

    Join Date: Jan 2002
    Posts: 1,680
    Southern California



    by Wayne Luke 01 Jul 2009
    Rating: (28 votes - 4.79 average)

    Reposted from my site at www.vbcodex.com

    Following my previous article, I want to give some information about the new template tags in vBulletin 4. The use of template tags is not a new concept to vBulletin 4 developers and designers. We have been using them for years for conditional statements and building phrases that had parameters.

    In vBulletin 4, Phrase parsing has been moved to the variable parsing system but conditional usage has been improved and several new tags have been added to make things easier. Like the variable system I talked about earlier, tags are in their own namespace so all tags are prefixed with 'vb:'. This actually provides several benefits but the primary one is that you can program scriptable web editors like Dreamweaver or Expressions Web to parse these conditionals and provide output based on values you provide. They also allow proper syntax highlighting to occur in most web editors.

    Template Conditionals

    Everyone who has worked with vBulletin templates in the past should be familiar with template conditionals. They provide a wide range of use in determining what information to show depending on various conditions. In vBulletin 3.X, the IF conditional was simple and easy to use. In fact, you can still use pretty much the same format in vBulletin 4. However a couple of new tags were added to make conditionals more robust.

    Here is an example:
    HTML Code:

    <vb:if condition="$show['guest']"> <div class="alert">You are a guest, no soup for you.</div><vb:elseif condition="$is_member_of($bbuserinfo,6)" /> <div class="adminalert">Hello {vb:raw bbuserinfo.musername}! Let's get to work.</div><vb:else /> <div class="useralert">Welcome Back {vb:raw bbuserinfo.musername}!</div></vb:if>

    The new thing here is the <vb:elseif /> tag. It allows you to branch your conditions better and reduce the number of nested conditions you may need to make.

    Conditionals also have a new shorthand using a curly brace syntax. In today's templates, you see a lot of code that looks like this:
    HTML Code:

    <a href="somepage.php<if condition="$album['albumid']">album=$album[albumid]<else />group=$group[groupid]</if>">link text</a>

    That is a brief example but makes a real mess of syntax highlighting and can't even be validated. With the new shortform notation it would look like this:
    HTML Code:

    <a href="somepage.php{vb:if $album['albumid'] : album=$album[albumid] ? group=$group[groupid]}">link text</a>

    As you can see the second examples looks a lot cleaner and maintains syntax highlighting.


    Each
    For a long time, users have wanted a way to do loops in templates. Heck, I have wanted to be able to do loops in templates. vBulletin 4.0 includes the <vb:each> tag which accomplishes just that. While it is not being used for the default templates at this time, it will probably be used in the future to eliminate some of the many 'bit' templates in the system. The Each tag will allow you to easily process an array and apply formatting to its elements.

    Example:
    HTML Code:

    Welcome this week's new users: <ul><vb:each from="newusers" key="userid" value="newuserinfo"> <li><a href="member.php?u={vb:var userid}">{vb:var newuserinfo.username}</a></li></vb:each></ul>

    If the array looked like:
    PHP Code:
    $newusers = array(
    1 => array('username' => 'Adam', 'email' => [email protected]'),
    2 => array('username' => 'Ben', 'email' => [email protected]'),
    3 => array('username' => 'Chris', 'email' => [email protected]')
    );


    The output could look like:
    Code:

    Welcome this week's new users: Adam Ben Chris


    Comment

    How many times have you wanted to leave commented notes in a template so you can understand why you did what you did? Or you work on a team so others need to know what is being done in a template? Before now, you would have had to use HTML comments that would have been output to the Browser and visible in the page's source code. vBulletin 4.0 introduces the comment tag so you can add your comments and not worry about them being sent to the client. Comments will be stripped when the template is compiled into PHP. Can also be used for hiding code blocks from being output to the user.

    Example:
    HTML Code:

    <vb:comment>This is a comment and won't be shown in page source code.</vb:comment>


    Literals

    The final new tag is the literal tag. It allows you to stop the parsing of any nested tags or variable syntax within the tags. It works similar to the noparse BB Code. It is handy when you want the template to simply output the raw HTML instead of putting it through the template parser.

    Example:
    HTML Code:

    <vb:literal>This will output exactly like this {vb:raw somevariable}</vb:literal>


    Summary

    While the changes to tags are not as extensive as variable handling, the new tags provide new ways of handling templates and will provide better abilities to create addon products in the future. The Each and Comment tags will come in especially handy while doing customizations in the future. I hope this gives you another good glimpse into the vBulletin 4.0 template system.

    سلام بفرمایید
    حالا ماجراش چی هست؟
    2.9 تمامی کدها ، خطاها و ارورها باید در تگ های PHP , CODE و یا HTML قرار گیرند.

    2 تشکر توسط:


  5. Top | #4
    کاربر سایت

    تاریخ عضویت
    Jun 2012
    ورژن ویبولتین
    2.4.0
    نوشته ها
    90
    مورد پسند
    35 بار
    اطلاعات
    Windows 7/Server 2008 R2 Chrome 21.0.1180.77
    میزان امتیاز
    14

    پیش فرض

    2.9 تمامی کدها ، خطاها و ارورها باید در تگ های PHP , CODE و یا HTML قرار گیرند.
    این رو که فرمودید با بنده بودید؟
    منظورتون رو متوجه نشدم ببخشید ها

  6. Top | #5
    مدیر بازنشته

    تاریخ عضویت
    Feb 2011
    ورژن ویبولتین
    ☻Google
    نوشته ها
    5,116
    مورد پسند
    3,085 بار
    نوشته های وبلاگ
    4
    اطلاعات
    Windows 7/Server 2008 R2 Firefox 14.0.1
    میزان امتیاز
    601

    پیش فرض

    Reposted from my site at www.vbcodex.com

    Following my previous article, I want to give some information about the new template tags in vBulletin 4. The use of template tags is not a new concept to vBulletin 4 developers and designers. We have been using them for years for conditional statements and building phrases that had parameters.

    In vBulletin 4, Phrase parsing has been moved to the variable parsing system but conditional usage has been improved and several new tags have been added to make things easier. Like the variable system I talked about earlier, tags are in their own namespace so all tags are prefixed with 'vb:'. This actually provides several benefits but the primary one is that you can program scriptable web editors like Dreamweaver or Expressions Web to parse these conditionals and provide output based on values you provide. They also allow proper syntax highlighting to occur in most web editors.

    Template Conditionals

    Everyone who has worked with vBulletin templates in the past should be familiar with template conditionals. They provide a wide range of use in determining what information to show depending on various conditions. In vBulletin 3.X, the IF conditional was simple and easy to use. In fact, you can still use pretty much the same format in vBulletin 4. However a couple of new tags were added to make conditionals more robust.

    Here is an example:

    کد:
    <vb:if condition="$show['guest']"> <div class="alert">You are a guest, no soup for you.</div> <vb:elseif condition="$is_member_of($bbuserinfo,6)" /> <div class="adminalert">Hello {vb:raw bbuserinfo.musername}! Let's get to work.</div> <vb:else /> <div class="useralert">Welcome Back {vb:raw bbuserinfo.musername}!</div> </vb:if>

    The new thing here is the <vb:elseif /> tag. It allows you to branch your conditions better and reduce the number of nested conditions you may need to make.

    Conditionals also have a new shorthand using a curly brace syntax. In today's templates, you see a lot of code that looks like this:

    کد:
    <a href="somepage.php<if condition="$album['albumid']">album=$album[albumid]<else />group=$group[groupid]</if>">link text</a>



    That is a brief example but makes a real mess of syntax highlighting and can't even be validated. With the new shortform notation it would look like this:

    کد:
    <a href="somepage.php{vb:if $album['albumid'] : album=$album[albumid] ? group=$group[groupid]}">link text</a>



    As you can see the second examples looks a lot cleaner and maintains syntax highlighting.


    Each
    For a long time, users have wanted a way to do loops in templates. Heck, I have wanted to be able to do loops in templates. vBulletin 4.0 includes the <vb:each> tag which accomplishes just that. While it is not being used for the default templates at this time, it will probably be used in the future to eliminate some of the many 'bit' templates in the system. The Each tag will allow you to easily process an array and apply formatting to its elements

    کد:
    Welcome this week's new users: <ul> <vb:each from="newusers" key="userid" value="newuserinfo"> <li><a href="member.php?u={vb:var userid}">{vb:var newuserinfo.username}</a></li> </vb:each></ul>



    If the array looked like:

    کد PHP:
     $newusers = array(
        
    => array('username' => 'Adam''email' => [email protected]'),
        
    => array('username' => 'Ben''email' => [email protected]'),
        
    => array('username' => 'Chris''email' => [email protected]')
      ); 

    The output could look like:

    کد HTML:
    Welcome this week's new users: Adam Ben Chris

    Comment
    How many times have you wanted to leave commented notes in a template so you can understand why you did what you did? Or you work on a team so others need to know what is being done in a template? Before now, you would have had to use HTML comments that would have been output to the Browser and visible in the page's source code. vBulletin 4.0 introduces the comment tag so you can add your comments and not worry about them being sent to the client. Comments will be stripped when the template is compiled into PHP. Can also be used for hiding code blocks from being output to the user.


    کد HTML:
    <vb:comment>This is a comment and won't be shown in page source code.</vb:comment>

    Literals
    The final new tag is the literal tag. It allows you to stop the parsing of any nested tags or variable syntax within the tags. It works similar to the noparse BB Code. It is handy when you want the template to simply output the raw HTML instead of putting it through the template parser.
    Example:
    کد:
    <vb:literal>This will output exactly like this {vb:raw somevariable}</vb:literal>


    Summary
    While the changes to tags are not as extensive as variable handling, the new tags provide new ways of handling templates and will provide better abilities to create addon products in the future. The Each and Comment tags will come in especially handy while doing customizations in the future. I hope this gives you another good glimpse into the vBulletin 4.0 template system.

    2 تشکر توسط:


  7. Top | #6
    مدیر بخش

    تاریخ عضویت
    Apr 2011
    ورژن ویبولتین
    4.2
    سن
    30
    نوشته ها
    4,743
    مورد پسند
    6,904 بار
    نوشته های وبلاگ
    1
    اطلاعات
    Windows 7/Server 2008 R2 Chrome 22.0.1207.1
    میزان امتیاز
    621

    پیش فرض

    نقل قول نوشته اصلی توسط bita1500 نمایش پست ها
    این رو که فرمودید با بنده بودید؟
    منظورتون رو متوجه نشدم ببخشید ها
    پست overlord رو نگاه کنید متوجه میشید !
    بسته شد

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. پاسخ: 10
    آخرين نوشته: 2012/12/09, 05:34 PM
  2. درخواست اموزش ست کردن تالار vBulletin به نیوک
    توسط n95n95n95 در انجمن درخواست هک و پلاگین
    پاسخ: 11
    آخرين نوشته: 2012/08/09, 08:29 PM
  3. درخواست ضمیمه و کدهای این تاپیک ار vbulletin.org
    توسط Mr.Pedram در انجمن درخواست از vBulletin.org
    پاسخ: 5
    آخرين نوشته: 2012/02/29, 12:41 AM
  4. :.:.:مشکلات شما در رابطه با سیستم Vbulletin فقط در این تاپیک :.:.:
    توسط [email protected] در انجمن پرسش و پاسخ
    پاسخ: 15
    آخرين نوشته: 2009/09/28, 08:55 PM

کلمات کلیدی این موضوع

علاقه مندی ها (Bookmarks)

علاقه مندی ها (Bookmarks)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •