vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   threadid conditional - Not working the same? (https://vborg.vbsupport.ru/showthread.php?t=231350)

tintin74 03-30-2010 02:36 PM

Hello , vB Style,

I think this sintax <vb:if> </vb:if> works for vb4.0 version.

But the rest is OK!

Thank you very much! :up:

ForumsMods 03-30-2010 09:14 PM

Yes, this forums is for vB 4, hehe.

prawn_86 08-26-2012 02:31 AM

I am having the same issue. Have just upgraded to VB4 and am trying to put the following code into the ad_showthread_firstpost template:

<vb:if condition="$thread['threadid'] == 87">
<center>

<b>This thread is brought to you by:</b>
<br>
<center>
<a href="http://..../
" target="_blank">wording here
</a>
</center>
<br>
</vb:if>

Can anyone see what i am doing wrong?

Lynne 08-26-2012 02:36 AM

Is the $thread variable registered for use in that template? Try using $GLOBALS instead.

prawn_86 08-26-2012 02:43 AM

Quote:

Originally Posted by Lynne (Post 2360034)
Is the $thread variable registered for use in that template? Try using $GLOBALS instead.

Sorry Lynne i am very green at this, do i replace $thread with $GLOBALS and leave the rest?

I have tryied a few different variations on your suggestion but still cannot get it working

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

Just as a side note, putting the code into the ad_showthread_firstpost_start template works when i replace thread with global.

I still can't figure out how to get it showing between the 1st and 2nd post on each page

malmazan 12-01-2018 04:47 AM

In case I save somebody the time to do the research:

PHP Code:

<vb:if condition="$threadinfo['threadid'] > '1234'"

This worked for me on the SHOWTHREAD template out of the box. I have used for the href tag to to keep the Facebook likes on old threads after going from http to https (SSL)

For CMS articles I used:
PHP Code:

<vb:elseif condition="$vbulletin->nodeid < 123" /> 

on the facebook_likebutton template and the vbcms_content_staticpage_page template if you use static pages)


All times are GMT. The time now is 08:27 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.01233 seconds
  • Memory Usage 1,728KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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