MyBB Community Forums

Full Version: ads for ONLY guest
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,.. i have a problem.. i should put an ads 'popup' on my forum... i use mybb.. that's the code :

<script type="text/javascript" src="http://www.******.com/script/java.php?option=rotateur&rotateur=113299"></script>

if i try to put it on index page templates => index, the js works for every users and guest
I would like that this popup work only for guest.. how can i do?
ty in advance Smile
Are you using any plugin(s) for your Ads or manual coding?
manual coding..
but if you need a plugin will install

p.s this javascript for advertising,
once the guest click on the background appear to advertise in a new page
Try putting this code in your index where the script for your ads is.

if({$mybb->user['usergroup']} == 1)

I have a autoredirect for permanent banned members on my forum and I have that code for group permission or to which group to only redirect so maybe you can give it a try, I'm sure that code should help.
so will work only for registered users?
I need only the guest display advertising
The 1 is for the guests usergroup so yes it will only work for guests.
(2013-01-21, 11:45 PM)kamz89 Wrote: [ -> ]The 1 is for the guests usergroup so yes it will only work for guests.

Ok, then the javascript where I insert it?

if({$mybb->user['usergroup']} == 1)
<script type="text/javascript" src="http://www.******.com/script/java.php?option=rotateur&rotateur=113299"></script>

??? Toungue
Once again, I'm not 100% sure but please give this a try.

<script type="text/javascript" src="http://www.******.com/script/java.php?option=rotateur&rotateur=113299">
    if({$mybb->user['usergroup']} == 14)

Sad does not work
Pages: 1 2