The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Trying to write an if statement to toss into postbit templates using these criteria:
If: forum ID=3 AND post#=1 insert a custom html code end If statement thnx |
|
#2
|
||||
|
||||
|
<if condition="$thread[forumid] == 3 AND $post['postcount'] == 1>
Custom HTML Code </if> You just have to make sure those elements are available in the template you are editing, which I guess is the postbit so should be OK. If it doesn't work try taking the single quotes out. Edited per borbole's suggestion. |
|
#3
|
||||
|
||||
|
Quote:
HTML Code:
$forum[forumid]
|
|
#4
|
||||
|
||||
|
You see that's what I thought but when I saw the quotes around 'postcount' I confused myself and changed it.
|
|
#5
|
|||
|
|||
|
thnx for the help :-) I was using && instead of AND and 'forumid' too ... lol. I'll try this out when I get home. ps- Is there a way to check for a certain tag in an if statement? lets say a thread has the tags "youtube, multimedia, kung fu bear, level4" ... is there some way to write an if statement such as:
if (youtube tag is present) |
|
#6
|
||||
|
||||
|
Those single quotes should be there in an if statement.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|