######################################################################################### ## ## Mod Title: Xbox Live Gamertag ## Mod Version: 1.0.1 (tested and installed on phpbb 2.0.12) ## Author Defender ## ## Description: This will add a gamertag field to profile, memberlist, and topic view. ## This is perfect for game related forums. Gamertag is the name of your ## xbox name when you play. ## ## ## Install time: 15 minutes ## ## ## ## Files to edit:12 ##admin/admin_users.php ## language/lang_english/lang_main.php ## includes/usercp_viewprofile.php ## includes/usercp_register.php ## includes/usercp_avatar.php ## memberlist.php ##viewtopic.php ## templates/YOUR_TEMPLATE/admin/user_edit_body.tpl ## templates/YOUR_TEMPLATE/profile_add_body.tpl ## templates/YOUR_TEMPLATE/profile_view_body.tpl ##templates/YOUR_TEMPLATE/memberlist_body.tpl ## templates/YOUR_TEMPLATE/viewtopic_body.tpl ## ######################################################################################### ## ## Notes: ## Always and I mean ALWAYS make sure to have a backup before attempting to install. ## ## ## Templates: Be sure to install this properly on YOUR_TEMPLATE. Keep in mind that ## any template you use may NOT be exact to the template changes here. ## ## This mod will adds 1 new column to the 'user' database table and that's it. ## You can see this mod in action at http://www.xbox-forums.com/ please visit. ## ######################################################################################### ## ## Versions: ## ## 1.0.1 ## ######################################################################################### # #-----[ SQL ]------------------------------------------- # # First execute the following sql query via phpmyadmin. ALTER TABLE phpbb_users ADD user_gamertag VARCHAR(255) AFTER user_interests; # # ######################################################################################### # #-----[ OPEN ]------------------------------------------ # # language/lang_english/lang_main.php # #-----[ FIND ]--------------------------------------------------- # $lang['Interests'] = 'Interests'; # #-----[ BELOW ADD ]--------------------------------------------------- # $lang['Gamertag'] = 'Gamertag'; # #-----[ OPEN ]------------------------------------------ # # includes/usercp_viewprofile.php # #-----[ FIND ]--------------------------------------------------- # 'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ', # #-----[ BELOW ADD ]--------------------------------------------------- # 'GAMERTAG' => ( $profiledata['user_gamertag'] ) ? $profiledata['user_gamertag'] : ' ', 'L_GAMERTAG' => $lang['Gamertag'], # #-----[ OPEN ]------------------------------------------ # # includes/usercp_register.php # #-----[ FIND ]--------------------------------------------------- # $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests'); # #-----[ IN-LINE FIND ]--------------------------------------------------- # 'interests' # #-----[ IN-LINE ADD ]--------------------------------------------------- # , 'gamertag' => 'gamertag' # #-----[ FIND ]--------------------------------------------------- # $interests = stripslashes($interests); # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = stripslashes($gamertag); # #-----[ FIND AGAIN]--------------------------------------------------- # $interests = stripslashes($interests); # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = stripslashes($gamertag); # #-----[ FIND ]--------------------------------------------------- # $sql = "UPDATE " . USERS_TABLE . " # #-----[ IN-LINE FIND ]--------------------------------------------------- # $interests) . "' # #-----[ IN-LINE ADD ]--------------------------------------------------- # , user_gamertag = '" . str_replace("\'", "''", $gamertag) . "' # #-----[ FIND ]--------------------------------------------------- # $sql = "INSERT INTO " . USERS_TABLE . " # #-----[ IN-LINE FIND ]--------------------------------------------------- # user_interests # #-----[ IN-LINE ADD ]--------------------------------------------------- # , user_gamertag # #-----[ IN-LINE FIND ]--------------------------------------------------- # $interests) . "' # #-----[ IN-LINE ADD ]--------------------------------------------------- # , '" . str_replace("\'", "''", $gamertag) . "' # #-----[ FIND ]--------------------------------------------------- # $interests = $userdata['user_interests']; # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = $userdata['user_gamertag']; # #-----[ FIND ]--------------------------------------------------- # display_avatar_gallery($mode, $avatar_category # #-----[ IN-LINE FIND ]--------------------------------------------------- # $interests # #-----[ IN-LINE ADD ]--------------------------------------------------- # , $gamertag # #-----[ FIND ]-------------------------- # $template->assign_vars(array( 'USERNAME' => $username, 'CUR_PASSWORD' => $cur_password, 'NEW_PASSWORD' => $new_password, 'PASSWORD_CONFIRM' => $password_confirm, 'EMAIL' => $email, 'CONFIRM_IMG' => $confirm_image, 'YIM' => $yim, 'ICQ' => $icq, 'MSN' => $msn, 'AIM' => $aim, 'OCCUPATION' => $occupation, 'INTERESTS' => $interests, # #-----[ BELOW ADD ]--------------------------------------------------- # 'GAMERTAG' => $gamertag, 'L_GAMERTAG' => $lang['Gamertag'], # #-----[ FIND ]------------------------------------------------------------------ validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature); # #-----[IN-LINE FIND]--------------------------------------------------------------- # $interests # #-----[IN-LINE ADD] ,$gamertag # #-----[ OPEN ]------------------------------------------ # # includes/usercp_avatar.php # #-----[ FIND ]--------------------------------------------------- # function display_avatar_gallery($mode, &$category # #-----[ IN-LINE FIND ]--------------------------------------------------- # &$interests # #-----[ IN-LINE ADD ]--------------------------------------------------- # , &$gamertag # #-----[ FIND ]--------------------------------------------------- # $params = array('coppa', 'user_id' # #-----[ IN-LINE FIND ]--------------------------------------------------- # 'interests' # #-----[ IN-LINE ADD ]--------------------------------------------------- # , 'gamertag' # #-----[ OPEN ]------------------------------------------ # # admin/admin_users.php # #-----[ FIND ]--------------------------------------------------- # $interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : ''; # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = ( !empty($HTTP_POST_VARS['gamertag']) ) ? trim(strip_tags( $HTTP_POST_VARS['gamertag'] ) ) : ''; # #-----[ FIND ]-------------------------------------------- # $interests = htmlspecialchars(stripslashes($interests)); # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = htmlspecialchars(stripslashes($gamertag)); # #-----[ FIND AGAIN ]-------------------------------------------- # $interests = htmlspecialchars(stripslashes($interests)); # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = htmlspecialchars(stripslashes($gamertag)); # #-----[ FIND ]--------------------------------------------------- # $sql = "UPDATE " . USERS_TABLE . " # #-----[ IN-LINE FIND ]--------------------------------------------------- # $interests) . "' # #-----[ IN-LINE ADD ]--------------------------------------------------- # , user_gamertag = '" . str_replace("\'", "''", $gamertag) . "' # #-----[ FIND ]--------------------------------------------------- # $interests = htmlspecialchars($this_userdata['user_interests']); # #-----[ BELOW ADD ]--------------------------------------------------- # $gamertag = htmlspecialchars($this_userdata['user_gamertag']); # #-----[ FIND ]--------------------------------------------------- # $s_hidden_fields .= ''; # #-----[ BELOW ADD ]--------------------------------------------------- # $s_hidden_fields .= ''; # #-----[ FIND ]--------------------------------------------------- # 'INTERESTS' => $interests, # #-----[ BELOW ADD ]--------------------------------------------------- # 'GAMERTAG' => $gamertag, 'L_GAMERTAG' => $lang['Gamertag'], # #-----[ OPEN ]------------------------------------------ # # templates/YOUR_TEMPLATE/profile_add_body.tpl # #-----[ FIND ]--------------------------------------------------- #