Pagina 1 van 1

phpBB 2.0.16 naar 2.0.17 codeveranderingen

Geplaatst: 21 jul 2005, 21:04
door Derky
Ik zag ze niet meer dus ik dacht laat ik ze er weer neer zetten. :wink:

phpBB 2.0.16 naar 2.0.17 codeveranderingen (Download)



These are the Changes from phpBB 2.0.16 to phpBB 2.0.17 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 'VOEG DAARNA TOE'-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 'VERVANG MET'-Statement, the Code quoted in the 'FIND'-Statement have to be replaced completely with the quoted Code in the 'VERVANG MET'-Statement.

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.
  • admin/admin_ug_auth.php[/color][/size]
  1. VIND - REGEL 417

    Code: Selecteer alles

    
    			FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u  
    			WHERE ug.group_id = aa.group_id 
    				AND u.user_id = ug.user_id 
    
    VOEG DAARNA TOE

    Code: Selecteer alles

    
    				AND ug.user_pending = 0
    
  2. VIND - REGEL 572

    Code: Selecteer alles

    
    	$sql = "SELECT * 
    		FROM " . FORUMS_TABLE . " f
    		ORDER BY forum_order";
    
    VERVANG MET

    Code: Selecteer alles

    
    	$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";
    
  3. VIND - REGEL 608

    Code: Selecteer alles

    
    	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
    
    VERVANG MET

    Code: Selecteer alles

    
    	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
    
  4. VIND - REGEL 836

    Code: Selecteer alles

    
    		$t_usergroup_list = '';
    		for($i = 0; $i < count($ug_info); $i++)
    		{
    			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
    
    			$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    
    VERVANG MET

    Code: Selecteer alles

    
    		$t_usergroup_list = $t_pending_list = '';
    		for($i = 0; $i < count($ug_info); $i++)
    		{
    			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
    
    			if (!$ug_info[$i]['user_pending'])
    			{
    				$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    			}
    			else
    			{
    				$t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    			}
    
  5. VIND - REGEL 911

    Code: Selecteer alles

    
    			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
    
    VERVANG MET

    Code: Selecteer alles

    
    			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list)
    
  • admin/admin_users.php[/color][/size]
  1. VIND - REGEL 89

    Code: Selecteer alles

    
    				SET poster_id = " . DELETED . ", post_username = '$username' 
    
    VERVANG MET

    Code: Selecteer alles

    
    				SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "' 
    
  • includes/bbcode.php[/color][/size]
  1. VIND - REGEL 203

    Code: Selecteer alles

    
    	$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url1'];
    
    	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url2'];
    
    	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
    	$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url3'];
    
    	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    
    VERVANG MET

    Code: Selecteer alles

    
    	$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url1'];
    
    	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url2'];
    
    	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
    	$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url3'];
    
    	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    
  2. VIND - REGEL 627

    Code: Selecteer alles

    
    	$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
    
    	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
    	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
    	// zzzz is optional.. will contain everything up to the first space, newline, 
    	// comma, double quote or <.
    	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
    
    VERVANG MET

    Code: Selecteer alles

    
    	$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
    
    	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
    	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
    	// zzzz is optional.. will contain everything up to the first space, newline, 
    	// comma, double quote or <.
    	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
    
  • includes/functions.php[/color][/size]
  1. VIND - REGEL 120

    Code: Selecteer alles

    
    	if (intval($user) == 0 || $force_str)
    
    VERVANG MET

    Code: Selecteer alles

    
    	if (!is_numeric($user) || $force_str)
    
  2. VIND - REGEL 581

    Code: Selecteer alles

    
    	define(HAS_DIED, 1);
    
    VERVANG MET

    Code: Selecteer alles

    
    	define('HAS_DIED', 1);
    
  • includes/functions_validate.php[/color][/size]
  1. VIND - REGEL 33

    Code: Selecteer alles

    
    	$username = preg_replace('#\s+#', ' ', $username); 
    	// Limit username length
    	$username = substr(str_replace("\'", "'", $username), 0, 25);
    	$username = str_replace("'", "''", $username);
    
    
    VERVANG MET

    Code: Selecteer alles

    
    	$username = preg_replace('#\s+#', ' ', trim($username)); 
    	$username = phpbb_clean_username($username);
    	
    
  • includes/usercp_activate.php[/color][/size]
  1. VIND - REGEL 50

    Code: Selecteer alles

    
    	}
    	else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
    	{
    
    VOEG DAARNA TOE

    Code: Selecteer alles

    
    		if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN)
    		{
    			message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
    		}
    
    
  • includes/usercp_avatar.php[/color][/size]
  1. VIND - REGEL 89

    Code: Selecteer alles

    
    
    function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
    {
    
    VOEG DAARNA TOE

    Code: Selecteer alles

    
    	global $lang;
    
    
  • includes/usercp_viewprofile.php[/color][/size]
  1. VIND - REGEL 168

    Code: Selecteer alles

    
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    
    VERVANG MET

    Code: Selecteer alles

    
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
    
  • privmsg.php[/color][/size]
  1. VIND - REGEL 701

    Code: Selecteer alles

    
    		if ( $delete_all )
    		{
    			switch($folder)
    			{
    				case 'inbox':
    					$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
    					privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    					break;
    
    				case 'outbox':
    					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    					break;
    
    				case 'sentbox':
    					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
    					break;
    
    				case 'savebox':
    					$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
    						AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
    					OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
    						AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
    					break;
    			}
    
    			$sql = "SELECT privmsgs_id
    				FROM " . PRIVMSGS_TABLE . "
    				WHERE $delete_type";
    			if ( !($result = $db->sql_query($sql)) )
    			{
    				message_die(GENERAL_ERROR, 'Could not obtain id list to delete all messages', '', __LINE__, __FILE__, $sql);
    			}
    
    			while ( $row = $db->sql_fetchrow($result) )
    			{
    				$mark_list[] = $row['privmsgs_id'];
    			}
    
    			unset($delete_type);
    		}
    
    
    VERVANG MET

    Code: Selecteer alles

    
    		$delete_sql_id = '';
    
    		if (!$delete_all)
    		{
    			for ($i = 0; $i < count($mark_list); $i++)
    			{
    				$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
    			}
    			$delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)";
    		}
    
    		switch($folder)
    		{
    			case 'inbox':
    				$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
    				privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    				break;
    
    			case 'outbox':
    				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    				break;
    
    			case 'sentbox':
    				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
    				break;
    
    			case 'savebox':
    				$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
    					AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
    				OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
    					AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
    				break;
    		}
    
    		$sql = "SELECT privmsgs_id
    			FROM " . PRIVMSGS_TABLE . "
    			WHERE $delete_type $delete_sql_id";
    
    		if ( !($result = $db->sql_query($sql)) )
    		{
    			message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql);
    		}
    
    		$mark_list = array();
    		while ( $row = $db->sql_fetchrow($result) )
    		{
    			$mark_list[] = $row['privmsgs_id'];
    		}
    
    		unset($delete_type);
    
    
  2. VIND - REGEL 1507

    Code: Selecteer alles

    
    				$mode = 'reply';
    			}
    		}
    
    VOEG DAARNA TOE

    Code: Selecteer alles

    
    		else
    		{
    			$privmsg_subject = $privmsg_message = '';
    		}
    
  3. VIND - REGEL 2036

    Code: Selecteer alles

    
    			$l_box_size_status = '';
    			break;
    	}
    }
    
    VOEG DAARNA TOE

    Code: Selecteer alles

    
    else
    {
    	$inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = '';
    }
    
  • templates/subSilver/faq_body.tpl[/color][/size]
  1. VIND - REGEL 37

    Code: Selecteer alles

    
    		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>
    
    VERVANG MET

    Code: Selecteer alles

    
    		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td>
    
  • viewtopic.php[/color][/size]
  1. VIND - REGEL 992

    Code: Selecteer alles

    
    	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
    	$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    
    VERVANG MET

    Code: Selecteer alles

    
    	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
    	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';
    

Geplaatst: 21 jul 2005, 21:20
door ik ben gek
waarom zoveel veranderingen?
je blijft zo bezig...
erg iri !!!

Geplaatst: 22 jul 2005, 06:59
door pencak
Derky: erg leuk gedaan zo, maar ......

ik heb er nog ff overheen gekeken, soort van alles controleren
(ik ben nogal voorzichtig met die update's)

nu constateer ik dat in het gedeelte admin/admin_ug_auth.php rond lijn 572 en rond lijn 608 een verschil is met wat er in de zip staat

ik heb er naar gekeken maar kan het zo niet zien :?

echter als ik de regels met ctr+c kopieer en dan zoek in Crimson Editor, dan kan hij ze niet vinden, terwijl hij de zelfde stukken uit de zip gewoon vind waar ze moeten staan.

ik vind dit toch een beetje vreemd en verwarrend

Geplaatst: 22 jul 2005, 08:26
door Derky
Dan kopieƫren we het engelse gedeelte ook :wink:

phpBB 2.0.16 to phpBB 2.0.17 Code Changes



These are the Changes from phpBB 2.0.16 to phpBB 2.0.17 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.

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.

  • admin/admin_ug_auth.php[/color][/size]
  1. FIND - Line 417

    Code: Selecteer alles

    
    			FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u  
    			WHERE ug.group_id = aa.group_id 
    				AND u.user_id = ug.user_id 
    
    AFTER, ADD

    Code: Selecteer alles

    
    				AND ug.user_pending = 0
    
  2. FIND - Line 572

    Code: Selecteer alles

    
    	$sql = "SELECT * 
    		FROM " . FORUMS_TABLE . " f
    		ORDER BY forum_order";
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$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";
    
  3. FIND - Line 608

    Code: Selecteer alles

    
    	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
    
  4. FIND - Line 836

    Code: Selecteer alles

    
    		$t_usergroup_list = '';
    		for($i = 0; $i < count($ug_info); $i++)
    		{
    			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
    
    			$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    
    REPLACE WITH

    Code: Selecteer alles

    
    		$t_usergroup_list = $t_pending_list = '';
    		for($i = 0; $i < count($ug_info); $i++)
    		{
    			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
    
    			if (!$ug_info[$i]['user_pending'])
    			{
    				$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    			}
    			else
    			{
    				$t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
    			}
    
  5. FIND - Line 911

    Code: Selecteer alles

    
    			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
    
    REPLACE WITH

    Code: Selecteer alles

    
    			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list)
    
  • admin/admin_users.php[/color][/size]
  1. FIND - Line 89

    Code: Selecteer alles

    
    				SET poster_id = " . DELETED . ", post_username = '$username' 
    
    REPLACE WITH

    Code: Selecteer alles

    
    				SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "' 
    
  • includes/bbcode.php[/color][/size]
  1. FIND - Line 203

    Code: Selecteer alles

    
    	$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url1'];
    
    	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url2'];
    
    	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
    	$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url3'];
    
    	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url1'];
    
    	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url2'];
    
    	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
    	$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    	$replacements[] = $bbcode_tpl['url3'];
    
    	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
    	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
    
  2. FIND - Line 627

    Code: Selecteer alles

    
    	$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
    
    	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
    	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
    	// zzzz is optional.. will contain everything up to the first space, newline, 
    	// comma, double quote or <.
    	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
    
    	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
    	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
    	// zzzz is optional.. will contain everything up to the first space, newline, 
    	// comma, double quote or <.
    	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
    
  • includes/functions.php[/color][/size]
  1. FIND - Line 120

    Code: Selecteer alles

    
    	if (intval($user) == 0 || $force_str)
    
    REPLACE WITH

    Code: Selecteer alles

    
    	if (!is_numeric($user) || $force_str)
    
  2. FIND - Line 581

    Code: Selecteer alles

    
    	define(HAS_DIED, 1);
    
    REPLACE WITH

    Code: Selecteer alles

    
    	define('HAS_DIED', 1);
    
  • includes/functions_validate.php[/color][/size]
  1. FIND - Line 33

    Code: Selecteer alles

    
    	$username = preg_replace('#\s+#', ' ', $username); 
    	// Limit username length
    	$username = substr(str_replace("\'", "'", $username), 0, 25);
    	$username = str_replace("'", "''", $username);
    
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$username = preg_replace('#\s+#', ' ', trim($username)); 
    	$username = phpbb_clean_username($username);
    	
    
  • includes/usercp_activate.php[/color][/size]
  1. FIND - Line 50

    Code: Selecteer alles

    
    	}
    	else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
    	{
    
    AFTER, ADD

    Code: Selecteer alles

    
    		if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN)
    		{
    			message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
    		}
    
    
  • includes/usercp_avatar.php[/color][/size]
  1. FIND - Line 89

    Code: Selecteer alles

    
    
    function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
    {
    
    AFTER, ADD

    Code: Selecteer alles

    
    	global $lang;
    
    
  • includes/usercp_viewprofile.php[/color][/size]
  1. FIND - Line 168

    Code: Selecteer alles

    
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    
    REPLACE WITH

    Code: Selecteer alles

    
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
    
  • privmsg.php[/color][/size]
  1. FIND - Line 701

    Code: Selecteer alles

    
    		if ( $delete_all )
    		{
    			switch($folder)
    			{
    				case 'inbox':
    					$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
    					privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    					break;
    
    				case 'outbox':
    					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    					break;
    
    				case 'sentbox':
    					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
    					break;
    
    				case 'savebox':
    					$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
    						AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
    					OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
    						AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
    					break;
    			}
    
    			$sql = "SELECT privmsgs_id
    				FROM " . PRIVMSGS_TABLE . "
    				WHERE $delete_type";
    			if ( !($result = $db->sql_query($sql)) )
    			{
    				message_die(GENERAL_ERROR, 'Could not obtain id list to delete all messages', '', __LINE__, __FILE__, $sql);
    			}
    
    			while ( $row = $db->sql_fetchrow($result) )
    			{
    				$mark_list[] = $row['privmsgs_id'];
    			}
    
    			unset($delete_type);
    		}
    
    
    REPLACE WITH

    Code: Selecteer alles

    
    		$delete_sql_id = '';
    
    		if (!$delete_all)
    		{
    			for ($i = 0; $i < count($mark_list); $i++)
    			{
    				$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
    			}
    			$delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)";
    		}
    
    		switch($folder)
    		{
    			case 'inbox':
    				$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
    				privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    				break;
    
    			case 'outbox':
    				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
    				break;
    
    			case 'sentbox':
    				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
    				break;
    
    			case 'savebox':
    				$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
    					AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
    				OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
    					AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
    				break;
    		}
    
    		$sql = "SELECT privmsgs_id
    			FROM " . PRIVMSGS_TABLE . "
    			WHERE $delete_type $delete_sql_id";
    
    		if ( !($result = $db->sql_query($sql)) )
    		{
    			message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql);
    		}
    
    		$mark_list = array();
    		while ( $row = $db->sql_fetchrow($result) )
    		{
    			$mark_list[] = $row['privmsgs_id'];
    		}
    
    		unset($delete_type);
    
    
  2. FIND - Line 1507

    Code: Selecteer alles

    
    				$mode = 'reply';
    			}
    		}
    
    AFTER, ADD

    Code: Selecteer alles

    
    		else
    		{
    			$privmsg_subject = $privmsg_message = '';
    		}
    
  3. FIND - Line 2036

    Code: Selecteer alles

    
    			$l_box_size_status = '';
    			break;
    	}
    }
    
    AFTER, ADD

    Code: Selecteer alles

    
    else
    {
    	$inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = '';
    }
    
  • templates/subSilver/faq_body.tpl[/color][/size]
  1. FIND - Line 37

    Code: Selecteer alles

    
    		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>
    
    REPLACE WITH

    Code: Selecteer alles

    
    		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td>
    
  • viewtopic.php[/color][/size]
  1. FIND - Line 992

    Code: Selecteer alles

    
    	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
    	$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    
    REPLACE WITH

    Code: Selecteer alles

    
    	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
    	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';
    

Geplaatst: 22 jul 2005, 08:30
door Derky
pencak schreef:Derky: erg leuk gedaan zo, maar ......

ik heb er nog ff overheen gekeken, soort van alles controleren
(ik ben nogal voorzichtig met die update's)

nu constateer ik dat in het gedeelte admin/admin_ug_auth.php rond lijn 572 en rond lijn 608 een verschil is met wat er in de zip staat

ik heb er naar gekeken maar kan het zo niet zien :?

echter als ik de regels met ctr+c kopieer en dan zoek in Crimson Editor, dan kan hij ze niet vinden, terwijl hij de zelfde stukken uit de zip gewoon vind waar ze moeten staan.

ik vind dit toch een beetje vreemd en verwarrend
Er staat heel vaak een spatie achter de code bijvoorbeeld:

Code: Selecteer alles

 FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u 
         WHERE ug.group_id = aa.group_id
            AND u.user_id = ug.user_id 
Achter iedere regel staat een spatie en die moet je in Crimson Editor niet mee kopieƫren (daar heb ik last van) deze veranderingen komen gewoon van phpbb.com ik heb alleen even (in kladblok) Zoek en vervang gedaan en daar naar FIND - Line gezocht en dat veranderd in VIND - REGEL, en met AFTER, ADD naar VOEG DAARNA TOE.

Dus dat moet volgens mij wel kloppen. :wink:

Geplaatst: 22 jul 2005, 08:32
door Derky
(sorry voor de dubbelpost maar dit is overzichtelijker)

Het kan ook zijn dat je het liever in een MOD formaat ziet:

Code: Selecteer alles

################################################################# 
## MOD Title: phpBB 2.0.16 to phpBB 2.0.17 Code Changes
## MOD Author: Acyd Burn < N/A > (Meik Sievertsen) N/A 
## MOD Description: 
##		
##		
##		These are the Changes from phpBB 2.0.16 to phpBB 2.0.17 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.
##		
##		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: 5-10 Minutes 
## Files To Edit: 
##		admin/admin_ug_auth.php
##		admin/admin_users.php
##		includes/bbcode.php
##		includes/functions.php
##		includes/functions_validate.php
##		includes/usercp_activate.php
##		includes/usercp_avatar.php
##		includes/usercp_viewprofile.php
##		privmsg.php
##		templates/subSilver/faq_body.tpl
##		viewtopic.php
##
## Included Files: install/update_to_latest.php
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
##	
############################################################## 
## MOD History: 
## 
##   2005-07-19 - 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_ug_auth.php

#
#-----[ FIND ]---------------------------------------------
# Line 417
			FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u  
			WHERE ug.group_id = aa.group_id 
				AND u.user_id = ug.user_id 

#
#-----[ AFTER, ADD ]---------------------------------------------
# 
				AND ug.user_pending = 0

#
#-----[ FIND ]---------------------------------------------
# Line 572
	$sql = "SELECT * 
		FROM " . FORUMS_TABLE . " f
		ORDER BY forum_order";

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$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";

#
#-----[ FIND ]---------------------------------------------
# Line 608
	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";

#
#-----[ FIND ]---------------------------------------------
# Line 836
		$t_usergroup_list = '';
		for($i = 0; $i < count($ug_info); $i++)
		{
			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;

			$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
		$t_usergroup_list = $t_pending_list = '';
		for($i = 0; $i < count($ug_info); $i++)
		{
			$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;

			if (!$ug_info[$i]['user_pending'])
			{
				$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
			}
			else
			{
				$t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
			}

#
#-----[ FIND ]---------------------------------------------
# Line 911
			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
			'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list)


# 
#-----[ OPEN ]--------------------------------------------- 
# 
admin/admin_users.php

#
#-----[ FIND ]---------------------------------------------
# Line 89
				SET poster_id = " . DELETED . ", post_username = '$username' 

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
				SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "' 


# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/bbcode.php

#
#-----[ FIND ]---------------------------------------------
# Line 203
	$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url1'];

	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url2'];

	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
	$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url3'];

	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url1'];

	// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url2'];

	// [url=xxxx://www.phpbb.com]phpBB[/url] code..
	$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url3'];

	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";

#
#-----[ FIND ]---------------------------------------------
# Line 627
	$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);

	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
	// zzzz is optional.. will contain everything up to the first space, newline, 
	// comma, double quote or <.
	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);

	// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
	// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
	// zzzz is optional.. will contain everything up to the first space, newline, 
	// comma, double quote or <.
	$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);


# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/functions.php

#
#-----[ FIND ]---------------------------------------------
# Line 120
	if (intval($user) == 0 || $force_str)

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	if (!is_numeric($user) || $force_str)

#
#-----[ FIND ]---------------------------------------------
# Line 581
	define(HAS_DIED, 1);

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	define('HAS_DIED', 1);


# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/functions_validate.php

#
#-----[ FIND ]---------------------------------------------
# Line 33
	$username = preg_replace('#\s+#', ' ', $username); 
	// Limit username length
	$username = substr(str_replace("\'", "'", $username), 0, 25);
	$username = str_replace("'", "''", $username);


#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$username = preg_replace('#\s+#', ' ', trim($username)); 
	$username = phpbb_clean_username($username);
	


# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/usercp_activate.php

#
#-----[ FIND ]---------------------------------------------
# Line 50
	}
	else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
	{

#
#-----[ AFTER, ADD ]---------------------------------------------
# 
		if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN)
		{
			message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
		}



# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/usercp_avatar.php

#
#-----[ FIND ]---------------------------------------------
# Line 89

function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
{

#
#-----[ AFTER, ADD ]---------------------------------------------
# 
	global $lang;



# 
#-----[ OPEN ]--------------------------------------------- 
# 
includes/usercp_viewprofile.php

#
#-----[ FIND ]---------------------------------------------
# Line 168
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';


# 
#-----[ OPEN ]--------------------------------------------- 
# 
privmsg.php

#
#-----[ FIND ]---------------------------------------------
# Line 701
		if ( $delete_all )
		{
			switch($folder)
			{
				case 'inbox':
					$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
					privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
					break;

				case 'outbox':
					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
					break;

				case 'sentbox':
					$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
					break;

				case 'savebox':
					$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
						AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
					OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
						AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
					break;
			}

			$sql = "SELECT privmsgs_id
				FROM " . PRIVMSGS_TABLE . "
				WHERE $delete_type";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not obtain id list to delete all messages', '', __LINE__, __FILE__, $sql);
			}

			while ( $row = $db->sql_fetchrow($result) )
			{
				$mark_list[] = $row['privmsgs_id'];
			}

			unset($delete_type);
		}


#
#-----[ REPLACE WITH ]---------------------------------------------
# 
		$delete_sql_id = '';

		if (!$delete_all)
		{
			for ($i = 0; $i < count($mark_list); $i++)
			{
				$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
			}
			$delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)";
		}

		switch($folder)
		{
			case 'inbox':
				$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
				privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
				break;

			case 'outbox':
				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
				break;

			case 'sentbox':
				$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
				break;

			case 'savebox':
				$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " 
					AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) 
				OR ( privmsgs_to_userid = " . $userdata['user_id'] . " 
					AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
				break;
		}

		$sql = "SELECT privmsgs_id
			FROM " . PRIVMSGS_TABLE . "
			WHERE $delete_type $delete_sql_id";

		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql);
		}

		$mark_list = array();
		while ( $row = $db->sql_fetchrow($result) )
		{
			$mark_list[] = $row['privmsgs_id'];
		}

		unset($delete_type);


#
#-----[ FIND ]---------------------------------------------
# Line 1507
				$mode = 'reply';
			}
		}

#
#-----[ AFTER, ADD ]---------------------------------------------
# 
		else
		{
			$privmsg_subject = $privmsg_message = '';
		}

#
#-----[ FIND ]---------------------------------------------
# Line 2036
			$l_box_size_status = '';
			break;
	}
}

#
#-----[ AFTER, ADD ]---------------------------------------------
# 
else
{
	$inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = '';
}


# 
#-----[ OPEN ]--------------------------------------------- 
# 
templates/subSilver/faq_body.tpl

#
#-----[ FIND ]---------------------------------------------
# Line 37
		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
		<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td>


# 
#-----[ OPEN ]--------------------------------------------- 
# 
viewtopic.php

#
#-----[ FIND ]---------------------------------------------
# Line 992
	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
	$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
	$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
	$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

# EoM

Geplaatst: 22 jul 2005, 08:39
door pencak
dat mod formaat had je niet per se hoeven posten :wink:
dat zit bijgevoegd in het zip pakketje wat ik gedownload heb :thumb:

en je uitleg betreffende die spaties is duidelijk, het viel me gewoon op,
ik was gewoon aan het dubbel checken of ik alles gedaan had.

:idea:

Geplaatst: 22 jul 2005, 19:21
door Derky
Met die spaties heb ik ook steeds, het is zo irritant; of een spatie er achter of een spatie ervoor of allebei :evil:

Geplaatst: 23 jul 2005, 07:46
door ik ben gek
inderdaat had ik met somige mods maar als ik ga updaten( na me vakante van 2 weken) zal ik er ook last van hebben :(

Geplaatst: 19 aug 2005, 19:51
door Montana
mischien een stom vraagje he..

maare wat doet die update to latest.php eigenlijk ? :roll:

Geplaatst: 19 aug 2005, 19:53
door Bee
Het versienummer bijwerken, of in het geval van 2.0.14 naar 2.0.15 databaseveranderingen doorvoeren.

Geplaatst: 19 aug 2005, 19:57
door Montana
ah ok dus er worden verder geen veranderingen gedaan aan de database tables

ik hoop iig dat het verder niets aantast qwa mods want ik moet nog al wat aan passen
van 2.0.13 naar 2.0.17 :?