I am trying to display adverts to everyone, logged in or logged out, regardless of Trust Level, unless they are a member of group “extra_special_members” - in which case they should be excluded and not see any adverts.
I’ve changed setting adsense through trust level and set this to TL4 (meaning anyone at any Trust Level will see adverts).
I’ve also changed setting no ads for groups and applied only one group, that of “extra_special_members” (meaning users in this group will not see adverts)
My test user is TL2 and is a member of the “extra_special_members” group members - but my test user is still being served adverts.
Is this a bug?
Or is the adsense through trust level setting somehow overriding the no ads for groups setting?
The ad plugin performs all the logic of “show or do not show” ads based on group and trust level information it gets from the server.
Given the group membership is hidden to the user, the client has no way of figuring out the ads need to be hidden.
The code needs to be rewritten so the logic lives on the server side (probably a field on current user says "this user has ads, or this user has no ads). This is a rather big change cause so much of the logic now is implemented in JavaScript and it needs to move to Ruby.
I am putting a pr-welcome on this, if we have a few repeat requests for it I will consider fast tracking. It is a complex change.