View Full Version : GAB with Paid Subscriptions

12-28-2008, 08:53 PM
Hi there,

I use (and love) GAB and was wondering if someone could help with a small dilemma....

I am introducing a VIP level for members, via paid subscriptions. All is set to go but I simply can't get my head around how to set the GAB. My VIP members will not see ads and that's fine, I have set it in AdminCP > GAB , tested this and it's all good.

The problem is, if they are a secondary member of any other group (that DOES see ads), they automatically see all ads and their excluded VIP setting is ignored.

I need to know if there is a way to set the paid subs/GAB to keep them in the groups but only set permissions based on their primary usergroup.


12-30-2008, 04:40 PM
Untested but edit the usergroup_views_ads function in the gab_class_core.php file, adding in the bold red bit where X is the primary usergroup ID:

if ($this->settings['usergroups_view'] && $this->vb->userinfo['usergroupid'] != X)

12-30-2008, 04:43 PM
Thank you Morgan, what will that do exactly?

12-30-2008, 05:21 PM
Double post!! :P

Adding that line;
if ($this->settings['usergroups_view']) && $this->vb->userinfo['usergroupid'] != 86)

Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/XXXX/public_html/geek/gab/includes/gab_class_core.php on line 333

Warning: require_once([path]/geek/gab/includes/gab_class_core.php) [function.require-once]: failed to open stream: No such file or directory in [path]/global.php(360) : eval()'d code on line 171

Fatal error: require_once() [function.require]: Failed opening required '/home/xxxx/public_html/geek/gab/includes/gab_class_core.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxx/public_html/global.php(360) : eval()'d code on line 171

12-30-2008, 05:38 PM
Untested, but it should do what you want, though redo the edit. You added an extra right parenthesis, and that is why you are getting an error.

12-30-2008, 05:46 PM
You added an extra right parenthesis, and that is why you are getting an error.
DOH! I didn't even spot that....

I'll test it and let you know how it goes. Thanks for taking the time to code this up.

12-30-2008, 05:49 PM
Another double post...but worth it!


Thanks again Morgan :)