<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">

<title>phpBB 2.0.8 to phpBB 2.0.9 Code Changes</title>

<style type="text/css">
<!--
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
	background-color: #E5E5E5;
	scrollbar-face-color: #DEE3E7;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #DEE3E7;
	scrollbar-3dlight-color: #D1D7DC;
	scrollbar-arrow-color:  #006699;
	scrollbar-track-color: #EFEFEF;
	scrollbar-darkshadow-color: #98AAB1;
}

/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
a:link,a:active,a:visited { color : #006699; }
a:hover		{ text-decoration: underline; color : #DD6900; }
hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}

/* This is the border line & background colour round the entire page */
.bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }

/* This is the outline round the main forum tables */
.forumline	{ background-color: #FFFFFF; border: 2px #006699 solid; }

/* Main table cell colours and backgrounds */
td.row1	{ background-color: #EFEFEF; }
td.row2	{ background-color: #DEE3E7; }
td.row3	{ background-color: #D1D7DC; }

/*
  This is for the table cell above the Topics, Post & Last posts on the index.php page
  By default this is the fading out gradiated silver background.
  However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
		background-color: #FFFFFF;
		background-image: url(templates/subSilver/images/cellpic2.jpg);
		background-repeat: repeat-y;
}

/* Header cells - the blue and silver gradient backgrounds */
th	{
	color: #FFA34F; font-size: 11px; font-weight : bold;
	background-color: #006699; height: 25px;
	background-image: url(templates/subSilver/images/cellpic3.gif);
}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
			background-image: url(templates/subSilver/images/cellpic1.gif);
			background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
}

/*
  Setting additional nice inner borders for the main table cells.
  The names indicate which sides the border will be on.
  Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
	height: 29px;
	border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
	font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
	background-color: #D1D7DC; border: #FFFFFF; border-style: solid;
}

th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow	 { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right	 { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft	  { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
th.thTop	 { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }

/* The largest text used in the index page title and toptic title etc. */
.maintitle	{
	font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none; line-height : 120%; color : #000000;
}

/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; }
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }

/* The register, login, search etc links at the top of the page */
.mainmenu		{ font-size : 11px; color : #000000 }
a.mainmenu		{ text-decoration: none; color : #006699;  }
a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }

/* Forum category titles */
.cattitle		{ font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
a.cattitle		{ text-decoration: none; color : #006699; }
a.cattitle:hover{ text-decoration: underline; }

/* Forum title: Text and link to the forums used in: index.php */
.forumlink		{ font-weight: bold; font-size: 12px; color : #006699; }
a.forumlink 	{ text-decoration: none; color : #006699; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }

/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav			{ font-weight: bold; font-size: 11px; color : #000000;}
a.nav			{ text-decoration: none; color : #006699; }
a.nav:hover		{ text-decoration: underline; }

/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2	{ font-weight: bold; font-size: 11px; color : #000000; }
a.topictitle:link   { text-decoration: none; color : #006699; }
a.topictitle:visited { text-decoration: none; color : #5493B4; }
a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }

/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name			{ font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */
.postdetails		{ font-size : 10px; color : #000000; }

/* The content of the posts (body of text) */
.postbody { font-size : 12px; line-height: 18px}
a.postlink:link	{ text-decoration: none; color : #006699 }
a.postlink:visited { text-decoration: none; color : #5493B4; }
a.postlink:hover { text-decoration: underline; color : #DD6900}

/* Quote & Code blocks */
.code {
	font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

.quote {
	font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

/* Copyright and bottom info */
.copyright		{ font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
a.copyright		{ color: #444444; text-decoration: none;}
a.copyright:hover { color: #000000; text-decoration: underline;}

/* Form elements */
input,textarea, select {
	color : #000000;
	font: normal 11px Verdana, Arial, Helvetica, sans-serif;
	border-color : #000000;
}

/* The text input fields background colour */
input.post, textarea.post, select {
	background-color : #FFFFFF;
}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */
input.button {
	background-color : #EFEFEF;
	color : #000000;
	font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}

/* The main submit button option */
input.mainoption {
	background-color : #FAFAFA;
	font-weight : bold;
}

/* None-bold submit button */
input.liteoption {
	background-color : #FAFAFA;
	font-weight : normal;
}

/* This is the line in the posting page which shows the rollover
  help line. This is actually a text box, but if set to be the same
  colour as the background no one will know ;)
*/
.helpline { background-color: #DEE3E7; border-style: none; }

-->
</style>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">

<center>
<textarea name="tutorial" rows="50" cols="35" wrap="virtual" style="width:750px" tabindex="3" class="post">
[size=18]phpBB 2.0.8 to phpBB 2.0.9 Code Changes[/size]



These are the Changes from phpBB 2.0.8 to phpBB 2.0.9 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 a 'DELETE'-Statement, the Code have to be deleted.

After you have finished this tutorial, you have to upload the update_to_209.php file, execute it and then delete it from your webspace.

Ok, lets start:


[size=18][color=blue][list][*]admin/admin_board.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 46[/color]
[code]

		$default_config[$config_name] = $config_value;
[/code]

[color=blue]REPLACE WITH[/color]
[code]

		$default_config[$config_name] = str_replace("'", "\'", $config_value);
[/code]

[/list]
[size=18][color=blue][list][*]admin/index.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 335[/color]
[code]

			AND u.user_session_time >= " . ( time() - 300 ) . " 
[/code]

[color=blue]REPLACE WITH[/color]
[code]

			AND s.session_time >= " . ( time() - 300 ) . " 
[/code]

[/list]
[size=18][color=blue][list][*]common.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 27[/color]
[code]

	die("Hacking attempt");
}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

//
function unset_vars(&$var)
{
	while (list($var_name, $null) = @each($var))
	{
		unset($GLOBALS[$var_name]);
	}
	return;
}

//
[/code]

[*]
[color=blue]FIND - Line 41[/color]
[code]

error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

[/code]

[color=blue]AFTER, ADD[/color]
[code]

$ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var';

// Unset globally registered vars - PHP5 ... hhmmm
if (@$ini_val('register_globals') == '1' || strtolower(@$ini_val('register_globals')) == 'on')
{
	$var_prefix = 'HTTP';
	$var_suffix = '_VARS';
	
	$test = array('_GET', '_POST', '_SERVER', '_COOKIE', '_ENV');

	foreach ($test as $var)
	{
		if (is_array(${$var_prefix . $var . $var_suffix}))
		{
			unset_vars(${$var_prefix . $var . $var_suffix});
		}

		if (is_array(${$var}))
		{
			unset_vars(${$var});
		}
	}

	if (is_array(${'_FILES'}))
	{
		unset_vars(${'_FILES'});
	}

	if (is_array(${'HTTP_POST_FILES'}))
	{
		unset_vars(${'HTTP_POST_FILES'});
	}
}

[/code]

[*]
[color=blue]FIND - Line 153[/color]
[code]

$theme = array();
$images = array();
$lang = array();
[/code]

[color=blue]AFTER, ADD[/color]
[code]

$nav_links = array();
[/code]

[*]
[color=blue]FIND - Line 174[/color]
[code]

if( getenv('HTTP_X_FORWARDED_FOR') != '' )
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );

	$entries = explode(',', getenv('HTTP_X_FORWARDED_FOR'));
	reset($entries);
	while (list(, $entry) = each($entries)) 
	{
		$entry = trim($entry);
		if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) )
		{
			$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/');
			$found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);

			if ($client_ip != $found_ip)
			{
				$client_ip = $found_ip;
				break;
			}
		}
	}
}
else
{
	$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
}
[/code]

[color=blue]REPLACE WITH[/color]
[code]

// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );
[/code]

[/list]
[size=18][color=blue][list][*]faq.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 37[/color]
[code]

// End session management
//

[/code]

[color=blue]AFTER, ADD[/color]
[code]

// Set vars to prevent naughtiness
$faq = array();

[/code]

[*]
[color=blue]FIND - Line 103[/color]
[code]

make_jumpbox('viewforum.'.$phpEx, $forum_id);
[/code]

[color=blue]REPLACE WITH[/color]
[code]

make_jumpbox('viewforum.'.$phpEx);
[/code]

[/list]
[size=18][color=blue][list][*]groupcp.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 428[/color]
[code]

					AND aa.group_id = g.group_id(+)";
[/code]

[color=blue]REPLACE WITH[/color]
[code]

					AND aa.group_id (+) = g.group_id";
[/code]

[*]
[color=blue]FIND - Line 1152[/color]
[code]

	// Select all group that the user is a member of or where the user has
	// a pending membership.
	//
[/code]

[color=blue]AFTER, ADD[/color]
[code]

	$in_group = array();
	
[/code]

[*]
[color=blue]FIND - Line 1248[/color]
[code]

		$s_hidden_fields = '';
[/code]

[color=blue]REPLACE WITH[/color]
[code]

		$s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
[/code]

[/list]
[size=18][color=blue][list][*]includes/bbcode.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 284[/color]
[code]

	$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
[/code]

[/list]
[size=18][color=blue][list][*]includes/functions_post.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 772[/color]
[code]

		$page_title = $lang['Review_topic'] . " - $topic_title";
[/code]

[color=blue]REPLACE WITH[/color]
[code]

		$page_title = $lang['Emoticons'] . " - $topic_title";
[/code]

[/list]
[size=18][color=blue][list][*]includes/page_header.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 94[/color]
[code]

$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
[/code]

[color=blue]AFTER, ADD[/color]
[code]

$l_online_users = '';
[/code]

[*]
[color=blue]FIND - Line 115[/color]
[code]

	$prev_user_ip = '';
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	$prev_user_ip = $prev_session_ip = '';
[/code]

[/list]
[size=18][color=blue][list][*]includes/sessions.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 48[/color]
[code]

		$sessiondata = array();
		$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
		$sessionmethod = SESSION_METHOD_GET;
	}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

	//
	if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) 
	{
		$session_id = '';
	}

[/code]

[*]
[color=blue]FIND - Line 224[/color]
[code]

		$sessiondata = array();
		$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
		$sessionmethod = SESSION_METHOD_GET;
	}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

	if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
	{
		$session_id = '';
	}

[/code]

[*]
[color=blue]FIND - Line 360[/color]
[code]

		$sessionmethod = SESSION_METHOD_GET;
	}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

	if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
	{
		return;
	}
	
[/code]

[/list]
[size=18][color=blue][list][*]includes/usercp_avatar.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 86[/color]
[code]

	if ( !preg_match('#^((http)|(ftp):\/\/[\w\-]+?\.([\w\-]+\.)+[\w]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	if ( !preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png))$)#is", $avatar_filename) )
[/code]

[/list]
[size=18][color=blue][list][*]includes/usercp_viewprofile.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 44[/color]
[code]

	message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

$ranksrow = array();
[/code]

[/list]
[size=18][color=blue][list][*]index.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 121[/color]
[code]

	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

[/code]

[color=blue]AFTER, ADD[/color]
[code]

$category_rows = array();
[/code]

[/list]
[size=18][color=blue][list][*]memberlist.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 238[/color]
[code]

			'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ),
[/code]

[color=blue]REPLACE WITH[/color]
[code]

			'ROW_NUMBER' => $i + ( $start + 1 ),
[/code]

[/list]
[size=18][color=blue][list][*]modcp.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 841[/color]
[code]

					'S_FORUM_SELECT' => make_forum_select("new_forum_id", false, $forum_id))
				);

[/code]

[color=blue]AFTER, ADD[/color]
[code]

				//
				// Define censored word matches
				//
				$orig_word = array();
				$replacement_word = array();
				obtain_word_list($orig_word, $replacement_word);

[/code]

[*]
[color=blue]FIND - Line 847[/color]
[code]

					$poster_id = $postrow[$i]['user_id'];
[/code]

[color=blue]REPLACE WITH[/color]
[code]

					$poster_id = $postrow[$i]['poster_id'];
[/code]

[*]
[color=blue]DELETE - Line 879[/color]
[code]


					//
					// Define censored word matches
					//
					$orig_word = array();
					$replacement_word = array();
					obtain_word_list($orig_word, $replacement_word);
[/code]

[/list]
[size=18][color=blue][list][*]posting.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 33[/color]
[code]

$params = array('submit' => 'post', 'confirm' => 'confirm', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');
[/code]

[color=blue]REPLACE WITH[/color]
[code]

$params = array('submit' => 'post', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');
[/code]

[*]
[color=blue]FIND - Line 45[/color]
[code]

		$$var = '';
	}
}
[/code]

[color=blue]AFTER, ADD[/color]
[code]


$confirm = isset($HTTP_POST_VARS['confirm']) ? true : false;
[/code]

[/list]
[size=18][color=blue][list][*]privmsg.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 215[/color]
[code]

			$pm_sql_user .= "AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . "
[/code]

[color=blue]REPLACE WITH[/color]
[code]

			$pm_sql_user = "AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . "
[/code]

[*]
[color=blue]FIND - Line 496[/color]
[code]

	$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$poster_id");
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	$temp_url = append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$user_id_from");
[/code]

[*]
[color=blue]FIND - Line 1045[/color]
[code]

							OR privmsgs_type = " . PRIVMSGS_UNERAD_MAIL . " ) ";
[/code]

[color=blue]REPLACE WITH[/color]
[code]

							OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ";
[/code]

[*]
[color=blue]FIND - Line 1855[/color]
[code]

$post_new_mesg_url = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['post_new'] . '" alt="' . $lang['Post_new_message'] . '" border="0" /></a>';
[/code]

[color=blue]REPLACE WITH[/color]
[code]

$post_new_mesg_url = '<a href="' . append_sid("privmsg.$phpEx?mode=post") . '"><img src="' . $images['post_new'] . '" alt="' . $lang['Send_a_new_message'] . '" border="0" /></a>';
[/code]

[*]
[color=blue]FIND - Line 1935[/color]
[code]

	$limit_msg_time = '';
	$post_days = 0;
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	$limit_msg_time = $limit_msg_time_total = '';
	$msg_days = 0;
[/code]

[*]
[color=blue]FIND - Line 2066[/color]
[code]

	'U_POST_NEW_TOPIC' => $post_new_topic_url)
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	'U_POST_NEW_TOPIC' => append_sid("privmsg.$phpEx?mode=post"))
[/code]

[/list]
[size=18][color=blue][list][*]profile.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 86[/color]
[code]

if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
	$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
[/code]

[color=blue]AFTER, ADD[/color]
[code]

	$mode = htmlspecialchars($mode);
[/code]

[/list]
[size=18][color=blue][list][*]search.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 113[/color]
[code]

	$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 );
}
else
{
	$search_time = 0;
}
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 );
	$topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']);
}
else
{
	$search_time = 0;
	$topic_days = 0;
}
[/code]

[/list]
[size=18][color=blue][list][*]viewonline.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 49[/color]
[code]

	'L_WHOSONLINE' => $lang['Who_is_online'],
[/code]

[color=blue]REPLACE WITH[/color]
[code]

	'L_WHOSONLINE' => $lang['Who_is_Online'],
[/code]

[/list]
[size=18][color=blue][list][*]viewtopic.php[/color][/size][/list]
[list=1]
[*]
[color=blue]FIND - Line 66[/color]
[code]

		if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
		{
			$session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];
[/code]

[color=blue]AFTER, ADD[/color]
[code]


			if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) 
			{
				$session_id = '';
			}

[/code]

[/list]
</textarea></center></html>
