############################################################## ## MOD Title: User Administration and Permissions Icons on View Profile ## MOD Author: Powerlord (Ross Bemrose) http://www.vgmusic.com/ ## MOD Description: This will add two icons to the 'view profile' page that will ## take you to the User Management and User Permissions pages. ## The icons will only display when the user is an Administrator. ## This is based on User Administration Link on Profile 1.0.0 by Matthijs ## This cannot be installed on the same forum as the User Administration Link on Profile ## script, due to overlapping changes. ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## Installation Time: 5 Minutes ## Files To Edit: includes/usercp_viewprofile.php, ## language/lang_english/lang_main.php, ## templates/subSilver/profile_view_body.tpl ## Included Files: N/A ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ ############################################################## ## Author Note: ## This MOD Requires that Admin User Management Lookup 1.04+ by Shannado ## be installed prior to this installation. ## You should change all your themes if you use themes other than subSilver ## You should change all your languages if you use languages other than English ## ############################################################## ## 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 ) { $temp_url = append_sid("admin/admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $profiledata['user_id']); $useradmin_img = '' . sprintf($lang['User_admin_for'], $profiledata['username']) . ''; $useradmin = '' . sprintf($lang['User_admin_for'], $profiledata['username']) . ''; $temp_url = append_sid("admin/admin_ug_auth.$phpEx?mode=user&" . POST_USERS_URL . "=" . $profiledata['user_id']); $permcontrol_img = '' . sprintf($lang['Permissions_control_for'], $profiledata['username']), . ''; $permcontrol = '' . sprintf($lang['Permissions_control_for'], $profiledata['username']), . ''; $template->assign_vars(array( 'L_USER_ADMIN' => sprintf($lang['User_admin_for'], $profiledata['username']), 'USERADMIN_IMG' => $useradmin_img, 'USERADMIN' => $useradmin, 'L_USER_PERMISSIONS' => sprintf($lang['Permissions_control_for'], $profiledata['username']), 'PERMCONTROL_IMG' => $permcontrol_img, 'PERMCONTROL' => $permcontrol) ); $template->assign_block_vars("switch_user_admin", array()); } # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]------------------------------------------ # {L_ABOUT_USER} # #-----[ REPLACE WITH ]------------------------------------------ # {L_ABOUT_USER} {USERADMIN_IMG} {PERMCONTROL_IMG} # #-----[ 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 $lang['Permissions_control_for'] = "Permissions Control for %s"; // %s is username # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM