Log in

View Full Version : Is there a conditional I can use in postbit for the forumid?


coolegg
01-24-2005, 10:50 PM
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:<if condition="($forum[forumid]==3)&&($post[postcount]==1)">Is there a legend/list of these variables and what they mean? $forum[X], $post[X] and so on? trial and error is fun but time-intensive. :ermm:

Xenon
01-25-2005, 04:37 PM
most of the info arrays (postinfo,threadinfo,foruminfo,userinfo) contains all values of the fields which are in the corresponding DB table :)

harmor19
01-24-2006, 12:52 PM
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>

Xenon
01-24-2006, 12:53 PM
yep!

harmor19
01-24-2006, 01:09 PM
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">

Xenon
01-24-2006, 03:20 PM
hmm, try <if condition="$thread[forumid] == 2 && $post[postcount] == 1">then

harmor19
01-24-2006, 04:31 PM
Doesn't work, maybe vb doesn't have a conditional to do what I want to do

I tried $postinfo[forumid] aswell

Xenon
01-24-2006, 04:58 PM
look my post above again, there was a typing in it :)

harmor19
01-24-2006, 05:03 PM
Did you have $threadinfo before?

Anyways it worked, thanks.

Xenon
01-24-2006, 05:06 PM
you're welcome

yes, it was $threadinfo before, but that is not globalized in the postbit construction function ;)