##############################################################
## MOD Title: 		phpBB SEO Rewrite Avanc MAJ 0.4.2 => 0.4.4
## MOD Author: 		dcz <n/a> http://www.phpbb-seo.com/
## MOD Description: 	Ceci est la procdure de mise  jour du MOD phpBB SEO Rewrite Avanc pour la transition version 0.4.2 => 0.4.4.
## 			Rendez-vous sur http://www.phpbb-seo.com/forums/reecriture-url-avancee/seo-url-phpbb3-avance-vt1501.html
## 			pour toujours obtenir la dernire version ou de l'aide pour ce MOD.
##
## MOD Version: 	1.0
##
## Installation Level: 	(Eazy)
## Installation Time: 	10 Minutes
## Files To Edit: 	(8)
##			includes/functions.php,
##			memberlist.php,
##			phpbb_seo/phpbb_seo_class.php (DYI),
##			search.php,
##			styles/prosilver/template/simple_header.html,
##			styles/subsilver2/template/overall_header.html,
##			styles/subsilver2/template/simple_header.html,
##			viewtopic.php.
##
## Included Files: n/a
##############################################################
## Author Notes:
## _____________
##
## Voici les instructions de mise  jour : phpBB3 SEO Mod Rewrite Avanc 0.4.2 => 0.4.4
##
##############################################################
## MOD History:
##
##	2008-07-15 - 1.0
##		- First version released
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ DIY INSTRUCTIONS ]--------------------------------------------------
#

_____________________________________________
>>>> INSTALLATION POUR VOTRE FORUM <<<<<
_____________________________________________

La procdure d'installation qui suit conservera votre standard d'URL actuel, en fonction des rglages de la classe phpbb_seo_class.php.

!!!!! VOUS DEVREZ CEPENDANT prendre le fichier phpbb_seo_class.php dernire version et y ajouter vos ventuels changements, comme ceux du zro duplicate ou autre rglages particuliers comme les dlimiteurs ou les parties statiques.
Les nombreux changements du fichiers rendent cette procdure nettement plus rapide.

Une fois les nouveaux fichiers en place, il vous faudra vider le cache de phpBB et rafraichir vos thmes (ACP => STYLE => Thmes => Rafraichir).

Vous devrez uploader / craser :
	includes/acp/acp_phpbb_seo.php
	includes/acp/info/acp_phpbb_seo.php
	language/en/acp/phpbb_seo.php
	language/fr/acp/phpbb_seo.php

#
#-----[ COPY ]------------------------------------------
#

root/includes/acp/acp_phpbb_seo.php		to 	includes/acp/acp_phpbb_seo.php
root/includes/acp/info/acp_phpbb_seo.php	to 	includes/acp/info/acp_phpbb_seo.php
root/language/en/acp/phpbb_seo.php		to 	language/en/acp/phpbb_seo.php
root/language/fr/acp/phpbb_seo.php		to 	language/fr/acp/phpbb_seo.php

#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
	global $_SID, $_EXTRA_URL, $phpbb_hook;
	// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	global $phpbb_seo;
	// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
	global $_SID, $_EXTRA_URL, $phpbb_hook;
	// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	// We bypass the hook function here, the same effect as a standalone hook, which we want, but faster ;-)
	global $phpbb_seo;
	if (!empty($phpbb_seo->seo_opt['url_rewrite'])) {
		return $phpbb_seo->url_rewrite($url, $params, $is_amp, $session_id);
	} else

#
#-----[ FIND ]------------------------------------------
#
			// www.phpBB-SEO.com SEO TOOLKIT BEGIN
			$url .= (($append_url) ? $url_delim . $append_url : '') . $anchor;
			return $phpbb_seo->url_rewrite($url, $is_amp);
			// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#
			return $url . (($append_url) ? $url_delim . $append_url : '') . $anchor;
#
#-----[ FIND ]------------------------------------------
#
			// www.phpBB-SEO.com SEO TOOLKIT BEGIN
			$url .= (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . 'sid=' . $session_id . $anchor;
			return $phpbb_seo->url_rewrite($url, $is_amp);
			// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#
			return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . 'sid=' . $session_id . $anchor;

#
#-----[ FIND ]------------------------------------------
#
	// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	$url .= (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id) . $anchor;
	return $phpbb_seo->url_rewrite($url, $is_amp);
	// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#
	return $url . (($append_url) ? $url_delim . $append_url . $amp_delim : $url_delim) . $params . ((!$session_id) ? '' : $amp_delim . 'sid=' . $session_id) . $anchor;

#
#-----[ FIND ]------------------------------------------
#
	// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	global $phpbb_seo;
	if (is_object($phpbb_seo)) {
		$phpbb_seo->seo_end();
	}
	// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#
	// www.phpBB-SEO.com SEO TOOLKIT BEGIN
	global $phpbb_seo;
	if (!empty($phpbb_seo)) {
		$phpbb_seo->seo_end();
	}
	// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]------------------------------------------
#

memberlist.php

#
#-----[ FIND ]------------------------------------------
#
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('memberlist', 'groups'));
#
#-----[ AFTER, ADD ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (!empty($_REQUEST['un'])) {
	$_REQUEST['un'] = rawurldecode($_REQUEST['un']);
	if (!$phpbb_seo->is_utf8($_REQUEST['un']) && function_exists('utf8_encode')) {
		$_REQUEST['un'] = utf8_normalize_nfc(utf8_encode($_REQUEST['un']));
	}
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
	$u_search = trim($u_search, '&amp;');
#
#-----[ REPLACE WITH ]------------------------------------------
#
	$u_search = preg_replace('`(^&amp;|&amp;$)`i', '', $u_search);
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/simple_header.html
#
#-----[ FIND ]------------------------------------------
#
<head>
#
#-----[ AFTER, ADD]------------------------------------------
#
{SEO_BASE_HREF}
#
#-----[ OPEN ]------------------------------------------
#
styles/subsilver2/template/overall_header.html
#
#-----[ FIND ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';
	var seo_delim_start = '{SEO_START_DELIM}';
	var seo_static_pagination = '{SEO_SATIC_PAGE}';
	var seo_ext_pagination = '{SEO_EXT_PAGE}';

	if (page !== null && !isNaN(page) && page > 0) {
		var seo_page = (page - 1) * per_page;
		if ( base_url.indexOf('?') >= 0 ) {
			document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + seo_page;
		} else if ( seo_page > 0 ) {
			var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
			if (seo_type1 !== null) {
				document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1;
			}
			var seo_type2 = base_url.match(/\/$/);
			if (seo_type2 !== null) {
				document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination;
			}
		} else {
			document.location.href = base_url;
		}
	}
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';
	var seo_delim_start = '{SEO_START_DELIM}';
	var seo_static_pagination = '{SEO_SATIC_PAGE}';
	var seo_ext_pagination = '{SEO_EXT_PAGE}';
	if (page !== null && !isNaN(page) && page > 0) {
		var seo_page = (page - 1) * perpage;
		if ( base_url.indexOf('?') >= 0 ) {
			document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + seo_page;
		} else if ( seo_page > 0 ) {
			var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
			if (seo_type1 !== null) {
				document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1;
			}
			var seo_type2 = base_url.match(/\/$/);
			if (seo_type2 !== null) {
				document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination;
			}
		} else {
			document.location.href = base_url;
		}
	}
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]------------------------------------------
#
styles/subsilver2/template/simple_header.html
#
#-----[ FIND ]------------------------------------------
#
<head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
{SEO_BASE_HREF}
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
	$_REQUEST['hilit'] = urldecode($_REQUEST['hilit']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
	$_REQUEST['hilit'] = rawurldecode($_REQUEST['hilit']);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
