The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Is there a conditional I can use in postbit for the forumid?
I want to modify my postbit so that the first post of every thread in my Articles forum has a different look, because I want to give my Articles a more professional look that stands out over that of the comments/replies that will follow and other posts on the site.
I have half the conditional... $post[postcount]==1 ...to identify it as the first post of the thread But how would I test if the post is in the forum with id number 3 (my particular Articles forum id)? By trial and error I have tried... $post[forum]==3 $post[forumid]==3 $post[forum_id]==3 ... so far, with no luck. And as an aside... is there a list of the vB variables and what they mean? ie $post[post] means .... $post[usertitle] means ... $post[rank] means .... and so on. Edit: I perhaps should have said... I am using vB3 Edit again: I'll answer my own question since I stumbled across the answer by good ole trial and error. The complete conditional is: Code:
<if condition="($forum[forumid]==3)&&($post[postcount]==1)"> |
#2
|
||||
|
||||
most of the info arrays (postinfo,threadinfo,foruminfo,userinfo) contains all values of the fields which are in the corresponding DB table
|
#3
|
|||
|
|||
Sorry to bring up an old thread (proves I use search though).
How would I write it so I can check if the forumid is 2? <if condition="$foruminfo[forumid] == 2">Text here</if> |
#4
|
||||
|
||||
yep!
|
#5
|
|||
|
|||
It doesn't work.
I'm editing the postbit template (I know I'm using postbit and not postbit_legacy) I have a forum where request go into and on the first post (their request) I put two links. And this conditional doesn't work <if condition="$foruminfo[forumid] == 2 && $post[postcount] == 1"> |
#6
|
||||
|
||||
hmm, try
Code:
<if condition="$thread[forumid] == 2 && $post[postcount] == 1"> |
#7
|
|||
|
|||
Doesn't work, maybe vb doesn't have a conditional to do what I want to do
I tried $postinfo[forumid] aswell |
#8
|
||||
|
||||
look my post above again, there was a typing in it
|
#9
|
|||
|
|||
Did you have $threadinfo before?
Anyways it worked, thanks. |
#10
|
||||
|
||||
you're welcome
yes, it was $threadinfo before, but that is not globalized in the postbit construction function |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|