PDA

View Full Version : Edit User link in postbit UserName popup menu



admin
08-01-2011, 04:30 PM
This is a simple template modification that a couple of members over on vB.com and Lynne helped me sort out. Just thought I'd post it here to give back to the community a little.

This will add an icon and link in the popup menu in postbit when you click on the User's name. The link is only accessible by the user groups you choose and opens the Admin User Manager page for that user.

To install:

ACP> Styles & Templates> Search in Templates for "memberaction_dropdown"

In that template find:

<vb:if condition="$show['emaillink']">
<li class="right">
<img src="{vb:stylevar imgdir_siteicons}/email.png" alt="" />
<a href="sendmessage.php?{vb:raw session.sessionurl}do=mailmember&amp;u={vb:raw memberinfo.userid}" rel='nofollow'>
{vb:rawphrase send_email}
</a>
</li>
</vb:if>

Add below that:

<vb:if condition="is_member_of($bbuserinfo, X, Y)">
<li class="left">
<img src="{vb:stylevar imgdir_siteicons}/edit.png" alt="" />
<a href="admincp/user.php?do=edit&u={vb:raw memberinfo.userid}" TARGET="_blank">Edit User
</a>
</li>
</vb:if>

Change the X and Y in the above code to the Usergroup IDs that you want to allow access (those groups will have to have admin rights to edit users as well).

You will also need to upload the image I've attached to your images/site_icon directory.

Screenshots:
http://img.photo.zing.vn/file_uploads/gallery/1024x768/2011/01/08/04/99511294479001.jpg