Hi
i dont know if it is right place to ask this questions but i want to add google adsense to my forum but i want the google adsense to show up automatically right after the new thread is being posted and also then it should be able to show up after 3 or 4 or 5 post or whatever number i feel like
i have seen that happening on few vbulletin and phpbb forums can some one tell me if it is possible in mybb
thanks
yes i was looking for this only now can you tell me how can i upload the mod or do i have to mess with php code in order for the mod to work ?
and along with this is there a hide mod that is available that can hide users post and in order to see everyone else have to post a reply you must be knowing what mod i m talkin about
vikramdhani Wrote:yes i was looking for this only now can you tell me how can i upload the mod or do i have to mess with php code in order for the mod to work ?
You have to upload the file
adasfp into the "
inc/plugins" folder.
You also have to do a little modification to your files for it to work.
From the
Read Me,
Find:
eval("\$seperator = \"".$templates->get("postbit_seperator")."\";");
Above add the following:
// Ads after first post
$adsafp = "";
if ($mybb->settings['adsafp_code_onoff'] != "no") {
// Alignment
switch ($mybb->settings['adsafp_align']) {
case "1":
$ads_align = "left";
break;
case "2":
$ads_align = "center";
break;
case "3":
$ads_align = "right";
break;
}
// Ads after first post
if ($mybb->settings['adsafp_mode'] == "1") {
if (($postcounter - 1) % $mybb->settings['postsperpage'] == "0") {
$adsafp = "<div style=\"text-align:".$ads_align.";\">".$mybb->settings['adsafp_code']."</div>";
}
}
// Ads after first post and then every x posts
if ($mybb->settings['adsafp_mode'] == "2") {
if ($postcounter == "1" || ($postcounter - 1) % ($mybb->settings['adsafp_afterxposts']) == "0") {
$adsafp = "<div style=\"text-align:".$ads_align.";\">".$mybb->settings['adsafp_code']."</div>";
}
}
// Ads after every x posts
if ($mybb->settings['adsafp_mode'] == "3") {
if ($postcounter % ($mybb->settings['adsafp_afterxposts']) == "0") {
$adsafp = "<div style=\"text-align:".$ads_align.";\">".$mybb->settings['adsafp_code']."</div>";
}
}
}
// Ads after first post
vikramdhani Wrote:and along with this is there a hide mod that is available that can hide users post and in order to see everyone else have to post a reply you must be knowing what mod i m talkin about
As for this, I am afraid there isn't a MOD for this.
gr8 thanks for all your help
hey i have a question after doing all this modification where will i insert my google adsense code so that advertisement should show up ????
Admin-CP -> Board Settings -> Change -> Ads after first post.
What about ads at the top, can google ads be pleaced below this
or somewhere at the top middle so it fits nicely. And to be displayed at every page user opens !
Just open the template header and search for:
<hr class="hidden" />
<br class="clear" />
Under these lines add:
<div style="text-align: center;">Your Adsense Code</div>
where can i find the template file i know it might be sound like a dumb question but i want to know please
thanks