vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Administrative and Maintenance Tools - Edit User link in postbit UserName popup menu (https://vborg.vbsupport.ru/showthread.php?t=256235)

Mobo 12-30-2010 10:00 PM

Edit User link in postbit UserName popup menu
 
1 Attachment(s)
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&amp;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;
}

And add below that:

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.

sulasno 12-31-2010 07:48 AM

tagged and thanks

save the icon as edit.png ?

Mobo 12-31-2010 07:53 AM

Yes, save it as edit.png

BadgerDog 12-31-2010 11:21 AM

Installed as a test on v4.04pl1 ... :)

After updating template and adding PNG file as described, this function doesn't appear anywhere in drop down menu, but thanks anyway ...

Regards,
Doug

Mobo 12-31-2010 11:39 AM

Did you remember to enter in the Usergroup ID numbers?

Dr.osamA 12-31-2010 11:51 AM

installed

5 stars

keep it up bro

happy new yaer

BadgerDog 12-31-2010 12:56 PM

Quote:

Originally Posted by Mobo (Post 2141817)
Did you remember to enter in the Usergroup ID numbers?

Yes ...

Example ..

"is_member_of($bbuserinfo, 5, 6, 7)">

Not sure why it just doesn't appear, but perhaps it's because of the earlier version of vb4 ...

Thanks any way ..

Regards,
Doug

Mobo 01-01-2011 10:35 AM

Might be the older version of vB as you say.

NovoCiv 01-04-2011 05:01 AM

This will save me a bunch of time. Thanks!

Mobo 01-05-2011 04:48 AM

I have to edit every member that joins my site, so I need a quick way to get to that page. Glad it will save you some time as well.


All times are GMT. The time now is 09:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01089 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete