+1-209-266-2427, +91-981-872-0510

Hiding Feed Share From Menu Items

3 users rated this post

If you are looking for a way to remove some or all of the share items in the feed menu. (Photo, Blog, Links).  Data66 had a good template solution in the knowledge base, but there are some advantages to using a plugin.

Create a plugin either by file or admincp. The admincp method is shown below.

Make a plugin:
Product: Core or phpfox
Module: feed
Title: Select Share Menu Items
Hook: feed.service_feed_getsharelinks__end
Active: Yes
PHP Code:

$aModSelect=array();

//Change each item to false to remove from menu
//Change each item to true to add to menu
$aModSelect[‘photo’]=true;
$aModSelect[‘video’]=false;
$aModSelect[‘link’]=false;
$aModSelect[‘poll’]=true;
$aModSelect[‘blog’]=true;
$aModSelect[‘music’]=false;

foreach ($aLinks as $iKey => $aLink)
{
if(!$aModSelect[$aLink[‘module_id’]]){unset($aLinks[$iKey]);}
}

Make sure you clear your cache after activating the plugin. Alternately you can delete the file /file/cache/feed_share_link.php

Share this post
FacebookTwitterGoogle PlusLinkedinPrintEmail
Rate this post

One thought on “Hiding Feed Share From Menu Items”

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular