The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
![]()
wow
That's some great thinking there! Thanks, man! |
#12
|
||||
|
||||
![]()
A (maybe) easier approach:
In template phpinclude_start add PHP Code:
FIND Code:
<if condition="$post['userid']"> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> </if> Code:
<if condition="$post['userid'] AND $post['userid'] != $bbuserinfo['userid']"> <if condition="!in_array($post['userid'], $GLOBALS['buddyarray'])"> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> <else /> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=removelist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[remove_x_from_buddy_list]</phrase></a></td></tr> </if> </if> The advantage over tmhalls suggestion is that this does require less processing (explode() is only executed once), and you don't have to modify the php files. |
#13
|
||||
|
||||
![]() Quote:
Kirby, you can do explode in the phpinclude_start template? I tried it in the postbit but it said explode wasn't allowed to be used in templates. I didn't know phpinclude_start existed. :nervous: |
#14
|
||||
|
||||
![]()
Yes you can.
In normal Templates you can use only a few functions. But phpinclude_start is a special template where you can place PHP - only PHP. The code there will be executed by global.php |
#15
|
||||
|
||||
![]()
Well I'll be damned. That's good to know, thanks.
![]() Yep, that works like a charm. Thanks again, Kirby. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|