The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Edit User link in postbit UserName popup menu Details »» | |||||||||||||||||||||||||||
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: Code:
<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&u={vb:raw memberinfo.userid}" rel='nofollow'> {vb:rawphrase send_email} </a> </li> </vb:if> Add below that: Code:
<vb:if condition="is_member_of($bbuserinfo, X, Y)"> <li class="left"> <a href="admincp/user.php?do=edit&u={vb:raw memberinfo.userid}" TARGET="_blank" class="siteicon_edit">Edit User </a> </li> </vb:if> In the popupmenu.css template find this code: Code:
.memberaction_body.popupbody li .siteicon_email { background:url({vb:stylevar imgdir_siteicons}/email.png) {vb:stylevar left} 2px no-repeat; } Code:
.memberaction_body.popupbody li .siteicon_edit { background:url({vb:stylevar imgdir_siteicons}/edit.png) {vb:stylevar left} 2px no-repeat; } 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. A big thank you to wilford brimley for updating the code for v4.2. Screenshots
Show Your Support
|
Comments |
#12
|
|||
|
|||
thx for mod.
How can i change the Background of userinfo (see your Screenshot)? |
#13
|
|||
|
|||
That is done with the "Postbit Legacy - Usergroup Backgrounds vb4" mod.
|
#14
|
|||
|
|||
it adds it on another line. how do i fix this? vb 4.2
|
#15
|
|||
|
|||
I'm not sure why it puts the image and the text on different lines. I think it has to do with how they call that area now with the different classes in popupmenu.css.
I've not been able to figure out how to add a class for "edit user" and get it to display properly. You can simply remove the image code in my edit and it will display the text "Edit User" aligned correctly though. |
#16
|
|||
|
|||
right on. ill try to fix it.
|
#17
|
|||
|
|||
in popupmenu css find
Code:
.memberaction_body.popupbody li .siteicon_email { background:url({vb:stylevar imgdir_siteicons}/email.png) {vb:stylevar left} 2px no-repeat; } Code:
.memberaction_body.popupbody li .siteicon_edit { background:url({vb:stylevar imgdir_siteicons}/edit.png) {vb:stylevar left} 2px no-repeat; } Code:
<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> Code:
<vb:if condition="is_member_of($bbuserinfo, 6)"> <li class="left"> <a href="admincp/user.php?do=edit&u={vb:raw memberinfo.userid}" TARGET="_blank" class="siteicon_edit">Edit User </a> </li> </vb:if> |
#18
|
|||
|
|||
update this thread. it works on 4.2 now. if you dont want to ill just resubmit it and credit you.
|
#19
|
|||
|
|||
Thanks Wilford, I just tried it in a new style on my site and it works fine. I'll update this thread and give you credit for the updated code.
It looks like I was really close to getting the code correct when I was trying to fix it my self. I had the same popupmenu code you do, but my tweaked memberaction_dropdown code was just slightly off and it was not displaying the whole image and text for the Edit link (it only showed the top portion of it). Thanks again. |
#20
|
|||
|
|||
sure thing. i can usually figure stuff out if i have a headstart on were to do it. i just dont know how to do coding from scratch ha.
|
#21
|
|||
|
|||
Yeah, I'm the same way. lol
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|