PDA

View Full Version : Simple question.


rinkrat
08-01-2004, 05:40 PM
I want to limit popup ads to just guests. What do I put before and after the popup code so that it will only show to a certain usergroup like guest or maybe even banned? Thanks in advance, this will help me.

Steve Machol
08-01-2004, 08:06 PM
I want to limit popup ads to just guests. What do I put before and after the popup code so that it will only show to a certain usergroup like guest or maybe even banned? Thanks in advance, this will help me.
You can use template conditionals to do this:

http://www.vbulletin.com/docs/html/main/template_conditionals

rinkrat
08-02-2004, 06:30 AM
Aaahhh!


Thank you :)

rinkrat
08-08-2004, 05:11 AM
OK it seems to work great when I use

<if condition="$bbuserinfo['userid'] == 0">
<p>Welcome to the forum!<br />
If this is your first visit, we hope you enjoy your stay!</p>
</if>


But if I change the usergroup to 8 or 16 then it doesn't work for those groups. Is there a switch somewhere that enables it?

Modin
08-08-2004, 02:06 PM
to use usergroup you'd have to have something like this


<if condition="$bbuserinfo['usergroupid'] == 8">
<p>Hey usergroup 8</p>
</if>

rinkrat
08-08-2004, 02:56 PM
THAT's what I was looking for!! Thanks you so much!

rinkrat
10-18-2004, 02:46 PM
Can I do it for only a certain IP address so that if the person is a guest I can still single them out?

rinkrat
10-21-2004, 04:13 PM
if IPadress=111.11.111.11 then

That kind of thing.

Modin
10-26-2004, 02:03 AM
hmm... not sure if it'll parse $_SERVER in a template, but hey it's worth a try


<if condition="$_SERVER['REMOTE_ADDR'] == '156.156.156.165'">
<p>Hey usergroup 156.156.156.165</p>
</if>


Try that :)

rinkrat
10-26-2004, 03:29 AM
I will, thanks :)

AN-net
10-26-2004, 02:43 PM
or try IPADDRESS which is vb's ip defined variable;)