vBulletin powers many popular Internet forums with active communities and knowledgeable discussions. The active forum communities with wells of information usually attract unregistered visitors or guests (lurkers to some webmasters). Simply turn off the forums by hiding useful information from unregistered guests are not an recommended option, as visitors may not notice the value or usefulness of joining the forums as members.

As such, most vBulletin webmasters prefer to display or add a message that is viewable by guests or unregistered visitors on the vBulletin powered community boards or forums to encourage visitors to sign up and register as a member and participate in the discussions. Many administrators also decide to ads or avertisements, such as display ads, text ads, in-text ads, or other ads format to visitors and guests only.

Here’s the brief guide on how to add and show a message or ads viewable only by unregistered visitors or guests and unsigned-in registered members in vBulletin.

  1. Login to vBulletin Admin Control Panel (admincp).
  2. In the left open, expand Styles & Templates menu.
  3. Click on Styles Manager.

    vBulletin Style Manager

  4. In the All Style Options drop down list next to the default template of the forum, select Edit Templates under “Template Options”. The guests will be shown only with the default template, so no editing on any other templates is required.

    Edit vBulletin Templates

  5. Double click to select a template file to edit. There are many templates that can be edited, depends on where the message has to be appeared.

    For example, expand “Forum Home Templates” and then select “FORUMHOME” to add a message to the forum index page only. Expand “Navigation / Breadcrumb Templates” and then select “navbar” to add a message in the navigation bar and breadcrumbs area of every page. Double click on “header” template to add a message to the top of every page. Double click on “footer” template to add message at the bottom of every page.

    Show Messages or Adverts to vBulletin Guests Only

    Note that not necessary only the message can be added, but also HTML code, JavaScript and etc, and hence most advert code such as those from Google AdSense, Tribal Fusion, Kontera, AdBrite, and analytic tracking code can be added.

  6. Edit the template file to include the following code at the desired location for the text or object to be displayed to unregistered visitors only:

    <if condition="$show['guest']">
    <p>Text or object element to show to forum guests only.</p>

    For user who want to include or exclude certain user groups from ad or message, it’s also possible to use the following code at desired template location:

    <if condition=”!is_member_of($bbuserinfo, X, Y, Z)”>
    <p>Text or object element to show to forum guests only.</p>

    Code above exclude usergroups with ID X, Y and Z (user group ID can be retrieved from vB Admin Control Panel. Alternatively, remove the exclamation mark (!) to apply to only selected user groups instead.

    Tip: Administrators can modify anything between the two conditional “if” tag lines as much as they like, or enclose styling script to match the vBulletin template.

  7. Click on Save button when done.

Note that to preview the change that been made to show and display to guests and unregistered visitors, you have to logout of the forums first.