The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Advertising Banner System (http://www.thevbgeek.com/forumdisplay.php?f=28)
-   -   GAB with Paid Subscriptions (http://www.thevbgeek.com/showthread.php?t=4909)

Hengis 12-28-2008 08:53 PM

GAB with Paid Subscriptions
 
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.

Thanks....

Morgan 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:
Code:

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

Hengis 12-30-2008 04:43 PM

Thank you Morgan, what will that do exactly?

Hengis 12-30-2008 05:21 PM

Double post!! :P

Adding that line;
Code:

if ($this->settings['usergroups_view']) && $this->vb->userinfo['usergroupid'] != 86)
Generates
Code:

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


    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


Morgan 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.

Hengis 12-30-2008 05:46 PM

Quote:

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.

Hengis 12-30-2008 05:49 PM

Another double post...but worth it!

It WORKS!

Thanks again Morgan :)


All times are GMT. The time now is 09:54 AM.

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