Page 1 of 1

[SOLVED] Mod conflict - phpBB SEO keyword URLs Mod

PostPosted: Mon Feb 05, 2007 12:47 pm
Author: tekguru
Guys we use the SEO keywords Mod on 4WM which works well and is as below. The only problem is that if one uses the printer friendly buttons an error is given. The page itself displays perfectly but at the bottom displays the error:

Fatal error: Call to undefined function: rewrite_urls() in /home/windows/public_html/includes/page_tail.php on line 151


Any ideas on how to get around this one? I had a feeling it is simple but I can't work out what!



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

.htaccess

#
#-----[ ADD ]------------------------------------------
#

RewriteEngine On
#this may cause issues with subdirs and so I have not enabled it.
RewriteBase /

RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest

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

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
$phpver = phpversion();

if($phpver >= "4.0.4pl1")
{
if(extension_loaded("zlib"))
{
if (headers_sent() != TRUE)
{
$gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]);
if ($gz_possible) ob_start("ob_gzhandler");
}
}
}
else if($phpver > "4.0")
{
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
if(extension_loaded("zlib"))
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);

header("Content-Encoding: gzip");
}
}
}
}

#
#-----[ REPLACE, WITH ]------------------------------------------
#

//
// Begin keyword urls mod
//

//while (@ob_end_flush());
ob_start();


function make_url_friendly($url)
{

$url = trim($url);

$url = strtolower($url);

// Fix for most recent topics block
// or else a b is shown in every url
$find = array('<b>',
'</b>');
$url = str_replace ($find, '', $url);

$url = preg_replace('/</0>/', 'image', $url);

$find = array(' ',
'&quot;',
'&',
'rn',
'n',
'/',
'\',
'+',
'<',
'>');
$url = str_replace ($find, '-', $url);

$find = array('ÃÂÂ ©',
'ÃÂÂ ¨',
'ÃÂÂ «',
'ÃÂÂ ª',
'Ãà ¢Ã¢â€š ¬Ã‚ °',
'È ',
'Ãà ¢Ã¢â€š ¬Ã‚ ¹',
'ÃÅÂ  ');
$url = str_replace ($find, 'e', $url);

$find = array('ÃÂÂ ­',
'ÃÂÂ ¬',
'ÃÂÂ ®',
'ÃÂÂ ¯',
'ÃÂ

Re: Mod conflict - phpBB SEO keyword URLs Mod by Webmedic

PostPosted: Mon Feb 05, 2007 1:42 pm
Author: Teelk
Is that the full mod? I haven't been able to find webmedics version since his site went down. I'd like to update this for 1.4.1, since gzip and some others things have changed since this mod was released(for IM 1.3.2. I believe).

Re: Mod conflict - phpBB SEO keyword URLs Mod by Webmedic

PostPosted: Mon Feb 05, 2007 4:54 pm
Author: tekguru
Hi Teelk, it is the complete part of that Mod, the entire archive though contained other data/mods which I've yet to apply. I'll attach the entirety here for your delectation.

If you can update the Mod itself (and / or the rest of the files) to be 1.41 complaint that would be wonderful!

Keep us posted!

PostPosted: Thu Feb 08, 2007 10:23 am
Author: tekguru
Any thoughts on this at all Teelk?