phpBBHacks.com - phpBB 2.0.19 to 2.0.20 Code Changes
Managing Online Forums, a manual for the community admin
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
phpBB 2.0.19 to 2.0.20 Code Changes
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Fixes and Code Changes
 See a User Guidelines violation? Please contact us.
Author Message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 17676
Location: USA

PostPosted: April 10th 2006, 2:40 pm    Post subject: phpBB 2.0.19 to 2.0.20 Code Changes Reply with quote

TXT Version.
HTML Version.

These are the code changes introduced between phpBB 2.0.19 and phpBB 2.0.20. If you have installed many hacks on a forum, but wish to update it, these may help you. It is often easier to apply code changes such as these instead of replacing and rehacking your current files.

These code changes use the following instruction labels:
filename - The name of a file to be edited. Equivalent to an OPEN action in a hack or modification.
FIND - This indicates lines of code you should locate. Changes will be made in reference to this code.
REPLACE WITH - This code should completely replace the code in the preceding FIND instruction.
AFTER, ADD - The code in this instruction should be added on a new line after the last line of code in the preceding FIND instruction.
BEFORE, ADD - The code in this instruction should be added on a new line before the first line of code in the preceding FIND instruction.
FIND AND DELETE - Locate the code in this instruction as with a FIND statement, and then delete the code.
INLINE - This will always precede one of the other labels. An example would be INLINE FIND. INLINE labels work in the same way as the normal labels, with the exception that they operate on a smaller portion of a specific line referenced in the previous FIND instruction. Any new code added in an INLINE instruction should be placed on the same line, instead of on a new line.

Once you have completed the code changes, create an install/ directory in your forum's root directory, and upload the update_to_latest.php file that comes in any phpBB 2.0.20 download to the install/ directory. Run update_to_latest.php by opening it via your web browser, just as you would a normal forum page. Afterward, delete the file and the install/ directory so that your forum is accessible again.

Now, onward to the file changes!


Last edited by Thoul on April 19th 2006, 5:31 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website

Thoul
VIP

Joined: 30 Jul 2002
Posts: 17676
Location: USA

PostPosted: April 10th 2006, 2:42 pm    Post subject: Reply with quote

admin/admin_board.php

FIND
Code:
         $cookie_name = str_replace('.', '_', $new['cookie_name']);


REPLACE WITH
Code:
         $new['cookie_name'] = str_replace('.', '_', $new['cookie_name']);
      }

      // Attempt to prevent a common mistake with this value,
      // http:// is the protocol and not part of the server name
      if ($config_name == 'server_name')
      {
         $new['server_name'] = str_replace('http://', '', $new['server_name']);


FIND
Code:
   "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],


AFTER, ADD
Code:
   "L_SEARCH_FLOOD_INTERVAL" => $lang['Search_Flood_Interval'],
   "L_SEARCH_FLOOD_INTERVAL_EXPLAIN" => $lang['Search_Flood_Interval_explain'],


FIND
Code:
   "FLOOD_INTERVAL" => $new['flood_interval'],


AFTER, ADD
Code:
   "SEARCH_FLOOD_INTERVAL" => $new['search_flood_interval'],



admin/admin_db_utilities.php

FIND
Code:
      unset($schema_vals);
      unset($schema_fields);
      unset($schema_insert);


REPLACE WITH
Code:
      $schema_vals = '';
      $schema_fields = '';
      $schema_insert = '';


FIND
Code:
            if ($empty($strVal))


REPLACE WITH
Code:
            if (empty($strVal))



admin/admin_forums.php

FIND
Code:
   "auth_post" => AUTH_ALL,
   "auth_reply" => AUTH_ALL,


REPLACE WITH
Code:
   "auth_post" => AUTH_REG,
   "auth_reply" => AUTH_REG,



admin/admin_groups.php

FIND
Code:
   $sql = "SELECT user_id, username
      FROM " . USERS_TABLE . "
      WHERE user_id <> " . ANONYMOUS . "
      ORDER BY username";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
   }

   while ( $row = $db->sql_fetchrow($result) )
   {
      if ( $row['user_id'] == $group_info['group_moderator'] )
      {
         $group_moderator = $row['username'];
      }
   }


REPLACE WITH
Code:
   if ($group_info['group_moderator'] != '')
   {
      $sql = "SELECT user_id, username
         FROM " . USERS_TABLE . "
         WHERE user_id = " . $group_info['group_moderator'];
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
      }

      if ( !($row = $db->sql_fetchrow($result)) )
      {
         message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
      }

      $group_moderator = $row['username'];
   }
   else
   {
      $group_moderator = '';
   }


FIND
Code:
      $group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : '';


REPLACE WITH
Code:
      $group_name = isset($HTTP_POST_VARS['group_name']) ? htmlspecialchars(trim($HTTP_POST_VARS['group_name'])) : '';



admin/admin_ranks.php

FIND AND DELETE
Code:
define('IN_PHPBB', 1);


FIND
Code:
//
// Let's set the root dir for phpBB
//


BEFORE, ADD
Code:
define('IN_PHPBB', 1);


FIND
Code:
   $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


REPLACE WITH
Code:
   $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


FIND
Code:
if( $mode != "" )


BEFORE, ADD
Code:
// Restrict mode input to valid options
$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';


FIND
Code:
      if( $rank_id )


REPLACE WITH
Code:
      $confirm = isset($HTTP_POST_VARS['confirm']);
      
      if( $rank_id && $confirm )


FIND
Code:
      else
      {
         message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
      }
   }
   else
   {
      //
      // They didn't feel like giving us any information. Oh, too bad, we'll just display the
      // list then...
      //
      $template->set_filenames(array(
         "body" => "admin/ranks_list_body.tpl")
      );
      
      $sql = "SELECT * FROM " . RANKS_TABLE . "
         ORDER BY rank_min, rank_title";
      if( !$result = $db->sql_query($sql) )
      {
         message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
      }
      
      $rank_rows = $db->sql_fetchrowset($result);
      $rank_count = count($rank_rows);
      
      $template->assign_vars(array(
         "L_RANKS_TITLE" => $lang['Ranks_title'],
         "L_RANKS_TEXT" => $lang['Ranks_explain'],
         "L_RANK" => $lang['Rank_title'],
         "L_RANK_MINIMUM" => $lang['Rank_minimum'],
         "L_SPECIAL_RANK" => $lang['Special_rank'],
         "L_EDIT" => $lang['Edit'],
         "L_DELETE" => $lang['Delete'],
         "L_ADD_RANK" => $lang['Add_new_rank'],
         "L_ACTION" => $lang['Action'],
         
         "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
      );
      
      for( $i = 0; $i < $rank_count; $i++)
      {
         $rank = $rank_rows[$i]['rank_title'];
         $special_rank = $rank_rows[$i]['rank_special'];
         $rank_id = $rank_rows[$i]['rank_id'];
         $rank_min = $rank_rows[$i]['rank_min'];

         if($special_rank)
         {
            $rank_min = $rank_max = "-";
         }
         
         $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
         $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
   
         $template->assign_block_vars("ranks", array(
            "ROW_COLOR" => "#" . $row_color,
            "ROW_CLASS" => $row_class,
            "RANK" => $rank,
            "RANK_MIN" => $rank_min,

            "SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],

            "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
            "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
         );
      }
   }
}
else
{
   //
   // Show the default page
   //
   $template->set_filenames(array(
      "body" => "admin/ranks_list_body.tpl")
   );
   
   $sql = "SELECT * FROM " . RANKS_TABLE . "
      ORDER BY rank_min ASC, rank_special ASC";
   if( !$result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
   }
   $rank_count = $db->sql_numrows($result);

   $rank_rows = $db->sql_fetchrowset($result);
   
   $template->assign_vars(array(
      "L_RANKS_TITLE" => $lang['Ranks_title'],
      "L_RANKS_TEXT" => $lang['Ranks_explain'],
      "L_RANK" => $lang['Rank_title'],
      "L_RANK_MINIMUM" => $lang['Rank_minimum'],
      "L_SPECIAL_RANK" => $lang['Rank_special'],
      "L_EDIT" => $lang['Edit'],
      "L_DELETE" => $lang['Delete'],
      "L_ADD_RANK" => $lang['Add_new_rank'],
      "L_ACTION" => $lang['Action'],
      
      "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
   );
   
   for($i = 0; $i < $rank_count; $i++)
   {
      $rank = $rank_rows[$i]['rank_title'];
      $special_rank = $rank_rows[$i]['rank_special'];
      $rank_id = $rank_rows[$i]['rank_id'];
      $rank_min = $rank_rows[$i]['rank_min'];
      
      if( $special_rank == 1 )
      {
         $rank_min = $rank_max = "-";
      }

      $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
      $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

      $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
      
      $template->assign_block_vars("ranks", array(
         "ROW_COLOR" => "#" . $row_color,
         "ROW_CLASS" => $row_class,
         "RANK" => $rank,
         "SPECIAL_RANK" => $rank_is_special,
         "RANK_MIN" => $rank_min,

         "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
         "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
      );
   }


REPLACE WITH
Code:
      elseif( $rank_id && !$confirm)
      {
         // Present the confirmation screen to the user
         $template->set_filenames(array(
            'body' => 'admin/confirm_body.tpl')
         );

         $hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $rank_id . '" />';

         $template->assign_vars(array(
            'MESSAGE_TITLE' => $lang['Confirm'],
            'MESSAGE_TEXT' => $lang['Confirm_delete_rank'],

            'L_YES' => $lang['Yes'],
            'L_NO' => $lang['No'],

            'S_CONFIRM_ACTION' => append_sid("admin_ranks.$phpEx"),
            'S_HIDDEN_FIELDS' => $hidden_fields)
         );
      }
      else
      {
         message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
      }
   }

   $template->pparse("body");

   include('./page_footer_admin.'.$phpEx);
}

//
// Show the default page
//
$template->set_filenames(array(
   "body" => "admin/ranks_list_body.tpl")
);

$sql = "SELECT * FROM " . RANKS_TABLE . "
   ORDER BY rank_min ASC, rank_special ASC";
if( !$result = $db->sql_query($sql) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
}
$rank_count = $db->sql_numrows($result);

$rank_rows = $db->sql_fetchrowset($result);

$template->assign_vars(array(
   "L_RANKS_TITLE" => $lang['Ranks_title'],
   "L_RANKS_TEXT" => $lang['Ranks_explain'],
   "L_RANK" => $lang['Rank_title'],
   "L_RANK_MINIMUM" => $lang['Rank_minimum'],
   "L_SPECIAL_RANK" => $lang['Rank_special'],
   "L_EDIT" => $lang['Edit'],
   "L_DELETE" => $lang['Delete'],
   "L_ADD_RANK" => $lang['Add_new_rank'],
   "L_ACTION" => $lang['Action'],
   
   "S_RANKS_ACTION" => append_sid("admin_ranks.$phpEx"))
);

for($i = 0; $i < $rank_count; $i++)
{
   $rank = $rank_rows[$i]['rank_title'];
   $special_rank = $rank_rows[$i]['rank_special'];
   $rank_id = $rank_rows[$i]['rank_id'];
   $rank_min = $rank_rows[$i]['rank_min'];
   
   if( $special_rank == 1 )
   {
      $rank_min = $rank_max = "-";
   }

   $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
   $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

   $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
   
   $template->assign_block_vars("ranks", array(
      "ROW_COLOR" => "#" . $row_color,
      "ROW_CLASS" => $row_class,
      "RANK" => $rank,
      "SPECIAL_RANK" => $rank_is_special,
      "RANK_MIN" => $rank_min,

      "U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&amp;id=$rank_id"),
      "U_RANK_DELETE" => append_sid("admin_ranks.$phpEx?mode=delete&amp;id=$rank_id"))
   );



admin/admin_smilies.php

FIND
Code:
         $sql = "DELETE FROM " . SMILIES_TABLE . "
            WHERE smilies_id = " . $smiley_id;
         $result = $db->sql_query($sql);
         if( !$result )
         {
            message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
         }

         $message = $lang['smiley_del_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");

         message_die(GENERAL_MESSAGE, $message);


REPLACE WITH
Code:
         $confirm = isset($HTTP_POST_VARS['confirm']);

         if( $confirm )
         {
            $sql = "DELETE FROM " . SMILIES_TABLE . "
               WHERE smilies_id = " . $smiley_id;
            $result = $db->sql_query($sql);
            if( !$result )
            {
               message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
            }

            $message = $lang['smiley_del_success'] . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . append_sid("admin_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");

            message_die(GENERAL_MESSAGE, $message);
         }
         else
         {
            // Present the confirmation screen to the user
            $template->set_filenames(array(
               'body' => 'admin/confirm_body.tpl')
            );

            $hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $smiley_id . '" />';

            $template->assign_vars(array(
               'MESSAGE_TITLE' => $lang['Confirm'],
               'MESSAGE_TEXT' => $lang['Confirm_delete_smiley'],

               'L_YES' => $lang['Yes'],
               'L_NO' => $lang['No'],

               'S_CONFIRM_ACTION' => append_sid("admin_smilies.$phpEx"),
               'S_HIDDEN_FIELDS' => $hidden_fields)
            );
            $template->pparse('body');
         }


FIND
Code:
         $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']);
         $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']);
         $smile_url = phpbb_ltrim(basename($smile_url), "'");
         $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']);
         $smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);


REPLACE WITH
Code:
         $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : '';
         $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : '';
         $smile_url = phpbb_ltrim(basename($smile_url), "'");
         $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['smile_emotion'])) : '';
         $smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : 0;
         $smile_code = trim($smile_code);
         $smile_url = trim($smile_url);


FIND
Code:
         $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
         $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
         $smile_url = phpbb_ltrim(basename($smile_url), "'");
         $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
         $smile_code = trim($smile_code);
         $smile_url = trim($smile_url);
         $smile_emotion = trim($smile_emotion);


REPLACE WITH
Code:
         $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : '';
         $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : '';
         $smile_url = phpbb_ltrim(basename($smile_url), "'");
         $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? htmlspecialchars(trim($HTTP_POST_VARS['smile_emotion'])) : '';
         $smile_code = trim($smile_code);
         $smile_url = trim($smile_url);



admin/admin_users.php

FIND
Code:
      $user_style = ( $HTTP_POST_VARS['style'] ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style'];


REPLACE WITH
Code:
      $user_style = ( isset( $HTTP_POST_VARS['style'] ) ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style'];


FIND AND DELETE
Code:
      $user_template = ( $HTTP_POST_VARS['template'] ) ? $HTTP_POST_VARS['template'] : $board_config['board_template'];


FIND
Code:
            $message .= $lang['Admin_user_updated'];


BEFORE, ADD
Code:
            // We remove all stored login keys since the password has been updated
            // and change the current one (if applicable)
            if ( !empty($passwd_sql) )
            {
               session_reset_keys($user_id, $user_ip);
            }


FIND
Code:
            $error = TRUE;
            $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Admin_user_fail'];


REPLACE WITH
Code:
            message_die(GENERAL_ERROR, 'Admin_user_fail', '', __LINE__, __FILE__, $sql);



admin/admin_words.php

FIND AND DELETE
Code:
define('IN_PHPBB', 1);


FIND
Code:
//
// Load default header
//


BEFORE, ADD
Code:
define('IN_PHPBB', 1);


FIND
Code:
   $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


REPLACE WITH
Code:
   $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];


FIND
Code:
if( $mode != "" )
{
   if( $mode == "edit" || $mode == "add" )


BEFORE, ADD
Code:
// Restrict mode input to valid options
$mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';


FIND
Code:
      $s_hidden_fields = '';


BEFORE, ADD
Code:
      $word_info = array('word' => '', 'replacement' => '');


FIND
Code:
      if( $word_id )
      {
         $sql = "DELETE FROM " . WORDS_TABLE . "
            WHERE word_id = $word_id";


REPLACE WITH
Code:
      $confirm = isset($HTTP_POST_VARS['confirm']);

      if( $word_id && $confirm )
      {
         $sql = "DELETE FROM " . WORDS_TABLE . "
            WHERE word_id = $word_id";


FIND
Code:
      else
      {
         message_die(GENERAL_MESSAGE, $lang['No_word_selected']);


BEFORE, ADD
Code:
      elseif( $word_id && !$confirm)
      {
         // Present the confirmation screen to the user
         $template->set_filenames(array(
            'body' => 'admin/confirm_body.tpl')
         );

         $hidden_fields = '<input type="hidden" name="mode" value="delete" /><input type="hidden" name="id" value="' . $word_id . '" />';

         $template->assign_vars(array(
            'MESSAGE_TITLE' => $lang['Confirm'],
            'MESSAGE_TEXT' => $lang['Confirm_delete_word'],

            'L_YES' => $lang['Yes'],
            'L_NO' => $lang['No'],

            'S_CONFIRM_ACTION' => append_sid("admin_words.$phpEx"),
            'S_HIDDEN_FIELDS' => $hidden_fields)
         );
      }


FIND
Code:
   $word_rows = $db->sql_fetchrowset($result);


AFTER, ADD
Code:
   $db->sql_freeresult($result);



admin/page_header_admin.php

FIND
Code:
$template->pparse('header');


BEFORE, ADD
Code:
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
   header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
   header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');



admin/pagestart.php

FIND AND DELETE
Code:
   $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']);
   $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url);
   $url = str_replace('//', '/', $url);
   $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url);
   $url = preg_replace('/\?$/', '', $url);
   $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id'];
Back to top
View user's profile Send private message Visit poster's website

Thoul
VIP

Joined: 30 Jul 2002
Posts: 17676
Location: USA

PostPosted: April 10th 2006, 2:44 pm    Post subject: Reply with quote

common.php

FIND
Code:
$nav_links = array();


AFTER, ADD
Code:
$dss_seeded = false;



db/mssql.php
You can skip the changes for this file if you do not use a Microsoft SQL database.

FIND
Code:
            $row[$key] = stripslashes($value);


REPLACE WITH
Code:
            $row[$key] = ($value === ' ') ? '' : stripslashes($value);


FIND
Code:
               $rowset[$i][$key] = stripslashes($value);


REPLACE WITH
Code: