PDA

View Full Version : Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..)



PandavB
11-02-14, 03:28 PM
Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..) - Version 1.30

Install:
If you use TMS you only have to install the product!

1. Upload product-kolbi_modtools.xml via Add-On & Pluginmanager
2. Edit memberaction_dropdown (see below)

Search in the template memberaction_dropdown for:
HTML Code:

{vb:rawphrase send_email}
</a>
</li>
</vb:if>
and add after:

HTML Code:

<vb:if condition="is_member_of($memberinfo, 1, 2, 3, 4, 8) AND is_member_of($vbulletin->userinfo, 5, 6, 7)">
<vb:if condition="$memberinfo['permissions']['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup']">
<li class="left"><a href="modcp/banning.php?do=banuser&userid={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/moderation.png" alt="" /> {vb:rawphrase kolbi_banuser}</a></li>
</vb:if>
<vb:if condition="!($memberinfo['permissions']['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup'])">
<li class="left"><a href="modcp/banning.php?do=liftban&userid={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/subscribe.png" alt="" /> {vb:rawphrase kolbi_unbanuser}</a></li>
</vb:if>
<li class="right"><a href="modcp/user.php?do=editsig&userid={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/settings.png" alt="" /> {vb:rawphrase kolbi_editsignature}</a></li>
<li class="left"><a href="modcp/user.php?do=avatar&userid={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/settings.png" alt="" /> {vb:rawphrase kolbi_editavatar}</a></li>
<li class="right"><a href="modcp/user.php?do=profilepic&userid={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/settings.png" alt="" /> {vb:rawphrase kolbi_editprofilpic}</a></li>
<li class="left"><a href="admincp/user.php?do=edit&u={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/settings.png" alt="" /> {vb:rawphrase kolbi_edituser}</a></li>
<li class="right"><a href="modcp/user.php?do=reputation&u={vb:raw memberinfo.userid}"><img src="{vb:stylevar imgdir_siteicons}/settings.png" alt="" /> {vb:rawphrase kolbi_editrenommee}</a></li>
</vb:if>
3. You are done.

Notice:

Modcp Name: If you've rename your modcp folder in your server, please change a href="modcp/ in this code.

Admincp Name: If you've rename your admincp folder in your server, please change a href="admincp/ in this code.


First Condition: is_member_of($memberinfo, 1, 2, 3, 4, 8)
Here you define the usergrous there the extra modoptions should be shown.
Here default are usergroups: 1, 2, 3, 4, 8

Second Condition: in_array($bbuserinfo['usergroupid'], array(5,6,7))
In this example, only admins, supermoderators and moderators are able to view this modification.

1620

Please click INSTALL

Regards
Matthias Kolb
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>

Changelog:

version 1.30:
corrected 2 phrases - Thanks to zeroality

version 1.20:
fully phrased
product included
TMS support included

version 1.16:
added Edit renommee

version 1.15:
added Edit this user

version 1.14:
phrased (expect unban link )

version 1.13:
added icons

version 1.12:
ban link only for unbanned users visible
unban link only for banned users visible

version 1.11:
added condition on which usergroups this modification is shown

Planned for future releases:
Usergroups will be selected in AdminCP
TMS version