Mon 27th Mar 2006
Turning off Google Ads
Posted mid-afternoon, filed under Blogsome , Smarty Templates.Michael, over at Binary Bonsai, has written about how he turns off Google Ads (or any other type of text) for readers who have commented.
No Ads for Regulars at Binary Bonsai
Here’s how to do the same thing at Blogsome, using Smarty Tags. Just before your Ad Block:
{if $comment_author == ""}
And then after, use:
{/if}
Then, readers who have commented on your blog won’t see your Advertisement(s).
This only seems to work on a Post page. For some reason the cookie isn’t checked on other pages. I’m still looking into this.
I’ve taken this a step further. I now check for the following:
$smarty.cookies.comment_author_[md5 hash of server name]This will pick up the front page, and not show Ads there either. As with any non single post page.
5 hours, 41 minutes after the fact.
You can use that for ahother things like disable your visits in the statistics.
{capture name=autor_blog}{the_author echo=0}{/capture}{if $smarty.capture.autor_blog != $smarty.cookies.comment_author_[hash of server name] }
Statistics Code
{/if}
2 days, 9 hours after the fact.
What a great idea!
I’ll do that, and also do the same for my referrer data from within the Blogsome backend.
2 days, 17 hours after the fact.