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