Store
Community Documentation

v3 Knowledgebase

Removing Status Share Links via Template Override

We do have this feature request to allow for disabling of the status share links:

statussharelinks.png

But rather than wait, and if you don't want to mess with the database to remove them, you can remove them from the template.

Since we don't want to edit source and void support, we will do this with a template override folder.

First, make sure you either have a custom template or make a custom template and style, or make a custom template and style .

Now go into the feed folder and copy the:

module/feed/template/default/block/form.html.php

into a folder you make for your own template

module/feed/template/yourtemplatename/block/form.html.php

We will now work in the file

module/feed/template/yourtemplatename/block/form.html.php

Open the form.html.php file you just made.

Find around line 29

{foreach from=$aFeedStatusLinks item=aFeedStatusLink name=feedlinks}
			
			{if $phpfox.iteration.feedlinks == 3 && Phpfox::getService('profile')->timeline()}
			<li><a href="#" rel="view_more_link" class="timeline_view_more js_hover_title"><span class="js_hover_info">{phrase var='feed.view_more'}</span></a>
				<ul class="view_more_drop">
			{/if}
			
			
			
			{if isset($aFeedCallback.module) && $aFeedStatusLink.no_profile}
			{else}
				{if ($aFeedStatusLink.no_profile && !isset($bFeedIsParentItem) && (!defined('PHPFOX_IS_USER_PROFILE') || (defined('PHPFOX_IS_USER_PROFILE') && isset($aUser.user_id) && $aUser.user_id == Phpfox::getUserId()))) || !$aFeedStatusLink.no_profile}
					<li>
						<a href="#" style="background-image:url('{img theme='feed/'$aFeedStatusLink.icon'' return_url=true}'); background-repeat:no-repeat; background-position:{if Phpfox::getService('profile')->timeline() && $phpfox.iteration.feedlinks >= 3}5px center{else}center left{/if};" rel="global_attachment_{$aFeedStatusLink.module_id}"{if $aFeedStatusLink.no_input} class="no_text_input"{/if}>
							<div>
								{$aFeedStatusLink.title|convert}
								{if $aFeedStatusLink.is_frame}
									<span class="activity_feed_link_form">{if $aFeedStatusLink.module_id == 'video' && Phpfox::getParam('video.convert_servers_enable')}{$sVideoServerUrl}{else}{url link=''$aFeedStatusLink.module_id'.frame'}{/if}</span>
								{else}
									<span class="activity_feed_link_form_ajax">{$aFeedStatusLink.module_id}.{$aFeedStatusLink.ajax_request}</span>
								{/if}
								<span class="activity_feed_extra_info">{$aFeedStatusLink.description|convert}</span>
							</div>
							<div class="drop"></div>
						</a>
					</li>
				{/if}
			{/if}
			
			{if $phpfox.iteration.feedlinks == count($aFeedStatusLinks) && Phpfox::getService('profile')->timeline()}
				</ul>
			</li>			
			{/if}			
			
			{/foreach}


Remove all of that code.

Clear your site cache from the server in file/cache but leave index.html

Now check your site, being sure you are using the same template that we just made the override for.

I have this on all of my sites and it works with mine from v3.7 and up.

The good thing here is we used a template override folder so if something did not work for you, all you do is remove that folder and everything is back to normal.

Should the code change in future versions, let me know to update this.

Note that when you upgrade, be sure to first check the latest form.html.php file for changes that you may need to add to this override file.