• Resolved Forson

    (@forson)


    AtContent plugin has a conflict with https://www.ads-software.com/plugins/agentpress-listings/

    When AtContent is installed, it removes the tab of the listings plugin from the admin console. I fixed by making the changes below but with the latest version of AtContent, my below fix brought back the listings tab but the AtContent tabs were missing.

    atcontent/atcontent.php

    add_menu_page( ‘CopyLocator’, ‘CopyLocator’, ‘publish_posts’, ‘atcontent/copylocator.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ), 6 );
    
    add_menu_page( ‘Guest Posts’, ‘Guest Posts’, ‘publish_posts’, ‘atcontent/guestpost.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ), 6 );
    
    add_menu_page( ‘Reposting’, ‘Reposting’, ‘publish_posts’, ‘atcontent/repost.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ), 7 );
    
    changed to
    
    add_menu_page( ‘CopyLocator’, ‘CopyLocator’, ‘publish_posts’, ‘atcontent/copylocator.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ) );
    
    add_menu_page( ‘Guest Posts’, ‘Guest Posts’, ‘publish_posts’, ‘atcontent/guestpost.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ) );
    
    add_menu_page( ‘Reposting’, ‘Reposting’, ‘publish_posts’, ‘atcontent/repost.php’, ’’, plugins_url( ‘assets/logo.png’, FILE ) );


    [please use the code buttons and links correctly]

    https://www.ads-software.com/plugins/atcontent/

Viewing 3 replies - 1 through 3 (of 3 total)
  • We had a similar problem withe the Repost plugin[*]

    The issue is that menu positions a limited namespace and if you add something at position 5 it might conflict withe another plugin. The trick is to find a menu key that’s not in use. Here is the code we use:

    /**
    		 * This is a weirdness that needs an explanation, there is no easy way to say "just after
    		 * the posts menu item" so we have to specify an offset into the menu array.  Now if we use an
    		 * int there is a very high probability that it will conflict with another menu and one or other
    		 * will get stomped.  To avoid this we use a float, but it's not that simple becasue if we just
    		 * use a float php will turn it into an int when the array gets set so we have to use a float in the
    		 * form of a string and it has to be a number that nobody else in likly to be using to avoid a collision.
    		 *
    		 * So we look in the menu array (ugh!) see what is used starting from the numbr 5 "Posts" entry
    		 * and add a small amount until we find a free key.
    		 *
    		 * Easy eh!
    		 **/
    		global $menu;
    		$menukey = 5.0;
    		while(array_key_exists((string) $menukey,$menu)) {
    			$menukey += 0.0000000001;
    		}
    		$menukey = (string) $menukey;  //If it's not a string it gets rounded to an int!
    		add_menu_page(
                            __(self::NAME . " Syndication"),
                            __("Content Feeds"),
                            "edit_posts",
    			self::ID . "-content",
    			array(&$this, 'repost_content'),
                            plugins_url(  "/images/repost_bttn_tiny.png", __FILE__),
                            $menukey
    		);

    enjoy!

    [* I have a trigger on posts that mention Repost which is how I saw this)].

    Plugin Author Vadim Novitskiy

    (@vadnov)

    Hi guys!

    Thanks for your feedback! We will resolve this issue soon ??

    Plugin Author Vadim Novitskiy

    (@vadnov)

    Hi again!

    I’m grad to say problem is resolved! ??

    Thanks a lot for this feedback!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Major AtContent Conflict with AgentPress Listings Plugin’ is closed to new replies.