The vB Geek

The vB Geek (
-   Geek Auto-Linker (
-   -   Groups not having to view GAL - Support Request (

KenDude 12-02-2009 02:25 PM

Groups not having to view GAL - Support Request
1 Attachment(s)

I set up one of my categories so that a couple of different usergroups could opt out of seeing GAL links for advertisers. I checked the boxes next to those groups in category edit screen which I have attached as a screen capture below.

For example Planet-9 Insiders group should be able to opt out of seeing the pop-ups links if the choose the userprofile box of "Other Member Number" and put a value of 1881 into that box in their profile.

However, when I have a member in that group do just that, they still see the pop-up links for the advertisers.

The member in question has a Primary Group of "Registered Users" which you can see from the list CANNOT opt out of seeing the ads, the member has a secondary or additional group of "Planet 9 Insiders" which CAN opt out of the ads.

It appears that either it isn't working, or that the primary group is overriding the secondary group and not allowing them to opt out. I cannot place the member in the Planet-9 group as primary for several reasons in how forum and other permissions are managed on the site.

Can you please help?

KenDude 12-05-2009 08:01 PM

I don't mean to be a pest, but 3 days have gone by with no reply to this topic, are you still providing support for this product?


KenDude 12-09-2009 02:25 AM

6 days have now gone by, has something happened to Morgan?

Morgan 12-09-2009 05:43 PM

As previously mentioned, when I am available, I answer these threads. If I'm not available, then I'll answer them when I am again available. Bumping doesn't get an answer any faster but it does put your query later in the queue, as oldest are answered first. As to your question, are the keywords in more than one category? I don't see a reason for what you describe, but the code that handles this is in the gal_class_core.php file:

                    $catid = $this->cached[$id]['catid'];

                    if (!$this->cat_usergroups[$catid]['ini'])
                            $this->cat_usergroups[$catid]['ini'] = true;
                            $this->cat_usergroups[$catid]['exempt'] = is_member_of($this->user, explode(",", $this->cached[$id]['usergroups']));
                            if ($this->cat_usergroups[$catid]['exempt'])
                                    $this->cat_usergroups[$catid]['exempt'] = strtolower($this->core->userinfo['field' . $this->cached[$id]['profile']]) == strtolower($this->cached[$id]['field_value_yes']);

                    if (!$this->cat_usergroups[$catid]['exempt'])

If you want to edit the file, you could change this part:

                    if (!$this->cat_usergroups[$catid]['exempt'])
To this"

                    if (!$this->cat_usergroups[$catid]['exempt'] AND !in_array($this->user['userid'], array(X, Y, Z)))
Where X, Y, Z are the user IDs of the members who you want to not see GALs.

KenDude 12-09-2009 06:27 PM

Apologies I didn't know you were away for extended periods of time these days.

It would appear from the code that all you need to do is put a member into any exempt group and they should immediately become exempt from seeing the gal links.

Given the attachment I added in my first message did I set it up the right way? If someone was a member of planet-9 insiders group and then added that 4 digit number to that profile field should they then be exempt from seeing any items in that category? I do understand how it is supposed to work don't I?

BTW adding individual user accounts won't work because there could be hundreds, so I need to use a usergroup and for other reasons as well. I'll keep running some more tests.

Morgan 12-09-2009 06:57 PM

No problem, and yes that is how it should work. Check whether you have the same GALs in more than one category. Also try it where you don't select a field, and you make the field value blank, and see what that does. You could also change this:

if (!$this->cat_usergroups[$catid]['exempt'])
To this:

if (!$this->cat_usergroups[$catid]['exempt'] AND !is_member_of($this->user, array(A, B, C)))
Where A, B, C are usergroup IDs of the usergroups that you want to not see GALs.

KenDude 12-10-2009 01:58 PM

I do have 2 different categories on my site, one category is for sponsor advertisement links, the other are for general information/glossary links. The same groups can be exempt from either, but I made the value different in the user profile field, 1881 for exempting from sponsor ads and 2112 for exempting from glossary links.

Yesterday with a test account I put in 1881 and the test user appeared to be exempt from both categories. I guess that "sorta" works. :) Does the code look at the actual value in the user profile field, or just that "some" value is there?

Morgan 01-02-2010 02:30 AM

It is meant to look at whatever profile field and value you set in GAL via the ACP. At this point I haven't been able to duplicate the problem you describe, so am not sure what to offer up as a fix.

All times are GMT. The time now is 09:05 PM.

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