Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 01-24-2005, 10:50 PM
coolegg's Avatar
coolegg coolegg is offline
 
Join Date: Nov 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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)">
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:
Reply With Quote
  #2  
Old 01-25-2005, 04:37 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

most of the info arrays (postinfo,threadinfo,foruminfo,userinfo) contains all values of the fields which are in the corresponding DB table
Reply With Quote
  #3  
Old 01-24-2006, 12:52 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #4  
Old 01-24-2006, 12:53 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep!
Reply With Quote
  #5  
Old 01-24-2006, 01:09 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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">
Reply With Quote
  #6  
Old 01-24-2006, 03:20 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, try
Code:
<if condition="$thread[forumid] == 2 && $post[postcount] == 1">
then
Reply With Quote
  #7  
Old 01-24-2006, 04:31 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work, maybe vb doesn't have a conditional to do what I want to do

I tried $postinfo[forumid] aswell
Reply With Quote
  #8  
Old 01-24-2006, 04:58 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look my post above again, there was a typing in it
Reply With Quote
  #9  
Old 01-24-2006, 05:03 PM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you have $threadinfo before?

Anyways it worked, thanks.
Reply With Quote
  #10  
Old 01-24-2006, 05:06 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome

yes, it was $threadinfo before, but that is not globalized in the postbit construction function
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04618 seconds
  • Memory Usage 2,240KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete