Announcement

Collapse
No announcement yet.

Vbulletin Conditionals

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vbulletin Conditionals

    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.
    Code:
    <if condition="is_member_of($bbuserinfo, X, Y, Z)">
    3. How to setup a conditional to show some information only to 1 user id.
    Code:
    <if condition="$bbuserinfo[userid] == X">
    4. How to setup a conditional to show some information to multiple user Ids.
    Code:
    <if condition="in_array($bbuserinfo[userid], array(X,Y,Z))">
    5. How to setup a conditional to hide information only from 1 usergroup.
    Code:
    <if condition="!is_member_of($bbuserinfo, X)">
    6. How to setup a conditional to hide information from multiple usergroups.
    Code:
    <if condition="!is_member_of($bbuserinfo, X, Y, Z)">
    7.How to setup a conditional to show hide information only from 1 user id.
    Code:
    <if condition="$bbuserinfo[userid] == X">
    8. How to setup a conditional to hide information from multiple user Ids.
    Code:
    <if condition="!in_array($bbuserinfo[userid], array(X,Y,Z))">
    9. How to show information only in forum
    Code:
    <if condition="$forumid == X">
    10. How to show information in few forums
    Code:
    <if condition="in_array($forumid, array(X,Y,Z))">
    11. How to hide information in 1 forum
    Code:
    <if condition="$forumid != X">
    12. How to hide information in multiple forums.
    Code:
    <if condition="!in_array($forumid, array(X,Y,Z))">
    TechArena - TechArena Community - News - Download - Video - Guide - Review

  • #2
    The $show['popups'] Conditional

    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.

    Code:
    <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>
    TechArena - TechArena Community - News - Download - Video - Guide - Review

    Comment


    • #3
      To show info for a particular style only:

      <if condition="$bbuserinfo[styleid]==x">
      Stuff for styleid 'x' here
      </if>


      ...with 'x' being the styleid of course.
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment

      Related Topics

      Collapse

      Working...
      X