The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I currently have modified the postbit to get some information out of some userfields that only administrators can edit:
<if condition="$post['field5']"><div class="smallfont">yada yada: <a href = "../whatever/index.php?q= $post[field5]">whatever</a></div></if> Works great, no problems. But I recently added a couple values in the field separated by semi-colons, how do I get a list out of the field? for ($i=0; $i <$post['field5']; $i++) { <if condition="$post['field5']"><div class="smallfont">yada yada: <a href = "../whatever/index.php?q=$post[field5]">whatever</a></div></if> } I know the above is wrong, I just wanted to get a general idea of what I want across. Thanks in advance. |
#2
|
||||
|
||||
![]()
Given you can't use loops in vBulletin templates (although it's an asset considered by many other templating systems), you'll have to do this through the PHP file and using an extra template:
PHP Code:
Code:
<div class="smallfont"> yada yada: <a href = "../whatever/index.php?q=$post[field5]">whatever</a> </div> |
#3
|
|||
|
|||
![]()
I added a new template and named it "postbit_field5" and added the template code.
Where do I modify the php code? In showthread.php? thanks again |
#4
|
||||
|
||||
![]()
Probably not in showthread.php, but /includes/functions_showthread.php.
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|