![]() |
hi..
i try to put this in the forumdisplay template, but no luck, anyone could help: <vb:if condition="!in_array($forum['forumid'], array(1, 2))">not show to forumid 1 and 2</vb:if> still showing to all forum ID, and i read from the 1st page this thread, lots of people got the same problem with me. |
Try using-
Code:
<vb:if condition="!in_array($foruminfo['forumid'], array(1, 2))">not show to forumid 1 and 2</vb:if> |
ok..
one more thing.. how to make condition "show only to member that already had >= 50 post count" ? <vb:if condition="$post['postcount'] >= 50"> now show to under 50 postcount</vb:if> the command above wont work. thanks |
Quote:
<vb:if condition="$userinfo['postcount'] >= 50"> now show to under 50 postcount</vb:if> |
Quote:
not working too.. the command not show to all member.. not just member with under 50 post count |
The variable would be $bbuserinfo['posts'], not $userinfo['postcount'] in forumdisplay.
|
Quote:
--------------- Added [DATE]1339003487[/DATE] at [TIME]1339003487[/TIME] --------------- Quote:
|
Sorry the post count for a user is $bbuserinfo['posts']
for ad_global_below_navbar try $GLOBALS['forumid'] |
thanks, globals works :)
|
Code:
<vb:if condition="in_array($foruminfo[forumid], array(166,113,110,109,108))"></vb:if> --------------- Added [DATE]1339085022[/DATE] at [TIME]1339085022[/TIME] --------------- Obviously the ! addition to the in_array has the reversed effect |
HELP
I am trying this code but its not working. <vb:if condition="$forum=59">{vb:raw show.vbshout_instance3}</vb:if> I want this shout box to show only in forum 59 but it shows up in every forum. What am i doing wrong? Does this go in FORUMDISPLAY? |
Quote:
|
i did reread and still not sure why I can't have this show up only in a certain forum
|
I know you need a double '=', like:
Code:
<vb:if condition="$forum==59">{vb:raw show.vbshout_instance3}</vb:if> but I'm not sure if $forum is what you should be using or not. |
Quote:
it was forum info Ok now I think I got it to work <vb:if condition="$foruminfo['forumid']==X">{vb:raw show.vbshout_instanceY}</vb:if> X - forum ID # Y - instance # |
Has anyone used a template conditional statement in the header for the URL or a regexpression of using the URL? I need to spit out differnent elements of the header depending on what section visitors are viewing.
Thanks. |
I don't see how you can use a regex in a template conditional, there are no regex functions allowed in templates...
The very short list of allowed functions is here: https://www.vbulletin.com/docs/html/...n_conditionals So you're going to need a plugin to do the back end of whatever it is you need to do. In a plugin this should give you the current http path (minus the bburl): Code:
$vbulletin->input->fetch_relpath(); |
using this in forum display and it doesn't appear to work any longer in 4.2 pl2 - any ideas and yes it has a closing if statement...
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4)"> |
Hope somebody can help me with the following:
I have a forum called classifieds (forum id10) This forum has 2 prefixes (only members and open to all) Now I only want to show in this forum the ones with the prefix "only members" to the user group called "members" (user group id 9) I guess I can do this with a conditional but not sure how to. Also where would I put the conditional? Thanks Michael |
How can restrict signature on certain forum ID?
Example: In forumID 2, How can I make only admin and mod's signature will be enabled, other usergroup's signature wont display? Thanks |
Look in the postbit or postbit_legacy template for the signature code:
There is already a conditional you can edit: Code:
<vb:if condition="$post['signature']"> To allow the signatures on all forums except forum 2 Code:
<vb:if condition="$post['signature'] AND $thread['forumid'] != 2"> To allow the signatures on all forums except forum 2, but OK in forum 2 is staff Code:
<vb:if condition="$post['signature'] AND ($thread['forumid'] != 2 OR is_member_of($post, 5,6,7))"> I haven't tested this but try it. If not it may need to be: Code:
<vb:if condition="$post['signature'] AND ($thread['forumid'] != 2 OR in_array($post['usergroupid'], array(5,6,7)))"> |
thanks, its working now...
|
Well you basically have
Code:
condition="XXX" Code:
$post['signature'] == 'Value' You just need to add additional statements with AND or OR depending on what you want. Use parentheses to keep the logic correct/easy to follow Code:
condition="(XXX) OR ((YYY) AND (ZZZ))" |
I would like to add an "if condition" based on style id, but am having difficulty with the correct syntax to use...
For example - if vbDefault style id =2 and NewGreat Style id = 4 I would like to be able to add an if condition to the widget templates- if browsing with vb default style id #2 - Display the widget; otherwise if browsing with NewGreat Style Id #4 - (DO Not Display the widget!) Anyone willing to offer some assistance? Thanks so much, greatly appreciated! Code:
<vb:if condition="$styleid=2"> |
Code:
<vb:if condition="$bbuserinfo['styleid'] == 2"> |
Quote:
Anybody help please. |
Quote:
Code:
$GLOBALS['fourmid'] Code:
$forums['forumid'] |
Thank you so much, one of the greatest so far in the articles area,,,
|
Is there a conditional for a forum and all its sub-forums?
|
Is it possible to add conditional registration usergroup submission. If the user select group x then the user will automatically added in that user group or it will go to default registration group.
Thank you for your attention. |
@:BBR-APBT
Thank you! |
Quote:
|
Quote:
<vb:if condition="in_array($GLOBALS['forumid'], array(1,2,3,))">Show this to forum 1, 2 and 3</vb:if> instead of this: <vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if> Edit: Ok, next time i will read first, and post later :) |
Quote:
Thank you both of you. |
Can anyone tell me how to do this...
Code:
Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in. |
Quote:
|
Wonderful.. adv_index ...thankyou!
|
whats the conditional for this:
show this in all pages except in showthread of forum 1 and 2 the code will be placed on "below navbar banner" |
hmmmm... try...
Code:
<vb:if condition="THIS_SCRIPT != 'showthread' OR !in_array($GLOBALS['forumid'], array(1, 2))"> |
How does the template conditional need to look like if I want a text to appear if the forum is closed?
SHOW NOT abc if board is closed, ELSE show def... |
All times are GMT. The time now is 02:59 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|