Community Documentation

v3 Knowledgebase

Stop Users From Removing Profile Blocks

With phpFox v2.0.7 or lower users can remove blocks from their profile and there isn't a setting yet to stop them from doing this in case you want everyone to have all the blocks visible at all times.

You can modify the 2 template files from your AdminCP to hide the ability to remove blocks.

First, edit the Global Template "block.html.php". Open the file and look for and remove:
{if isset($sDeleteBlock)}
	<div class="js_edit_header_bar js_edit_header_hover" style="display:none;">
		<a href="#" onclick="if (confirm('{phrase var='core.are_you_sure' phpfox_squote=true}')) {left_curly} $(this).parents('.block:first').remove(); $.ajaxCall('core.hideBlock', 'type_id={$sDeleteBlock}&block_id=' + $(this).parents('.block:first').attr('id')); {right_curly} return false;" title="{phrase var='core.remove_this_block'}">
			{img theme='misc/application_delete.png' alt='' class='v_middle'}

Next, go to the module theme and edit the block "design.html.php". Look for and remove:
{if isset($aBlocks)}
<li><a href="#block">{img theme='misc/shape_square_add.png' class='v_middle'} {phrase var='theme.blocks'}</a></li>