View Single Post
  #53  
Old 08-31-2009, 02:20 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by biome.pat View Post
Got this working in 3.8.3:

After installing, create a new plugin:

Product: Username Management Addon - History in Profile
Hook location: member_profileblock_fetch_unwrapped
Title: Put username history in stats tabs
Plugin PHP:
PHP Code:
// Include the function library
require_once(DIR '/includes/functions_mh_unm.php');

// Retrieve the history, please note that if called multiple times, also info of other users might be returned
// New user request is added tointernal cache, and full cache is returned
$mh_unm_uph_hist mh_unm_fetch_username_history($userinfo['userid'], truetruetrue);

// Retrieve info about current member from the returned array
$user_hist $mh_unm_uph_hist[$userinfo['userid']];

// If we have found any history, process
if ($user_hist)
{
    
// Process each history row for this user
    
foreach ($user_hist AS $key=>$user_history)
    {
        eval(
'$mh_unm_uph_historybits .= "' fetch_template('mh_unm_uph_historybit') . '";');
    }
    
// Spit out the results
    
eval('$template_hook[profile_stats_pregeneral] .= "' fetch_template('mh_unm_uph_history') . '";');

Enable this and disable the plugin "Add Username History to Public Profile", since this replaces it. Username history will show up in the stats tab, and will still respect the "Can View Username Histroy" permission.

As far as I know, there's quite a bit of slowdown from the queries that make username history show up mouseover in a thread. If you want to just have it show up in the profile, just disable the plugin "Add Username history to postbit(legacy)" from the Username Management product.

Cheers!


I have just tried this and nothing shows up in the stats tab....
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03505 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete