• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add ban user link to profile page

Allan

Well-known member
Add ban user link to profile page
_____________________
This mod add a link for ban user directly on profil page
Inspire to this mod: Add Edit User Button to Profile page

  • In "member_view" template, find:
Code:
<div class="followBlock">
  • Replace with:
Code:
<xen:if is="{$visitor.is_admin}">
<a href="admin.php?banning/users/{$user.username}.{$user.user_id}/add">{xen:phrase ban_user}</a><br />
</xen:if>

PS: Only show for administrators
 

Attachments

  • ban-profil.gif
    ban-profil.gif
    16.4 KB · Views: 62
Replace
Code:
<xen:if is="{$visitor.is_admin}">
by
Code:
<xen:if is="{$visitor.is_moderator}">


So here's a question.. :)

How can you combine these two statement so if either an admin or a moderator viewed this they would see the option?

Jamie
 
So here's a question.. :)

How can you combine these two statement so if either an admin or a moderator viewed this they would see the option?

Jamie
test this:
Code:
<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
 
Replace with:
Code:
<xen:if is="{$visitor.is_admin}">
<a href="admin.php?banning/users/{$user.username}.{$user.user_id}/add">{xen:phrase ban_user}</a><br />
</xen:if>

This is incorrect, you should be adding this after the div, otherwise you really screw things up, so you're looking at something like
Code:
<div class="followBlock">
<xen:if is="{$visitor.is_admin}">
<a href="admin.php?banning/users/{$user.username}.{$user.user_id}/add">{xen:phrase ban_user}</a><br />
</xen:if>

Otherwise you have a </div> that's not handled properly, and that's a whole different mess.

Nice modification though, thanks!
 
If you want admins and mods to ban, then you can also just change the spam management settings to zero, so the spam link is available from every user, not removed after meeting the default or set criteria, and enable the permission for mods to use the spam functions.

Nice mod though...
 
Top Bottom