Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 11-29-2009, 09:38 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't had any succes with this. Is this the right code to use:

<if condition="$forum[forumid] == 3">
stuff
</if>

And when
Where in the showthread template should I add this code to have it under the navbar?
Reply With Quote
  #12  
Old 11-29-2009, 09:48 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try $thread[forumid] (or even $threadinfo[forumid]) which was the other variable I suggested (I have a feeling $forum may not be registered)? If you want it right under the navbar, then I'd put it right under where it says "{vb:raw navbar}".
Reply With Quote
  #13  
Old 11-29-2009, 11:34 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Both of those don't seem to be working either. Could you give an example of what the code might look like?

I have tried many different things with this code already and I'm having no succes of any content showing above the forums.

How do I know what id a certain forum is? Is it the display order? or the name? or something else?

Also I keep getting this error:

The following error occurred when attempting to evaluate this template:

The conditional on line 84 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Reply With Quote
  #14  
Old 11-30-2009, 03:42 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ack! I missed that this was in the vb4 section.

HTML Code:
<vb:if condition="$thread[forumid] == xx">
stuff
</vb:if>
Try that (or $threadinfo[forumid]). You would get the forumid from the forum manager. Seelct a forum to edit, and on the top it will say something like "Forum: Main Category (id: 1)". In that case, it is forumid 1.
Reply With Quote
  #15  
Old 11-30-2009, 10:51 AM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tried many different settings position templates but I never see any content. Also when I go to the ad manager and give the condition of a specific forum it doesn't show anything either.
Reply With Quote
  #16  
Old 11-30-2009, 01:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you making changes to the correct style? Try not using a condition and just put HELLO in there. Add the condition after you verify that you are actually modifying the templates correctly.
Reply With Quote
  #17  
Old 11-30-2009, 04:45 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<vb:if condition="hello">
stuff
</vb:if>

If I put this in the adtemplate I can see the content. But when I put in the showthread template wherever I put I don't see anything.

When I do put an condition in the ad template I again get nothing. Like this:
<vb:if condition="$thread[forumid] == 3">
stuff
</vb:if>

Even if I just put a div with content on the showthread template I see nothing.

So maybe I should continue with the ad template?
Reply With Quote
  #18  
Old 11-30-2009, 05:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then try $threadinfo['forumid']. Is there a forum with the id of 3? Which ad template are you using? Check to see if the variable $thread is even registered for use in it. If not, then you need to either preregister it or just use the showthread template.
Reply With Quote
  #19  
Old 11-30-2009, 05:10 PM
pokash pokash is offline
 
Join Date: May 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If in the advertising I put in the condition: Show If user is browsing forum: ''. Then nothing shows at all either.

--------------- Added [DATE]1259608411[/DATE] at [TIME]1259608411[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
Then try $threadinfo['forumid']. Is there a forum with the id of 3? Which ad template are you using? Check to see if the variable $thread is even registered for use in it. If not, then you need to either preregister it or just use the showthread template.

I have tried all variations. Yes there is a forum with id 3 and I have tried many other as well. And like I said in the showthread template I can't get any content to show at all.


How do I register the variable $thread?
Reply With Quote
  #20  
Old 11-30-2009, 05:23 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pokash View Post
And like I said in the showthread template I can't get any content to show at all.
Then you are doing something wrong. I just tested this by adding these lines below the navbar in the SHOWTHREAD template:
HTML Code:
<vb:if condition="$threadinfo['forumid'] == 2">
<div>stuff</div>
</vb:if>
And I got this in showthread.php in forumid 2:

Attached Images
File Type: png Picture 1.png (14.6 KB, 0 views)
Reply With Quote
Reply


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 02:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05350 seconds
  • Memory Usage 2,275KB
  • Queries Executed 12 (?)
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_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete