Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Hi, I like this module, save lots of time for me.
I found the permissions of "Hide AdSense" is limited to hide adsense blocks, not for Auto ads. And in "Auto ads visibility" setting page, it can be controlled by url pattern only.
I am wondering if visibility based on roles is possible in future version? It would be very useful for website constructors to implement a ads system based on memberships.
Comments
Comment #2
jcnventura'Hide AdSense' hides auto ads as well.
I don't see what can be gained by adding a 'Hide AdSense auto ads' permission.
Comment #3
tky commentedHi, jcnventura,
Thank you for your reply. Let me explain the situation for requirement of 'Hide AdSense auto ads' permission.
Say, my site has memberships in different levels. Paid members have a privilege to see no ads which free members haven't.
In drupal, these two group of members can be assigned different roles, therefore got different permissions of ads display, ideally.
For now, as I know, the site builder can control the permission of "Hide AdSense" by role when he installed this module. But the permission is not included 'Hide AdSense auto ads'. As a result, you can only hide ads in adsense blocks but still see the auto ads all the time, if you enabled auto ads in both Adsense and the module configuration. Even you are the super user.
If you want to build a membership system like I do, you will need a permission to hide ANY ad from Adsense, no matter it is came from ad unit or auto ads. After all, you cannot make your members happy if you promised them an ad-free privilege but they still see auto ads all the time.
You would be more concentrated in site maintenances if you has administrator role with such permission. This is another benefit you can get.
Comment #4
jcnventuraThe current permission hides ANY ad from adsense. That's what the code does, and that's what I just tested.
Something is not working right in your case.
Comment #5
jcnventurahttps://git.drupalcode.org/project/adsense/blob/8.x-1.x/adsense.module#L41
Comment #6
jcnventuraNo further info in some time. Please set back to active with steps to reproduce the problem, if you are still having this issue.
Comment #7
mutuku commentedI am experiencing the same issue. I do not want the admin to view auto ads. "Hide AdSense" is enabled in permissions, but I can still see the ads. My adsense version is 8.1.1
Comment #8
promo-il commentedadsense.module