MyBB Community Forums

Full Version: Ads after post plugin on 1.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello, i am searching 2 days as guest the forum and i am searching the installation details of ads after post.
Can some1 link me or tell me what to do?
Please look here, download the plug-in (Ads after post) and read the instructions

http://mods.mybboard.net/view/ads-after-...r-mybb-14x
Thats not the installation details................
(2008-08-05, 05:11 PM)HARRY256 Wrote: [ -> ]Thats not the installation details................

The install instructions come in a .txt format.
Well, the script dont work with the currect instructions on 1.4.
What do i do now?
I've installed it with no problems, what do you mean its not working?
There was a hack for this to make ads only visible to non registered users but for the life of me I cant find it. Anyone know where it is?
contact the maker, he might give support for his plug in?
I am sure he would!
Find
 // Ads after first post
        if ($mybb->settings['adsafp_mode'] == "1") {
            if (($postcounter - 1) % $mybb->settings['postsperpage'] == "0") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($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") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($mybb->settings['adsafp_code'])."</div>";
            }
        }
    
        // Ads after every x posts
        if ($mybb->settings['adsafp_mode'] == "3") {
            if ($postcounter % ($mybb->settings['adsafp_afterxposts']) == "0") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($mybb->settings['adsafp_code'])."</div>";
            }
        }


Replace with
if(!$mybb->user['uid'])
{
 // Ads after first post
        if ($mybb->settings['adsafp_mode'] == "1") {
            if (($postcounter - 1) % $mybb->settings['postsperpage'] == "0") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($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") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($mybb->settings['adsafp_code'])."</div>";
            }
        }
    
        // Ads after every x posts
        if ($mybb->settings['adsafp_mode'] == "3") {
            if ($postcounter % ($mybb->settings['adsafp_afterxposts']) == "0") {
                $post['adsaf'] = "<div style=\"text-align:".$ads_align.";\">".stripslashes($mybb->settings['adsafp_code'])."</div>";
            }
        }
} 
else
{
$post['adsaf'] = "";
}


I think that will work.
Thanks for the try, didn't work for me. Actvated it put my google code in. No ads showing for anyone
Pages: 1 2 3