Knowledge Base Article

How to place a banner in vBulletin for unregistered users

If your forum is ranked well among search engines it is a good idea to make profit of that without causing inconvenience to the regular user. Thus it is a good idea to place a banner only for unregistered or awaiting verification users.

 

In vBulletin this can be done easily following these steps:

 

1. Log in your vBulletin admin area (e.g. http://yourdomainname.com/forum/admincp).

2. Go to Styles & Templates from the left menu. There choose Style Manager.

3. Click on << >> to collapse all options.

4. Then choose where you'd like your banner to be placed. In our case it will be the header so we double-click 'header'.

5. Then scroll to the bottom and add the following code:

 

<if condition="in_array($bbuserinfo['usergroupid'], array(1, 3))">

Your banner code goes here in HTML
</if>

 

The above code means that if the user has groupid 1 or 3 the following code should be executed. By default 1 and 3 user group ids belong to unregistered and awaiting-approval users.



Rating

Please indicate if this article was helpful for you.

rating :  5.0 from 5
views :  9776
votes :  5

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!