Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:<?php
/*
Extension Name: Guestsense
Extension Url: www.lussumo.com/Add-ons/
Description: Adds Google Adsense at the top of the discussions
Version: 0.3
Author: WallPhone, based on existing code by Alexis Bellido
Author Url: http://wallphone.com
*/
function InjectAdsense() {
echo '<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-5163550033929978";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="3348340772";
google_color_border = "FFFFFF";
google_color_bg = "EEEEEE";
google_color_link = "008000";
google_color_text = "000000";
google_color_url = "336600";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>';
}
if ( ($Context->Session->UserID == 0) && (in_array($Context->SelfUrl,
array("index.php", "categories.php", "comments.php", "post.php", "account.php", "settings.php"))) ){
$NoticeCollector->AddNotice('Please <a href="'.GetUrl($Configuration, 'people.php').
'">sign in</a> or <a href="'.
GetUrl($Configuration, 'people.php', '', '', '', '', 'PostBackAction=ApplyForm').
'">apply for membership</a> to remove the ads');
$Context->AddToDelegate('NoticeCollector', 'PostRender', 'InjectAdsense');
}
?>
1 to 5 of 5