Hi,
I want to show an add in a specific forum, BUT I don't want it to show in the "SHOWTHREAD" under that specific forum. This is what I got: Code:
<vb:if condition="$vbulletin->GPC['forumid'] == 37"> |
If you just want it to show in POSTS within a specific forum try:
Code:
<vb:if condition="$post['forumid'] == 37"> |
Thank!
But with that code it doesn't show at all. I want it to show on this page: http://support.elot.se/forum/hide-lite/ But not on this one: http://support.elot.se/forum/hide-li...ng-av-led.html What do you think? |
My bad, you said DON'T show it in SHOWTHREAD, I mis-read the question.
Try one of these... Code:
<vb:if condition="$forum['forumid'] == 37"> Code:
<vb:if condition="$foruminfo['forumid'] == 37"> |
I'm very greatful for your kind help. But these didn't work either. It doesn't show.
Any other suggestions? ;-) |
Hmmm...
OK I just tested this in the template ad_navbar_below and it's working for me: Code:
<vb:if condition="$GLOBALS['forumid'] == 37 AND THIS_SCRIPT=='forumdisplay'"> |
YES!!! There it was! Great! Thanks! :-)
|
Quote:
;) eyvallah |
I tried this code, but for some reason it does not work
<vb:if condition="$forum[forumid] == 42"> <center><a href="WEB LINK"><img src="IMAGE LINK" alt="Our Secure Shopping Cart" /> </a></center> </vb:if> |
Quote:
Depending on the template there are different variables besides $forum[forumid], such as: Code:
$foruminfo['forumid'] |
It was posted in forumdisplay
Thanks |
Hello all. Firstly thanks for the list. It 'should' help me with what I'd like to do... but I need to ask for a bit of help here.
I'm trying to show the "Style Chooser" in the footer to ONLY certain user groups. I just can't figure where to place the code in the footer. Below is the portion of the footer code I think I should be working with: Code:
<vb:if condition="$show['quickchooser']"> Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if> Thanx |
Since there's already a conditional, you should just add it to the existing conditional using an "AND" :
Code:
<vb:if condition="$show['quickchooser'] AND is_member_of($bbuserinfo, 1,2,3)"> You understand however any user could still change their style via their User CP options whether or not the quick-chooser is actually shown on every page. |
Quote:
I did however figure another way around this. I set the option to change styles to yes, but only have the main theme I want the members to see selected in the "Style Manager." Seems I, as the admin, can see the other themes, but the regular members cannot. |
That's true, the way to keep users from selecting styles is to uncheck them in the style manager. Only admins will have access to all styles (including unchecked styles.
|
What is Conditional tag for post count!
If (post count XXX) do this 1 else this 2? |
Quote:
Code:
<vb:if condition="$post['posts'] >= XXX"> Code:
<vb:if condition="$bbuserinfo['posts'] >= XXX"> |
actually, that usually will not work if the post count is over 1000 since it is a formatted number, ie. 1,000
|
Quote:
On the plus side, usually when you're testing for post counts is some minimal number, 5, or 10, or even 100 which shouldn't be affected. |
Quote:
|
Thank you both :)
The second is ok in my case! The number of post is under 1000 so is ok also on vb4! :) |
Quote:
|
I am trying to find the new conditions for VB4.
Old condistion: Code:
<if condition="$today_is_wednesday">Test</if> Code:
<vb:if condition="$today_is_wednesday">Test</vb:if> |
Try:
Code:
<vb:if condition="gmdate('D') == 'Wed' "> |
Quote:
I tried putting the following conditions that you recommended in this code for a widget and even when it is not Wednesday it still displays. Any ideas or help would be appreciated. Code:
<vb:if condition="gmdate('D') == 'Wed' "> |
This is the exact code I have working right now on my test forum:
Code:
<vb:if condition="gmdate('D') == 'Sat' "> I have this working in my Navbar template. I've never used widgets, do template conditionals work in them at all? I did notice a limitation, gmdate returns Greenwich Mean Time, so it works when it's Wednesday in Greenwich, England. http://us.php.net/manual/en/function.gmdate.php Unfortunately vBulletin doesn't seem to allow the regular date() function which returns the local date, so this may not work well for you anyway. FYI- Your code pasted into my navbar works fine. |
is it possible to use a conditional to check whether you're viewing ONLY the very front page (CMS)?
e.g. I'd like to add a link in the footer of just the CMS's front page - but not on any other pages, not show if they're reading an article, not show if they're using forum or blogs, etc. etc. - just the front page and only the front page. |
Quote:
HTML Code:
<vb:if condition="THIS_SCRIPT == 'vbcms'">Show this</vb:if> |
Thanks HM, but that shows when reading articles too... I need the code to only show on the front page alone - not articles/comments... If you have any ideas on narrowing it down, that would be most appreciated :)
|
I'm not sure that's possible since the articles/comments run off of that same script....
|
One more thing...
how to do a OR condition. <vb:if condition="$xxx" OR condition="$yyy" > With OR and || is not working... |
Quote:
Code:
<vb:if condition="($x == $y) OR ($x == $z)"> |
|
I want to restrict some custom BBcodes to only certain usergroups (moderators and higher).
I tried to wrap BBcode inside this statment, but it doesn't work: Code:
<vb:if condition="$post['usergroupid'] == 6"> |
Conditionals like these (Template Conditionals) only work in templates, they don't work in BB Codes.
There is a mod, "Advanced BB Code Manager" that is for an older version of vBulletin but still works on the latest 4.x it has been reported. Only way of doing this without writing your own mod. |
Thank you. It would be good if someone makes new mod for managing BBcode. Hopefully someone would...
|
Is there a condition for all pages/content with a certain section of the cms?
|
Some more conditions you can add to your list:
Show only if vBulletin notices are not shown Code:
<vb:if condition="!$show['notices']"> Code:
<vb:if condition="$GLOBALS[forumid] == X"> But I have one question. Is there a condition to show something only in the second post of each thread and page? Something like "isfirstshown" just for the second post? |
There's no condition specifically for 2nd posts but if you set your forum to a set number of posts per page you could make a condition like:
Code:
<vb:if condition="$post[postcount] == 2 OR $post[postcount] == 12 OR$post[postcount] == 22 OR $post[postcount] == 32 OR $post[postcount] == 42 OR $post[postcount] == 52 OR $post[postcount] == 62"> Otherwise I'd imagine a plugin could be written to keep count and be true only for 2nd posts. |
how is conditional syntax for the thread that has been closed?
example: <vb:if condition="closed thread???"> show message cause thread that has been closed </vb:if> |
All times are GMT. The time now is 07:07 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|