PDA

View Full Version : Vbulletin Conditionals


SaN-DeeP
Fri 15th Sep '06, 9:52pm
A list of useful conditionals for Vbulletin, this list will be upgraded with more useful information:

1. How to setup a conditional to show some information only to 1 usergroup.


2. How to setup a conditional to show some information to multiple usergroups.
<if condition="is_member_of($bbuserinfo, X, Y, Z)">

3. How to setup a conditional to show some information only to 1 user id.
<if condition="$bbuserinfo[userid] == X">

4. How to setup a conditional to show some information to multiple user Ids.
<if condition="in_array($bbuserinfo[userid], array(X,Y,Z))">

5. How to setup a conditional to hide information only from 1 usergroup.
<if condition="!is_member_of($bbuserinfo, X)">

6. How to setup a conditional to hide information from multiple usergroups.
<if condition="!is_member_of($bbuserinfo, X, Y, Z)">

7.How to setup a conditional to show hide information only from 1 user id.
<if condition="$bbuserinfo[userid] == X">

8. How to setup a conditional to hide information from multiple user Ids.
<if condition="!in_array($bbuserinfo[userid], array(X,Y,Z))">

9. How to show information only in forum
<if condition="$forumid == X">

10. How to show information in few forums
<if condition="in_array($forumid, array(X,Y,Z))">

11. How to hide information in 1 forum
<if condition="$forumid != X">

12. How to hide information in multiple forums.
<if condition="!in_array($forumid, array(X,Y,Z))">

SaN-DeeP
Fri 15th Sep '06, 9:52pm
Some web browsers lack the ability to use the vBMenu system.

In order to prevent these browsers from attempting to initialize menus that they can't use, a special template conditional is used.

$show['popups']

By surrounding all vBMenu controls and popups in a conditional that checks the value of $show['popups'], Javascript errors can be avoided, and alternative HTML can be shown to browsers that can't use popups.

<if condition="$show['popups']">

<!-- content here is for browsers that
are able to use the vBMenu system -->

<else />

<!-- content here is shown to browsers
that are unable to use vBMenu popups -->

</if>