Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Adsense
Hi,
I searched in addons and i didn't found any approved plugin for adsense.
Let me know if there is an addon for adsense in different name
I am looking for something which will add the adsense in between the first post.
I searched in addons and i didn't found any approved plugin for adsense.
Let me know if there is an addon for adsense in different name
I am looking for something which will add the adsense in between the first post.
Tagged:
0
Best Answer
-
ddumont ✭✭I don't think you can do that without a special plugin.
You can use pockets to insert an ad after the first comment and then after every x comment after that.There was an error rendering this rich post.
0
Answers
or sandwich between the first and second comment?
There was an error rendering this rich post.
@ddumont
Can pockets addon do what i am looking? I will get google adsense in this week
There was an error rendering this rich post.
I need like this.
Comment Title
this is comment first line.
ADS FROM ADSENSE
this is few other line of the first comment
You can use pockets to insert an ad after the first comment and then after every x comment after that.
There was an error rendering this rich post.
I just tried to write a plugin but script tags are stripped. Any idea?
http://vanillaforums.org/discussion/16092/embedding-adbrite-code-in-discussions-helper_functions.php#Item_8
filename is class.zadsensethemehooks.php
class ZAdsenseThemeHooks implements Gdn_IPlugin { public function DiscussionController_BeforeCommentBody_Handler ($Sender, $Args) { static $First = FALSE; if (!$First) return; $First = FALSE; echo '<script type="text/javascript">blaaa blaaa</script>'; }
Script is stripped.
Documentation is little bad, I am not able to understand
class ZAdsenseThemeHooks extends Gdn_Plugin {
save the code in a filename "class.adbrite.plugin.php" inside a folder name "Adbrite"
<?php if (!defined('APPLICATION')) exit(); // Define the plugin: $PluginInfo['Adbrite'] = array( 'Name' => 'Adbrite', 'Description' => "Adbrite", 'Version' => '1.0', 'MobileFriendly' => FALSE, 'RequiredApplications' => FALSE, 'RequiredTheme' => FALSE, 'RequiredPlugins' => FALSE, 'RegisterPermissions' => FALSE, 'Author' => "adrian", 'AuthorEmail' => 'xxxx@gmail.com', 'AuthorUrl' => 'http://www.pinoyau.info', 'License' => 'GPLv3' ); class Adbrite extends Gdn_Plugin { public function DiscussionController_BeforeCommentBody_Handler(&$Sender) { $this->_AttachAdbrite($Sender); } protected function _AttachAdbrite(&$Sender) { static $First = TRUE; if (!$First) return; echo '<div id="adbrite" style="float:right;display:block;">'; echo<<<EOD <!-- Begin: adBrite, Generated: 2011-07-17 8:41:03 --> <script type="text/javascript"> //code here </script> <script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1933635&zs=3138305f313530&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script> <div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1933635&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div> <!-- End: adBrite --> EOD; echo '</div>'; $First = FALSE; } public function DiscussionController_AfterCommentBody_Handler(&$Sender) { echo '<script>$(\'div.Message\').first().css("min-height","200px");</script>'; } public function Setup() { // Nothing to do here! } public function Structure() { // Nothing to do here! } }
http://www.indiapublicforum.com/discussion/148/katrina-kaif-nice-photo-collection
Thanks for your help
There was an error rendering this rich post.