################################################################# ## Mod Title: User Administration Link on Profile ## Mod Version: 1.0.0 ## Author: Matthijs ## Description: This will add a link to the User Administration ## of the Administration Panel on the 'view ## profile' page. Will only display the link when ## user is ADMIN. ## ## Installation Level: Easy ## Installation Time: 3 Minutes ## Files To Edit: includes/usercp_viewprofile.php, ## language/lang_english/lang_main.php, ## templates/subSilver/profile_view_body.tpl ## Included Files: N/A ################################################################# ## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites ################################################################# ## ## Author Note: ## You should change all your languages and themes if you use others ## then English and subSilver. ## ################################################################# ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################# # #-----[ OPEN ]------------------------------------------ # includes/usercp_viewprofile.php # #-----[ FIND ]------------------------------------------ # $page_title = $lang['Viewing_profile']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); # #-----[ AFTER, ADD ]------------------------------------------ # if( $userdata['user_level'] == ADMIN ) { $template->assign_vars(array( 'L_USER_ADMIN' => sprintf($lang['User_admin_for'], $profiledata['username']), 'U_ADMIN_PROFILE' => append_sid("admin/admin_users.$phpEx?mode=edit&" . POST_USERS_URL . '=' . $profiledata['user_id'])) ); $template->assign_block_vars("switch_user_admin", array()); } # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]------------------------------------------ # {L_ABOUT_USER} # #-----[ REPLACE WITH ]------------------------------------------ # {L_ABOUT_USER}  ({L_USER_ADMIN}) # #-----[ OPEN ]------------------------------------------ # languages/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['About_user'] = "All about %s"; // %s is username # #-----[ AFTER, ADD ]------------------------------------------ # $lang['User_admin_for'] = "User Administration for %s"; // %s is username # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM