############################################################## ## MOD Title: phpBB 2.0.22 to phpBB 2.0.23 Code Changes ## MOD Author: Acyd Burn < N/A > (Meik Sievertsen) N/A ## MOD Description: ## ## ## These are the Changes from phpBB 2.0.22 to phpBB 2.0.23 summed up into a little ## Mod. This might be very helpful if you want to update your Board and have ## installed a bunch of Mods. Then it's normally easier to apply the Code Changes ## than to install all Mods again. ## ## When you find a 'AFTER, ADD'-Statement, the Code have to be added after the last ## line quoted in the 'FIND'-Statement. ## When you find a 'BEFORE, ADD'-Statement, the Code have to be added before the ## first line quoted in the 'FIND'-Statement. ## When you find a 'REPLACE WITH'-Statement, the Code quoted in the ## 'FIND'-Statement have to be replaced completely with the quoted Code in the ## 'REPLACE WITH'-Statement. ## ## When you find more than one 'FIND'-Statement it just means that you go down the ## code within the order of the 'FIND'-Statements, if you found the lines for the ## first 'FIND'-Statement, you continue to search the lines for the second ## 'FIND'-Statement. The last 'FIND'-Statement includes the codeblock to work ## with. ## ## For a comprehensive explanation about installing MODs, please visit this url: ## http://www.phpbb.com/kb/article/how-to-install-mods/ ## ## After you have finished this tutorial, you have to upload the ## install/update_to_latest.php file, execute it and then delete it from your ## webspace. ## ## ## ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## Installation Time: 20 Minutes ## Files To Edit: ## admin/admin_forums.php ## admin/admin_ranks.php ## admin/admin_smilies.php ## admin/admin_styles.php ## admin/admin_ug_auth.php ## admin/admin_users.php ## admin/admin_words.php ## groupcp.php ## includes/functions.php ## includes/functions_admin.php ## includes/functions_validate.php ## language/lang_english/lang_admin.php ## privmsg.php ## templates/subSilver/admin/styles_edit_body.tpl ## templates/subSilver/posting_body.tpl ## ## Included Files: install/update_to_latest.php ## 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: ## ## ############################################################## ## MOD History: ## ## 2008-02-10 - Version 1.0.0 ## - first release ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]--------------------------------------------- # admin/admin_forums.php # #-----[ FIND ]--------------------------------------------- # Line 624 $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id']; # #-----[ REPLACE WITH ]--------------------------------------------- # $vote_ids .= (($vote_ids != '') ? ', ' : '') . $row['vote_id']; # #-----[ OPEN ]--------------------------------------------- # admin/admin_ranks.php # #-----[ FIND ]--------------------------------------------- # Line 32 $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false; # #-----[ REPLACE WITH ]--------------------------------------------- # $cancel = ( isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel']) ) ? true : false; # #-----[ OPEN ]--------------------------------------------- # admin/admin_smilies.php # #-----[ FIND ]--------------------------------------------- # Line 34 // // Load default header // if( isset($HTTP_GET_VARS['export_pack']) ) { if ( $HTTP_GET_VARS['export_pack'] == "send" ) { $no_page_header = true; } } $phpbb_root_path = "./../"; require($phpbb_root_path . 'extension.inc'); $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false; $no_page_header = $cancel; # #-----[ REPLACE WITH ]--------------------------------------------- # $phpbb_root_path = "./../"; require($phpbb_root_path . 'extension.inc'); $cancel = ( isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel']) ) ? true : false; $no_page_header = $cancel; // // Load default header // if ((!empty($HTTP_GET_VARS['export_pack']) && $HTTP_GET_VARS['export_pack'] == 'send') || (!empty($_GET['export_pack']) && $_GET['export_pack'] == 'send')) { $no_page_header = true; } # #-----[ OPEN ]--------------------------------------------- # admin/admin_styles.php # #-----[ FIND ]--------------------------------------------- # Line 39 $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE; # #-----[ REPLACE WITH ]--------------------------------------------- # $confirm = (isset($HTTP_POST_VARS['confirm']) || isset($_POST['confirm'])) ? TRUE : FALSE; $cancel = (isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel'])) ? TRUE : FALSE; $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || !empty($_POST['send_file']) || $cancel) ? TRUE : FALSE; # #-----[ OPEN ]--------------------------------------------- # admin/admin_ug_auth.php # #-----[ FIND ]--------------------------------------------- # Line 229 $change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : false; if ( empty($adv) ) { $change_acl_list = ( isset($HTTP_POST_VARS['private']) ) ? $HTTP_POST_VARS['private'] : false; # #-----[ REPLACE WITH ]--------------------------------------------- # $change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : array(); if ( empty($adv) ) { $sql = "SELECT f.* FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c WHERE f.cat_id = c.cat_id ORDER BY c.cat_order, f.forum_order ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql); } $forum_access = $forum_auth_level_fields = array(); while( $row = $db->sql_fetchrow($result) ) { $forum_access[] = $row; } $db->sql_freeresult($result); for($i = 0; $i < count($forum_access); $i++) { $forum_id = $forum_access[$i]['forum_id']; for($j = 0; $j < count($forum_auth_fields); $j++) { $forum_auth_level_fields[$forum_id][$forum_auth_fields[$j]] = $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL; } } while( list($forum_id, $value) = @each($HTTP_POST_VARS['private']) ) { while( list($auth_field, $exists) = @each($forum_auth_level_fields[$forum_id]) ) { if ($exists) { $change_acl_list[$forum_id][$auth_field] = $value; } } } # #-----[ FIND ]--------------------------------------------- # Line 322 ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) || ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) ) ) { $update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod']; # #-----[ REPLACE WITH ]--------------------------------------------- # ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id] != $auth_access[$forum_id]['auth_mod'] ) || ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]) ) ) { $update_mod_status[$forum_id] = $change_mod_list[$forum_id]; # #-----[ OPEN ]--------------------------------------------- # admin/admin_users.php # #-----[ FIND ]--------------------------------------------- # Line 107 $sql = "SELECT group_id FROM " . GROUPS_TABLE . " WHERE group_moderator = $user_id"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); } while ( $row_group = $db->sql_fetchrow($result) ) { $group_moderator[] = $row_group['group_id']; } if ( count($group_moderator) ) { $update_moderator_id = implode(', ', $group_moderator); $sql = "UPDATE " . GROUPS_TABLE . " SET group_moderator = " . $userdata['user_id'] . " WHERE group_moderator IN ($update_moderator_id)"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); } # #-----[ REPLACE WITH ]--------------------------------------------- # $sql = "UPDATE " . GROUPS_TABLE . " SET group_moderator = " . $userdata['user_id'] . " WHERE group_moderator = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); # #-----[ OPEN ]--------------------------------------------- # admin/admin_words.php # #-----[ FIND ]--------------------------------------------- # Line 33 $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false; # #-----[ REPLACE WITH ]--------------------------------------------- # $cancel = (isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel'])) ? true : false; # #-----[ FIND ]--------------------------------------------- # Line 105 "WORD" => $word_info['word'], "REPLACEMENT" => $word_info['replacement'], # #-----[ REPLACE WITH ]--------------------------------------------- # "WORD" => htmlspecialchars($word_info['word']), "REPLACEMENT" => htmlspecialchars($word_info['replacement']), # #-----[ FIND ]--------------------------------------------- # Line 255 "WORD" => $word, "REPLACEMENT" => $replacement, # #-----[ REPLACE WITH ]--------------------------------------------- # "WORD" => htmlspecialchars($word), "REPLACEMENT" => htmlspecialchars($replacement), # #-----[ OPEN ]--------------------------------------------- # groupcp.php # #-----[ FIND ]--------------------------------------------- # Line 144 $mode = ''; } $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0; # #-----[ AFTER, ADD ]--------------------------------------------- # $sid = ( isset($HTTP_POST_VARS['sid']) ) ? $HTTP_POST_VARS['sid'] : ''; # #-----[ FIND ]--------------------------------------------- # Line 208 // if ( !$userdata['session_logged_in'] ) { redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } # #-----[ AFTER, ADD ]--------------------------------------------- # else if ( $sid !== $userdata['session_id'] ) { message_die(GENERAL_ERROR, $lang['Session_invalid']); } # #-----[ FIND ]--------------------------------------------- # Line 313 elseif ( !$userdata['session_logged_in'] ) { redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } # #-----[ REPLACE WITH ]--------------------------------------------- # else if ( !$userdata['session_logged_in'] ) { redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } else if ( $sid !== $userdata['session_id'] ) { message_die(GENERAL_ERROR, $lang['Session_invalid']); } # #-----[ FIND ]--------------------------------------------- # Line 370 else { $unsub_msg = ( isset($HTTP_POST_VARS['unsub']) ) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending']; $s_hidden_fields = ''; # #-----[ AFTER, ADD ]--------------------------------------------- # $s_hidden_fields .= ''; # #-----[ FIND ]--------------------------------------------- # Line 428 SELECT aa.group_id FROM " . AUTH_ACCESS_TABLE . " aa WHERE aa.group_id = g.group_id ) ) # #-----[ FIND ]--------------------------------------------- # Line 433 ORDER BY aa.auth_mod DESC"; # #-----[ REPLACE WITH ]--------------------------------------------- # ORDER BY auth_mod DESC"; # #-----[ FIND ]--------------------------------------------- # Line 469 if ( !empty($HTTP_POST_VARS['add']) || !empty($HTTP_POST_VARS['remove']) || isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) { if ( !$userdata['session_logged_in'] ) { redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); # #-----[ AFTER, ADD ]--------------------------------------------- # } else if ( $sid !== $userdata['session_id'] ) { message_die(GENERAL_ERROR, $lang['Session_invalid']); # #-----[ FIND ]--------------------------------------------- # Line 913 $username = $group_moderator['username']; $user_id = $group_moderator['user_id']; generate_user_info($group_moderator, $board_config['default_dateformat'], $is_moderator, $from, $posts, $joined, $poster_avatar, $profile_img, $profile, $search_img, $search, $pm_img, $pm, $email_img, $email, $www_img, $www, $icq_status_img, $icq_img, $icq, $aim_img, $aim, $msn_img, $msn, $yim_img, $yim); # #-----[ FIND ]--------------------------------------------- # Line 918 $s_hidden_fields .= ''; # #-----[ REPLACE WITH ]--------------------------------------------- # $s_hidden_fields .= ''; # #-----[ OPEN ]--------------------------------------------- # includes/functions.php # #-----[ FIND ]--------------------------------------------- # Line 368 elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang ) # #-----[ REPLACE WITH ]--------------------------------------------- # elseif ( $userdata['user_id'] == ANONYMOUS && $board_config['default_lang'] !== $default_lang ) # #-----[ OPEN ]--------------------------------------------- # includes/functions_admin.php # #-----[ FIND ]--------------------------------------------- # Line 24 // // Simple version of jumpbox, just lists authed forums // function make_forum_select($box_name, $ignore_forum = false, $select_forum = '') { # #-----[ FIND ]--------------------------------------------- # Line 29 global $db, $userdata; # #-----[ REPLACE WITH ]--------------------------------------------- # global $db, $userdata, $lang; # #-----[ FIND ]--------------------------------------------- # Line 47 $forum_list = ( $forum_list == '' ) ? '' : ''; # #-----[ REPLACE WITH ]--------------------------------------------- # $forum_list = ( $forum_list == '' ) ? $lang['No_forums'] : ''; # #-----[ OPEN ]--------------------------------------------- # includes/functions_validate.php # #-----[ FIND ]--------------------------------------------- # Line 99 if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160))) # #-----[ REPLACE WITH ]--------------------------------------------- # if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160)) || strstr($username, chr(173))) # #-----[ OPEN ]--------------------------------------------- # language/lang_english/lang_admin.php # #-----[ FIND ]--------------------------------------------- # Line 214 $lang['Unban_username'] = 'Un-ban one more specific users'; # #-----[ REPLACE WITH ]--------------------------------------------- # $lang['Unban_username'] = 'Un-ban one or more specific users'; # #-----[ FIND ]--------------------------------------------- # Line 572 $lang['Delete_disallow_explain'] = 'You can remove a disallowed username by selecting the username from this list and clicking submit'; # #-----[ REPLACE WITH ]--------------------------------------------- # $lang['Delete_disallow_explain'] = 'You can remove a disallowed username by selecting the username from this list and clicking delete'; # #-----[ OPEN ]--------------------------------------------- # privmsg.php # #-----[ FIND ]--------------------------------------------- # Line 666 if ( !$confirm ) { $s_hidden_fields = ''; $s_hidden_fields .= ( isset($HTTP_POST_VARS['delete']) ) ? '' : ''; # #-----[ AFTER, ADD ]--------------------------------------------- # $s_hidden_fields .= ''; # #-----[ FIND ]--------------------------------------------- # Line 697 $template->pparse('confirm_body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } # #-----[ FIND ]--------------------------------------------- # Line 702 else if ( $confirm ) # #-----[ REPLACE WITH ]--------------------------------------------- # else if ($confirm && $sid === $userdata['session_id']) # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/admin/styles_edit_body.tpl # #-----[ FIND ]--------------------------------------------- # Line 7 # #-----[ REPLACE WITH ]--------------------------------------------- # # #-----[ FIND ]--------------------------------------------- # Line 62 {L_TR_COLOR2}: {L_TR_COLOR3}: {L_TR_CLASS1}: {L_TR_CLASS2}: {L_TR_CLASS3}: {L_TH_COLOR1}: {L_TH_COLOR2}: {L_TH_COLOR3}: {L_TH_CLASS1}: {L_TH_CLASS2}: {L_TH_CLASS3}: {L_TD_COLOR1}: {L_TD_COLOR2}: {L_TD_COLOR3}: {L_TD_CLASS1}: {L_TD_CLASS2}: {L_TD_CLASS3}: {L_FONTFACE_1}: {L_FONTFACE_2}: {L_FONTFACE_3}: {L_FONTSIZE_1}: {L_FONTSIZE_2}: {L_FONTSIZE_3}: {L_FONTCOLOR_1}: {L_FONTCOLOR_2}: {L_FONTCOLOR_3}: {L_SPAN_CLASS_1}: {L_SPAN_CLASS_2}: {L_SPAN_CLASS_3}: # #-----[ REPLACE WITH ]--------------------------------------------- # {L_TR_COLOR2}: {L_TR_COLOR3}: {L_TR_CLASS1}: {L_TR_CLASS2}: {L_TR_CLASS3}: {L_TH_COLOR1}: {L_TH_COLOR2}: {L_TH_COLOR3}: {L_TH_CLASS1}: {L_TH_CLASS2}: {L_TH_CLASS3}: {L_TD_COLOR1}: {L_TD_COLOR2}: {L_TD_COLOR3}: {L_TD_CLASS1}: {L_TD_CLASS2}: {L_TD_CLASS3}: {L_FONTFACE_1}: {L_FONTFACE_2}: {L_FONTFACE_3}: {L_FONTSIZE_1}: {L_FONTSIZE_2}: {L_FONTSIZE_3}: {L_FONTCOLOR_1}: {L_FONTCOLOR_2}: {L_FONTCOLOR_3}: {L_SPAN_CLASS_1}: {L_SPAN_CLASS_2}: {L_SPAN_CLASS_3}: # #-----[ OPEN ]--------------------------------------------- # templates/subSilver/posting_body.tpl # #-----[ FIND ]--------------------------------------------- # Line 370  {L_FONT_SIZE}:  {L_FONT_SIZE}: