The problem is that the ad templates (and header and footer templates) are rendered before you know if there is a permission problem. I suppose it's possible to re-render those templates in the case of an error (maybe using the error_nopermission hook), but it might take some code. At the minimum you'd need a "global" statement for any variables that the header or footer uses.
I guess another approach would be to do a str_replace() on the $header or $footer variables to remove the AdSense, but you'd have to figure out what you could match to do that.
Thanks God I'm not using the ad templates, the AdSense code is directly attached to the navbar template. Is there any conditional I can use there against not_logged_no_permission pages?
There might be something you could check so that you wouldn't need the plugin, but I couldn't see anything that was immediately obvious.
Unfortunately it's not working. When using your conditional I can still see the contents at every page even on those no permissions pages. Removing the ! prevents the content from being displayed at all pages without distinguishing no permission pages and yep I have double checked that I'm using the error_nopermission hook.
Quote:
Originally Posted by Simon Lloyd
Or in the template you could simply use this if condition
HTML Code:
<if condition="$show['search_engine']">
Unfortunately this is also not working. It shows nothing at any page and when using the same conditional but preceded with a ! it shows the contents in all pages regardless if those are no permission pages.
I'm trying to do this in the navbar template, vBulletin 3.8.5
Unfortunately this is also not working. It shows nothing at any page and when using the same conditional but preceded with a ! it shows the contents in all pages regardless if those are no permission pages.
I'm trying to do this in the navbar template, vBulletin 3.8.5
That shows it is working, preceeding it with ! means IF visitor (of any kind) is NOT a search engine then show everything inside the conditional, however if you were a search engine it will NOT show to you.