Announcement

Collapse
No announcement yet.

How do i link templates with functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do i link templates with functions

    for example, $userinfo[onlinestatus] takes you to the postbit_onlinestatus template, which contains the following code:

    Code:
    <if condition="$onlinestatus==0"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/user_offline.gif" alt="<phrase 1="$user[username]">$vbphrase[x_is_offline]</phrase>" border="0" /></if>
    <if condition="$onlinestatus==1"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/user_online.gif" alt="<phrase 1="$user[username]">$vbphrase[x_is_online_now]</phrase>" border="0" /></if>
    <if condition="$onlinestatus==2"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/user_invisible.gif" alt="<phrase 1="$user[username]">$vbphrase[x_is_invisible]</phrase>" border="0" /></if>
    Now, firstly, how would i make a new template, and for example i called it buttons_ban how would i link it with a function to use in other scripts?

    I.E: $userinfo[banbutton]

    I am very new to the web programming feel and if you understand what i am trying to say, please make it clearer for others, if it is unclear. Thanks

  • #2
    Those templates and variables are evaluated in the PHP code. There are some guides on www.vbulletin.org that show how to create a vBulletin-integrated page. Those guides cover basic things like calling templates.

    Comment

    Loading...
    Working...
    X