Influx and Lustrous Upgraded to vBulletin 4.1.4

Support Forum

vBulletin Skins, IPB Skins, phpBB Skins and SMF Skins Support Forum


Go Back   ForumThemes Forums > Forum Resources > Helpful Tips, Tricks & Articles

Follow ForumThemes on Twitter!
Acquiring Tweets
Follow us on Twitter!

Reply
 
LinkBack Thread Tools Display Modes
Old 02-22-2010, 03:43 AM   #1 (permalink)
Customer
  • Join Date: Jan 2009
  • Location: Canada
  • Posts: 1,949
  • User Status: Offline
  • Contact this user:

    Send a message via AIM to william Send a message via MSN to william


Question vBulletin 4 Template Conditionals List

Here is a list of some new vBulletin 4 Template Conditionals that I have found going through vb.org. I hope you find them useful.

Show only members:
Code:
 <vb:if condition="$show['member']">Show this to members only</vb:if>


Show only guest
:
Code:
<vb:if condition="$show['guest']">Show this to guest only</vb:if>
Show specific user groups :
Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if>
Show one member:
Code:
<vb:if condition="$bbuserinfo['userid'] == 318713">Show this only to the member with the user id of 318713</vb:if>
Show every one but one member:
Code:
<vb:if condition="$bbuserinfo['userid'] != 318713">Show this to every one but the member with the user id of 318713</vb:if>
Show only moderators of any forum:
Code:
<vb:if condition="can_moderate()">Show this to all moderators</vb:if>
Show Moderator of one forum: Remember to change x
Code:
<vb:if condition="can_moderate($forum['x])">Show this if moderator is moderator of the forum with the id of x</vb:if>
Show Moderator of current forum:
Code:
<vb:if condition="can_moderate($forum['forumid'])">Show this to the moderator of the current forum</vb:if>
Show in one forum: Remember to change x
Code:
<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
Show is every forum but one: Remember to change x
Code:
<vb:if condition="$forum[forumid] != x">Show this if forum id is not x</vb:if>
Show in several forums:
Code:
<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in.
Code:
<vb:if condition="THIS_SCRIPT == 'calendar'">Show this only on calendar.php</vb:if>
Show in every file but one: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you do not want it to show in.
Code:
<vb:if condition="THIS_SCRIPT != 'calendar'">Show this only on calendar.php</vb:if>
If $customvar is set:
Code:
<vb:if condition="$customvar">Show this if $customvar is set</vb:if>
If $customvar equals:
Code:
<vb:if condition="$customvar == blah">Show this if $customvar equals blah</vb:if>
If $customvar does not equal:
Code:
<vb:if condition="$customvar != blah">Show this if $customvar does not equal blah</vb:if>
vBulletin else statement:
Code:
<vb:if condition="$show['guest']">
Show this to only guest.
<vb:else />
Show this to all registered users
</vb:if>
vBulletin else if statement:
Code:
<vb:if condition="$show['guest']">
Show this to only guest.

<vb:elseif condition="is_member_of($bbuserinfo, 5,6)" />
Show this to user group 5 and 6 which is  mods and admins

<vb:else />
Show this to all registered users

</vb:if>
If you find more please let me know as I like to try and keep the most up to date and informative list.
__________________
William Wilson
ForumThemes - Owner
vBulletin Skins | IPB Skins | phpBB Styles
  Reply With Quote
Old 08-05-2010, 05:01 AM   #2 (permalink)
Junior Member
  • Join Date: Dec 2009
  • Location: Togo
  • Posts: 2
  • User Status: Offline
  • Contact this user:

    Send a message via Yahoo to Zooxgrittylor Send a message via ICQ to Zooxgrittylor


Default Excellent site! Great work! Cheers!

I found this site using google.com. And i want to thank you for your work. You have done really excellent site. Great work, great site! Cheers!

Sorry for offtopic
  Reply With Quote
Old 10-03-2010, 02:37 AM   #3 (permalink)
Junior Member
  • Join Date: Dec 2009
  • Location: Togo
  • Posts: 2
  • User Status: Offline
  • Contact this user:

    Send a message via Yahoo to Zooxgrittylor Send a message via ICQ to Zooxgrittylor


Default I want to thank you for your work. You have done great site.

I found this site using google.com And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic
  Reply With Quote
Old 12-15-2010, 10:05 AM   #4 (permalink)
Banned
  • Join Date: Dec 2010
  • Location: New York
  • Posts: 5
  • User Status: Offline


Exclamation

You have searched find things for conditional test. It will helpful to pass in query to search specific result.
  Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vBulletin Variables List william Helpful Tips, Tricks & Articles 1 12-13-2010 11:29 AM
vBulletin Template Conditionals List william Helpful Tips, Tricks & Articles 1 12-13-2010 11:17 AM
vBulletin 3.8.3 No Template Changes william Site News & Anouncements 0 06-13-2009 03:14 AM

Powered by: vBulletin Versio3.8.7
Copyright ©2000 - 2012, Jelsoft Enterprises Limited.

SEO by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12