We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Hiding 'Block' button in User page | Forum

Alican
Alican Mar 2 '14
I need to Hide or Remove 'Block' button in domain.com/user/ page. I will be glad to have a solution.
Arash
Arash Mar 2 '14
Aha! I know the soution, and you will have it after I'm done working.


 Now I wonder why you would remove that option from your users?
I think that would just annoy your members.

Alican
Alican Mar 3 '14
Thank you again Arash! I will be waiting for your solution :)


Well, I'm working on a specific marriage-dating website and I wan't to use Abuse Report plugin instead of Block feature.

Arash
Arash Mar 3 '14

Fair enough of an anser!:D


Easiest way would be to go to \ow_system_plugins\base\views\components\block_user.html


and find this line, (line 4):


{decorator name="button" id="baseBlockButton" type="submit" buttonName="user_block_btn" class="ow_ic_delete ow_red" langLabel="base+user_block_btn_lbl"}

 

and make a comment out of it [html-style]:

<!-- This is a comment -->


The code would end up like this

<!-- {decorator name="button" id="baseBlockButton" type="submit" buttonName="user_block_btn" class="ow_ic_delete ow_red" langLabel="base+user_block_btn_lbl"} (block button not showing) -->


This should remove the button without you having to middle with any code. Just remember that to redo it when you update, and that you need to refresh your smarty cache to make the changes seen.


Yours 

Arash

Alican
Alican Mar 4 '14
Hmm, Thank you Arash but it didn't work.


I made the change in file and cleared the cache (also started working on DEV mode to be sure) but it apperantly doesn't work, because Block button still viewable there.

Arash
Arash Mar 4 '14
that's strange, because it's the only place i found it beeing witten. Are you logged in as admin? I think it prints block button differently then for ordinary users when to shink about it. Do you get the <!-- Somwhere close to the object if you inspect it?
Alican
Alican Mar 4 '14
yeah, strange, i agree.. i logged in as an admin and as a user and tried both, but block button is still visible in either scenario. I think I don't see any comment code anywhere around when i inspect the object.


well, it comes to me like javascript is responsible from this or it overrides. i don't know. i will keep on searchin..

Daisy Team
Daisy Mar 13 '14
Alican, you can hide this button via this file:

1.6.0. version: /ow_system_plugins/base/classes/event_handler.php
1.5.3. version: /ow_system_plugins/base/init.php