• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • 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
#1
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

Jamie

Well-known member
#9
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
 
#11
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!
 

Anthony Parsons

Well-known member
#12
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...