Forums

Random / Rotating Ads V2
Ad In page and post part 2 (2 posts)

  1. zobmaster
    Member
    Posted 4 months ago #

    Hi,

    I started this new topic because the old one is closed: http://wordpress.org/support/topic/plugin-random-rotating-ads-v2-ads-in-post-content?replies=7

    I did what mentioned, and it works partially. I can insert an ad into a page or a post, BUT if I want to add a new ad or edit anything, I can't save it. I have to start a new campaign all over again.

    this is the code I added taken from the old post.

    function datafeedr_ads_filter($content) {
    	preg_match_all('/\[ad-([^\]]+)\]/six', $content, $matches);
    
    	if(!empty($matches)) {
    		$codes = $matches[0];
    		$ids = $matches[1];
    
    		for($i = 0; $i < count($codes); $i++) {
    			$code = $codes[$i];
    			$id = $ids[$i];
    			$ad = '';
    			if (function_exists('dfrads')) {
    				$ad = dfrads($id);
    			}
    			$content = str_replace($code, $ad, $content);
    		}
    
    		return $content;
    	}
    
    	return $content;
    }
    add_filter('the_content', 'datafeedr_ads_filter');

    http://wordpress.org/extend/plugins/datafeedr-ads/

  2. culling
    Member
    Posted 4 months ago #

    I am having a simular problem, I updated both of my WordPress blogs to 3.3.1 yesterday. The ad Manager I have been using is Advertisement manager and it does not allow me to update to new ads. However if you do not mess with it, it will push the old ads just fine. I removed it and tried adding two or three other advertisement addons and they would not work. The problem: every time I tried to add Adsense ads to them is they would not save.

    This may just be a problem with the apps not being updated to work with WordPress 3.3.1 if that is the case please let me know. I have reinstalled Advertisement Manager and my old ads are working for now.

    Thanks

    culling

Reply

You must log in to post.

About this Plugin

About this Topic