MyBB Community Forums

Full Version: Ad Randomizer System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

http://mods.mybboard.net/view/ad-randomizer-system

Does anyone know how to edit the above plug-in to only count views for members of the forum and not any robots like GoogleBot or Yahoo! Bot?

Thanks,

Jack
contact the author: http://mods.mybboard.net/profile/1903
or, use Click base (3rd party soft.) instead of View base. It's more fair and make your banner customer happy Smile
The creator of the plugin has not been online for a few months
Some adjustments to the plugin should do it. Probably add a global for the bots then return if user is one. You can also add the bots to their own group and just do a check for them. Does this plugin have exemptions for groups? If not that can be added manually.
(2010-03-08, 12:25 AM)labrocca Wrote: [ -> ]Some adjustments to the plugin should do it. Probably add a global for the bots then return if user is one. You can also add the bots to their own group and just do a check for them. Does this plugin have exemptions for groups? If not that can be added manually.

I'm not sure how do to the above, Do you know anyone which can do this for me?
Open the file.

Find:
function ads_globals(){
	global $db, $templates, $footer, $banner, $config;

Replace with:
function ads_globals(){
	global $db, $templates, $footer, $banner, $config, $mybb;

if ($mybb->usergroup['X'])
return;

This requires you to setup the bots in their own group which you can do in admincp easily. Then change the X in above code to the usergroup ID number to match. Basically ads won't display to bots.
Hi,

I have had a look at setting up a group for the bots however not sure.
1. Setup a new group. Give it restricted permissions to post but give it read access to things like profiles, threads, and forums.

2. Take the group id you just created and edit the Spiders/Bots to reflect the new gid.

3. Edit the code I gave you and insert the GID where the X is.
nice explanation Labrocca Smile
I will do it