Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Edit User link in postbit UserName popup menu Details »»
Edit User link in postbit UserName popup menu
Version: 1.1, by Mobo Mobo is offline
Developer Last Online: Nov 2017 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.0 Rating:
Released: 12-30-2010 Last Update: Never Installs: 17
Template Edits
Re-useable Code Additional Files  
No support by the author.

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.

Screenshots

File Type: jpg EditUser.jpg (45.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-10-2011, 10:31 AM
Konsolenheld Konsolenheld is offline
 
Join Date: Aug 2010
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx for mod.

How can i change the Background of userinfo (see your Screenshot)?
Reply With Quote
  #13  
Old 01-10-2011, 10:58 AM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is done with the "Postbit Legacy - Usergroup Backgrounds vb4" mod.
Reply With Quote
  #14  
Old 08-26-2012, 04:35 AM
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it adds it on another line. how do i fix this? vb 4.2
Reply With Quote
  #15  
Old 08-26-2012, 05:53 AM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 08-26-2012, 06:15 AM
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

right on. ill try to fix it.
Reply With Quote
  #17  
Old 08-26-2012, 06:37 AM
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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; 
}
after add
Code:
.memberaction_body.popupbody li .siteicon_edit { 
	background:url({vb:stylevar imgdir_siteicons}/edit.png) {vb:stylevar left} 2px no-repeat; 
}
change original code on
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>
to

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>
Reply With Quote
  #18  
Old 08-26-2012, 06:45 AM
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

update this thread. it works on 4.2 now. if you dont want to ill just resubmit it and credit you.
Reply With Quote
  #19  
Old 08-26-2012, 07:20 AM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 08-26-2012, 06:16 PM
wilford brimley wilford brimley is offline
 
Join Date: Apr 2012
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #21  
Old 08-26-2012, 09:20 PM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I'm the same way. lol
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:08 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.04464 seconds
  • Memory Usage 2,320KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete