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'}
</a>
</div>
{/if}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>
{/if}
Hi,
any way for do this with v3 ?
I check block.html.php and the IF statement is different.
there is ELSE.
and {if true || isset($sDeleteBlock)}
I am not sure if I can delete this.
Can you post another similar article for v3?
Thanks
it did work for me. i had to hunt down the paths, but once i did it, the block delete button disappeared on both profile and dashboard
This doesn't actually work. Can somebody explain to me why?
I have edited these files exactly as described AND cleared my sites cache. Big surprise, you can STILL DELETE BLOCKS.
Please provide a real solution for this problem Raymond.
Eventually found it after alot of searching :/
To help others..
the paths are:
theme/frontend/default/template/block.html.php
and
/module/theme/template/default/block/design.html.php
Can somebody post the full path to these files, im looking around in the phpfox folder labyrinth on my server and cant find block.html.php or design.html.php
help ![]()
Is there a plugin for this instead or can we manually add a new setting in acp trigger on/off globally the function?
DingoMan, i have removed both the codes, i can no longer remove any blocks in either profile or dashboard, i think this covers both profile and dashboard logged in as a test member






