The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Tutorials (http://www.thevbgeek.com/forumdisplay.php?f=12)
-   -   Switching GAB off (http://www.thevbgeek.com/showthread.php?t=199)

The Geek 09-23-2005 06:27 PM

Switching GAB off
 
This is a quick little bit about one of the features in GAB: The ability to define usergroups that can toggle ads on and off.

This is a great way to encourage premium subscribers as you can enable them to have a lovely, ad free environment in which to play with.

Step 1: Create a custom profile field.
Using your admincp, create a new custom profile field for your users. The one I have created here uses the following settings:

Title: Adverts?
Description: Turn off those pretty ads?
Options: naaa, Yup (each on a seperate line)

Step 2: Set GAB to check this value.

Edit your GAB settings and choose which usergroups can toggle the ads off.
At the bottom of the usergroup list is a combo box filled with the user profile fields. Select the one you just created and in the value box below that, enter the value that determines if ads are off (in other words: Yup).
One common mistake is to enable usergroups to toggle ads off, and then leave the profile field and value empty which generally results in: whoever has their Bio field blank wont see ads! As you can see - this is a silly mistake.

nJoy

gldtn 10-20-2005 12:57 PM

Almost there.. I followed this tutorial but I can't seem to turn it off :/

The field shows but when I choose the off system it still displays.

Thanks for this "complex" tutorial! LOL

The Geek 10-20-2005 01:17 PM

er. Found another typo :)

Make sure you download the latest version (GAB 1.0 Beta 1d) and replace your geek/gab/includes/gab_class_core.php file.

thanks!

gldtn 10-20-2005 01:27 PM

Voiola :P It worked as soon as I replaced the file mentioned above!

Thanks!

MrGeeK 12-16-2005 07:09 PM

Quote:

Originally Posted by The Geek
This is a quick little bit about one of the features in GAB: The ability to define usergroups that can toggle ads on and off.

Is it currently possible using the in built functionality to only allow certain kinds of ads to be turned off?

eg, I'd like to let certain members turn off popups/intersials/etc but I don't anyone to have the ability to turn off in page ads like adsense.

I know I can code something up to do this, but if GABS can do it already then that would be handy.

The Geek 12-16-2005 07:11 PM

no, right now its all or nothing (either the usergroup sees it or they dont)

MrGeeK 12-17-2005 08:58 PM

No probs, I just created a on/off custom field for the users to set via their CP and then just added a test in the relevant template to see if they should see the ad or not.

Works a treat.

pashnit 12-31-2005 12:24 AM

Is it possible to hide the field from users who don't have the ability to turn them off?

The Geek 12-31-2005 12:51 AM

If I follow you - not really :)

Most likely require a template edit - if not, a plug in.

Bellinis 01-26-2006 06:52 PM

Isn't there a more simple way to show GAL only to guests? I don't even want to have the option for users to turn it on/of, just don't want GAL activated at all for everyone except guests.

Can't I disable is with some simple IF function?


All times are GMT. The time now is 12:29 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

Tutorial powered by GARS 2.1.9 ©2005-2006