vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

ozzy47 12-21-2014 10:08 PM

Try $GLOBALS['forumid'] instead of $forum[forumid].

tommyxv 12-21-2014 10:13 PM

You da man ozzy! Worked perfectly! Thanks!

ozzy47 12-21-2014 10:15 PM

Excellent, glad to hear. :)

HM666 02-20-2015 03:39 PM

I have a conditionals question. I need to use two else statements within one area like this:

Code:

<vb:if condition="$GLOBALS['forumid'] == 2"><h1>This is my header</h1></vb:else>
<vb:if condition="$GLOBALS['forumid'] == 3"><h1>This is my other possible header</h1></vb:else><h1>{vb:rawphrase post_new_thread}</h1></vb:if>

Obviously its wrong, but how do I only have a particular title in only one forum and another different title in just one other forum and then have the standard vb headers for all the rest using conditionals? Or am I'm doomed to have to figure out a plugin for this little feat? Any help would be great, thanks.

kh99 02-20-2015 06:38 PM

I think this should work:

Code:

<vb:if condition="$GLOBALS['forumid'] == 2"><h1>This is my header</h1>
<vb:elseif condition="$GLOBALS['forumid'] == 3" /><h1>This is my other possible header</h1><vb:else /><h1>{vb:rawphrase post_new_thread}</h1></vb:if>

For future reference, here's the manual page: http://www.vbulletin.com/docs/html/m...e_conditionals

HM666 02-20-2015 09:10 PM

Thanks Kevin that worked! :)

inigo 03-11-2015 06:22 AM

Thanks for the help you provide in this post. I am looking for one conditional I haven't found in this topic.

The idea is to have a conditional in the blogs, showing a content only if it is one blog.

<vb if condition="blog user id = 3954">show this<vb if/>

But i don't know the variable to use in: "blog user id = 3954"

I want to put this in the sidebar to show special logo for the blog of each user.

Any help would be great!!!

Thanks,

HM666 03-29-2015 08:52 AM

I'm re-coding my forum leaders page and I need a conditional to call the avatar & username of a staff member. How do I go about doing this exactly? I'm creating 3 columns and putting a user in each column coding it myself in the template but I want the ability for the avatars & usernames to change automatically if the staff member changes it in their profile. This is a custom coded page so I'm not planning on using the default vB 4 group id codes that are found in the showgroups template.

Mecho 04-28-2015 12:23 PM

we have a section with 3 different Prefix - so they have a SAME forum ID but different prefix.

is it possible to have one message to ALL posts in that forum but only with one specific of those 3 prefixes ???

Thanks

m2006 09-23-2015 06:45 AM

hi i need show only by ['threadid']


All times are GMT. The time now is 06:58 PM.

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.01607 seconds
  • Memory Usage 1,734KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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