![]() |
How do I? ads to registered and guests only
Hi, how do I make ads show for guests and registered users only but for mods/admins/subscription(aka premium) members the ads do not show.
I gather its a if command so far I have <!-- Header Banner Ads Start --> <if condition="$show['guest']"> Ads Here </if> <!-- Header Banner Ads End --> Please LMK if I am on the right track also how would I go about making the reg members to see the ads also |
$vbulletin->userinfo['userid'] != 0
|
Quote:
sorry to sound dumb but how would I use that in the above setup. registered users - userid: 2 unreg/not logged in - userid: 1 |
<if condition="$show['guest'] AND $vbulletin->userinfo['userid'] != 0">
|
<!-- Header Banner Ads Start -->
<if condition="$show['guest'] AND $vbulletin->userinfo['userid'] != 2"> Ads Here </if> <!-- Header Banner Ads End --> So this would be correct? as registered users are id 2. Also I added this and 1 user said they could not login could this be the problem? or is it something else? (it was only wrapped around the ads) |
userid is the `userid` field in the database. It is different for every user. 0 simply means that the user is not logged in.
|
Quote:
?? ??? |
They don't, it is different for EVERY user. 2 is probably your userid.
|
thank you! this is very helpful. and i found the other one from google but this one seems easier..
http://www.mydigitallife.info/how-to...-in-vbulletin/ |
All times are GMT. The time now is 05:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|