vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   questions! (https://vborg.vbsupport.ru/showthread.php?t=229075)

pokash 11-29-2009 09:38 PM

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?

Lynne 11-29-2009 09:48 PM

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}".

pokash 11-29-2009 11:34 PM

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.

Lynne 11-30-2009 03:42 AM

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.

pokash 11-30-2009 10:51 AM

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.

Lynne 11-30-2009 01:32 PM

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.

pokash 11-30-2009 04:45 PM

<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?

Lynne 11-30-2009 05:07 PM

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.

pokash 11-30-2009 05:10 PM

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 (Post 1923105)
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?

Lynne 11-30-2009 05:23 PM

1 Attachment(s)
Quote:

Originally Posted by pokash (Post 1923108)
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:

https://vborg.vbsupport.ru/attachmen...1&d=1259608977


All times are GMT. The time now is 03:51 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.01234 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete