MyBB Community Forums
ads for ONLY guest - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: ads for ONLY guest (/thread-133224.html)

Pages: 1 2


ads for ONLY guest - both4x060 - 2013-01-21

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


RE: ads for ONLY guest - Adobe - 2013-01-21

Are you using any plugin(s) for your Ads or manual coding?


RE: ads for ONLY guest - both4x060 - 2013-01-21

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


RE: ads for ONLY guest - Adobe - 2013-01-21

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.


RE: ads for ONLY guest - both4x060 - 2013-01-21

so will work only for registered users?
I need only the guest display advertising


RE: ads for ONLY guest - Adobe - 2013-01-21

The 1 is for the guests usergroup so yes it will only work for guests.


RE: ads for ONLY guest - both4x060 - 2013-01-21

(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


RE: ads for ONLY guest - Adobe - 2013-01-22

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)
}
</script>




RE: ads for ONLY guest - both4x060 - 2013-01-22

Sad does not work


RE: ads for ONLY guest - Adobe - 2013-01-22

Try this plugin.
http://mods.mybb.com/view/my-advertisements