This question might have been covered already but ...
*Google Analytics* could reside on the sidepanel
But what if I want to remove sidepanel totally by a theme (to cut page load)
Where I could put it
Sorry (again) to be a pain, but how do I edit that code so it displays to everyone and removes the announcement at the top? I've tried mixing your code with the original, as well as stripping out the if statements and the announcement just from yours, but whatever I try doesn't seem to be working
Removing the if statement works for anyone who's signed in, but as soon as they sign out it brings up an error
Fatal error: Call to a member function on a non-object in
/home/glosunit/public_html/extensions/Adsense2/default.php on line 32
OK, whats I think is happening is its attaching to the NoticeCollector delegate, so it only appears when that does.
Try these lines in place of the IF statement: $Context->AddToDelegate('DiscussionGrid', 'PreRender', 'InjectAdsense');
$Context->AddToDelegate('CommentGrid', 'PreRender', 'InjectAdsense');
Not sure if it's that, I used a different notice for logged in members anyway, but I'll give that a try, thanks.
(can't decide if I want a notice or not, hmm!)
I use <> because that is how inequality is checked in Visual Basic.
I sometimes use = to check for equality also, which always mucks up the values of my variables. It is a really annoying bug to debug. Old habits die hard.
EDIT: http://us3.php.net/operators.comparison
!= is probably better because you can expand on the idea with !== (not identical) and keep an consistent appearance.
It is a confirmed bug in Vanilla. I've already submitted a fix at http://lussumo.com/vanilladev/discussion/152/search-page-glitch-when-combined-with-a-notice/#Item_0
The green theme is probably very similar to fix.
Another alternative is to remove "search.php" from the in-array check, and that will remove the ads from the search page.
EDIT: un-whispered comment as this may help others.
I'll try adding that tonight and check it out. But I can also take the banner off of the search page, like you suggested. I don't know why I hadn't thought of that
Wallphone -
Is there a way to have Adsense display on a custom page that I've made through the Page Manager Extension by SirNot? In the default.php, I did try to add, "http://www.papertrade.us/?Page=vote" to the list of pages to display on, but that seems to have not changed anything.
Thanks -
Comments
Removing the if statement works for anyone who's signed in, but as soon as they sign out it brings up an error
Fatal error: Call to a member function on a non-object in /home/glosunit/public_html/extensions/Adsense2/default.php on line 32
Try these lines in place of the IF statement:
$Context->AddToDelegate('DiscussionGrid', 'PreRender', 'InjectAdsense'); $Context->AddToDelegate('CommentGrid', 'PreRender', 'InjectAdsense');
I've realised where I'm getting the error btw, it's when I sign out:
if ( $Context->SelfUrl <> 'people.php' ) { // code goes here }
I'll try adding that tonight and check it out. But I can also take the banner off of the search page, like you suggested. I don't know why I hadn't thought of that
Thanks again!
Scott