############################################################## ## MOD Title: Force ProfileUpdate ## MOD Author: mad-manne < phpbb@mad-manne.de > (Manfred Hoffmann) http://phpbb.mad-manne.de ## MOD Description: This enables an administrator to force all users to update their user-profile ## MOD Version: 0.1.0 ## ## Installation Level: (Easy) ## Installation Time: 10 Minutes ## Files To Edit: 5 ## index.php ## includes/usercp_register.php ## language/lang_deutsch/lang_main.php ## templates/subSilver/overall_header.tpl ## templates/subSilver/profile_add_body.tpl ## ## Included Files: N/A ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## Dies ist die "eingedeutsche" Version, da der MOD zunächst auf dem deutschen Board veröffentlicht wird! ## ## This MOD can especially be useful if you add new mandatory fields to your user-profiles ## and you want to force existing users to update their profile. ############################################################## ## MOD History: ## ## 2005-09-19 - Version 0.1.0 ## - Initial ALPHA-release on the german www.phpbb.de-board ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ SQL ]------------------------------------------ # ALTER TABLE `phpbb_users` ADD `user_force_profile_update` TINYINT( 1 ) DEFAULT '0' NOT NULL ; # #-----[ OPEN ]------------------------------------------ # index.php # #-----[ FIND ]------------------------------------------ # // // End session management // # #-----[ AFTER, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] starts here ... // Check to see, if the current user is forced to update his profile ... // and if so --> redirect him there and ask him to update! if ( $userdata['session_logged_in'] AND $userdata['user_force_profile_update'] ) { redirect(append_sid("profile.$phpEx?mode=editprofile&forceupdate=1", true)); } // ... inserted MOD-Code: [Force ProfileUpdate] ends here! # #-----[ OPEN ]------------------------------------------ # includes/usercp_register.php # #-----[ FIND ]------------------------------------------ # // // Check and initialize some variables if needed // # #-----[ BEFORE, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] starts here ... $forced_update = FALSE; if ( isset($HTTP_POST_VARS['forceupdate']) || isset($HTTP_GET_VARS['forceupdate']) ) { if ( isset($HTTP_POST_VARS['forceupdate']) AND intval($HTTP_POST_VARS['forceupdate']) == 1 ) { $forced_update = TRUE; } elseif ( isset($HTTP_GET_VARS['forceupdate']) AND intval($HTTP_GET_VARS['forceupdate']) == 1 ) { $forced_update = TRUE; } } // ... inserted MOD-Code: [Force ProfileUpdate] ends here! # #-----[ FIND ]------------------------------------------ # $sql = "UPDATE " . USERS_TABLE . " # #-----[ BEFORE, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] can be found #INLINE# in following line(s)! # #-----[ FIND ]------------------------------------------ # SET " . $username_sql . # #-----[ IN-LINE FIND ]------------------------------------------ # , user_popup_pm = $popup_pm # # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # , user_force_profile_update = 0 # #-----[ FIND ]------------------------------------------ # $template->assign_block_vars('switch_edit_profile', array()); } # #-----[ AFTER, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] starts here ... if ( $forced_update ) { $template->assign_block_vars('switch_forced_update', array()); } // ... inserted MOD-Code: [Force ProfileUpdate] ends here! # #-----[ FIND ]------------------------------------------ # 'L_EMAIL_ADDRESS' => $lang['Email_address'], # #-----[ AFTER, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] starts here ... 'L_FORCED_UPDATE' => $lang['Profile_forced_update'], // ... inserted MOD-Code: [Force ProfileUpdate] ends here! # #-----[ OPEN ]------------------------------------------ # language/lang_deutsch/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['Items_required'] # #-----[ BEFORE, ADD ]------------------------------------------ # // inserted MOD-Code: [Force ProfileUpdate] starts here ... $lang['Profile_forced_update'] = 'Die Benutzerprofile wurden um neue Pflichtfelder erweitert, weshalb du bitte dein Profil aktualisieren musst.
Entschuldige die Unannehmlichkeiten und Danke für deine Mitarbeit!'; // ... inserted MOD-Code: [Force ProfileUpdate] ends here! # #-----[ OPEN ]------------------------------------------ # templates/subSilver/overall_header.tpl # #-----[ FIND ]------------------------------------------ # --> # #-----[ AFTER, ADD ]------------------------------------------ # # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_add_body.tpl # #-----[ FIND ]------------------------------------------ # {L_REGISTRATION_INFO} # #-----[ AFTER, ADD ]------------------------------------------ # {L_FORCED_UPDATE} # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM