SEO MOD

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
rwap01
Registered User
Posts: 91
Joined: Wed Jun 04, 2008 11:09 am
Contact:

Re: SEO MOD

Post by rwap01 »

Desi-Instincts wrote:Well this may seem stupid ... but i can't find the .htaccess file in the forum directory ?!!
I can't find it anywhere, I searched for it from the FTP software FileZilla, it didnt show any file. Also checked its setting ... there is no option for hidden files or something.
Secondly, i searched for it directly through my host's admin control panel and still i couldnt find it. So i have come to a conclusion that it doesnt exist !!

I also installed a seperate test forum on my server and still even on the new installation the .htaccess file is not present. Please help ... :?
You may not have a .htaccess file - create one !!
dap1
Registered User
Posts: 2
Joined: Sat Jul 19, 2008 4:59 am

Re: SEO MOD

Post by dap1 »

Thanks that was an easy fix. Too bad there isnt a way to make that fix post more noticeable. You must have to answer the same support questions all the time!
Desi-Instincts
Registered User
Posts: 61
Joined: Sun Jan 06, 2008 7:54 am

Re: SEO MOD

Post by Desi-Instincts »

rwap01 wrote:
Desi-Instincts wrote:Well this may seem stupid ... but i can't find the .htaccess file in the forum directory ?!!
I can't find it anywhere, I searched for it from the FTP software FileZilla, it didnt show any file. Also checked its setting ... there is no option for hidden files or something.
Secondly, i searched for it directly through my host's admin control panel and still i couldnt find it. So i have come to a conclusion that it doesnt exist !!

I also installed a seperate test forum on my server and still even on the new installation the .htaccess file is not present. Please help ... :?
You may not have a .htaccess file - create one !!
What data should it contain ? Could you please help me out with it ? Sorry i have no idea about it....
If you can't beat em' use a shotgun.
Desi-Instincts
Registered User
Posts: 61
Joined: Sun Jan 06, 2008 7:54 am

Re: SEO MOD

Post by Desi-Instincts »

Bump. Please help .... I needed this mod, but it has to make edits to the .htaccess and i dont have it so please could someone help me in making that file ?
If you can't beat em' use a shotgun.
AllGo
Registered User
Posts: 12
Joined: Sun May 04, 2008 12:48 pm
Contact:

Re: SEO MOD

Post by AllGo »

Desi-Instincts wrote:Bump. Please help .... I needed this mod, but it has to make edits to the .htaccess and i dont have it so please could someone help me in making that file ?
Download the original zip-file/tarball for phpbb3, it is in there.
aquinian
Registered User
Posts: 9
Joined: Sat Apr 28, 2007 7:32 am

Re: SEO MOD

Post by aquinian »

Great mod. Thanks for making it. :)

I seem to ahve a bug. Here's my forums: http://www.strobertbellarmine.net/forum ... on-f2.html

If I click on the number "7" for Page 7 of the thread "Necessity of Apostolic Mandate" I get a 404 error. This is because the URL it gives is http://www.strobertbellarmine.net/forum ... 863s90.php

Note the "php" at the end - not "html" as it should be.

Any idea what I have done wrong? Or is this a bug in the code?
Desi-Instincts
Registered User
Posts: 61
Joined: Sun Jan 06, 2008 7:54 am

Re: SEO MOD

Post by Desi-Instincts »

@ AllGo : Thanks for the help, pal. I download phpbb latest version and found the file. However i found in the author notes of the xml file of this mod it says :
"Before installing this mod, run the edits to the .htaccess and browse to yourforum/test-t1.html
If it gives you a 404 error or a 500 error, remove it and do not continue installing this mod.
Your host doesn't support mod_rewrite and you should probably look for a new host."
Here's what i did :
1. Opened .htaccess file and added

Code: Select all

RewriteEngine on

Rewriterule ^(.+)-f([0-9]*).html-(.+)$				./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html-(.+)$			./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html-(.+)$		./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html-(.+)$	./viewtopic.php?$2=$3&start=$4&$5

Rewriterule ^(.+)-f([0-9]*).html$					./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html$				./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html$			./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html$		./viewtopic.php?$2=$3&start=$4&$5
after

Code: Select all

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
as it said. Then i uploaded the edited file to desi-instincts.com/community/ (which is the test forum directory i created recently)

then as the first quoted message shows, i browsed to :
desi-instincts.com/community/test-t1.html and it returned a 404 not found error.

Now the problem is that i checked the server settings and mod_rewrite is support and activated. I am completely puzzled .... Please tell me am i doing something wrong ?
If you can't beat em' use a shotgun.
TigPT
Registered User
Posts: 11
Joined: Wed Jul 16, 2008 3:00 pm

Re: SEO MOD

Post by TigPT »

will this work in 3.0.2? what do you guys advice?

is any global seo mod being developed? something that put static urls, add meta tags, and everything!?

Thanks, and keep the good work ;)
rwap01
Registered User
Posts: 91
Joined: Wed Jun 04, 2008 11:09 am
Contact:

Re: SEO MOD

Post by rwap01 »

TigPT wrote:will this work in 3.0.2? what do you guys advice?

is any global seo mod being developed? something that put static urls, add meta tags, and everything!?

Thanks, and keep the good work ;)
Yes it works in 3.0.2 - no idea about the other SEO solutions and what they offer
rwap01
Registered User
Posts: 91
Joined: Wed Jun 04, 2008 11:09 am
Contact:

Re: SEO MOD

Post by rwap01 »

aquinian wrote:Great mod. Thanks for making it. :)

I seem to ahve a bug. Here's my forums: http://www.strobertbellarmine.net/forum ... on-f2.html

If I click on the number "7" for Page 7 of the thread "Necessity of Apostolic Mandate" I get a 404 error. This is because the URL it gives is http://www.strobertbellarmine.net/forum ... 863s90.php

Note the "php" at the end - not "html" as it should be.

Any idea what I have done wrong? Or is this a bug in the code?
Here we go again - read through and implement all the changes in my Essential Fixes Post.

What a shame the author will not implement these into the actual file download and the MOD team seem unable to help either.

PLEASE PLEASE PLEASE if you are having problems with this MOD, ensure that you have read and incorporated all of the fixes listed in my
Essential Fixes Post


If I could put this at the start of the forum, I would, but alas I cannot and as everyone keeps asking the same questions time and time again, it just get buried more and more.
JohnnyMcKinney
Registered User
Posts: 207
Joined: Thu Nov 23, 2006 3:03 am

Re: SEO MOD

Post by JohnnyMcKinney »

Typing mistake:
Find

'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&start=$start"),

Add after

'S_FORUM_ACTION' => format_url($forum_name, "f$forum_id", $start),


You put add after when it should be Replace, if I am not mistaken?


Also: Is it possible to make all the old links become the new links? If I click a link from google, the site is gets a general error and I don't like that, so I uninstalled it until this is fixed. Seems the author is not updating anything...
Desi-Instincts
Registered User
Posts: 61
Joined: Sun Jan 06, 2008 7:54 am

Re: SEO MOD

Post by Desi-Instincts »

Desi-Instincts wrote:@ AllGo : Thanks for the help, pal. I download phpbb latest version and found the file. However i found in the author notes of the xml file of this mod it says :
"Before installing this mod, run the edits to the .htaccess and browse to yourforum/test-t1.html
If it gives you a 404 error or a 500 error, remove it and do not continue installing this mod.
Your host doesn't support mod_rewrite and you should probably look for a new host."
Here's what i did :
1. Opened .htaccess file and added

Code: Select all

RewriteEngine on

Rewriterule ^(.+)-f([0-9]*).html-(.+)$				./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html-(.+)$			./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html-(.+)$		./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html-(.+)$	./viewtopic.php?$2=$3&start=$4&$5

Rewriterule ^(.+)-f([0-9]*).html$					./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html$				./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html$			./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html$		./viewtopic.php?$2=$3&start=$4&$5
after

Code: Select all

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
as it said. Then i uploaded the edited file to desi-instincts.com/community/ (which is the test forum directory i created recently)

then as the first quoted message shows, i browsed to :
desi-instincts.com/community/test-t1.html and it returned a 404 not found error.

Now the problem is that i checked the server settings and mod_rewrite is support and activated. I am completely puzzled .... Please tell me am i doing something wrong ?
Hey someone please help ?? !! Was this post invisible ? :lol: :?
If you can't beat em' use a shotgun.
rwap01
Registered User
Posts: 91
Joined: Wed Jun 04, 2008 11:09 am
Contact:

Re: SEO MOD

Post by rwap01 »

Desi-Instincts wrote:
Desi-Instincts wrote:@ AllGo : Thanks for the help, pal. I download phpbb latest version and found the file. However i found in the author notes of the xml file of this mod it says :
"Before installing this mod, run the edits to the .htaccess and browse to yourforum/test-t1.html
If it gives you a 404 error or a 500 error, remove it and do not continue installing this mod.
Your host doesn't support mod_rewrite and you should probably look for a new host."
Here's what i did :
1. Opened .htaccess file and added

Code: Select all

RewriteEngine on

Rewriterule ^(.+)-f([0-9]*).html-(.+)$				./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html-(.+)$			./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html-(.+)$		./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html-(.+)$	./viewtopic.php?$2=$3&start=$4&$5

Rewriterule ^(.+)-f([0-9]*).html$					./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html$				./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html$			./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html$		./viewtopic.php?$2=$3&start=$4&$5
after

Code: Select all

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
as it said. Then i uploaded the edited file to desi-instincts.com/community/ (which is the test forum directory i created recently)

then as the first quoted message shows, i browsed to :
desi-instincts.com/community/test-t1.html and it returned a 404 not found error.

Now the problem is that i checked the server settings and mod_rewrite is support and activated. I am completely puzzled .... Please tell me am i doing something wrong ?
Hey someone please help ?? !! Was this post invisible ? :lol: :?
Is this your own server or one provided by a hosting company? It looks as though your server does not recognise the .htaccess file.
construaprende
Registered User
Posts: 59
Joined: Tue May 18, 2004 7:40 pm
Location: Mexico
Contact:

Re: SEO MOD

Post by construaprende »

Hi
I installed this mod in my phpbb3 test forum, and works great
I have some questions

I have a phpbb2 forum, with another mod for SEO
I am going to upgrade it
I already made an upgrade test

Buy some of my url's are some different, and I would like to know at least how to solve some cases

Example:
I have in my old forum:
MYFORUMTITLE-vf4.html
But with this SEO MOD, I have:
MYFORUMTITLE-f4.html

(The same for TOPICS)

How to add the "v"?
I tried in .htaccess file, but results in errors

The original MOD I installed is:

Code: Select all


##############################################################
## MOD Title: 		phpBB SEO keyword URLs
## MOD Author: 		webmedic (bah@webmedic.net) <Brook Humphrey> http://www.webmedic.net
## Original code from:	http://www.webmasterbrain.com/forum/question-static-sef-urls-for-phpbb-vt34.php
## MOD Description: 	This mod makes static URLs for phpBB
## 			Please read the author notes BEFORE using this mod.
## 			Check http://www.webmedic.net/phpbb-google-msn-yahoo-seo-keyword-urls-mod-vt28667.html
## 			for the latest version or to get help with this MOD
##
## MOD Version: 	2.3.0
##
## Installation Level: 	(Advanced)
## Installation Time: 	5 Minutes
## Files To Edit: 	(3)
##			.htaccess,
##			page_header.php,
##			page_footer.php,
##			overall_footer.tpl
## Included Files: n/a
##############################################################
## Author Notes:
## Use this mod together with the manage bots mod already included with integramod
## Make backups and test this on a test forum if you can. This is not a typical mod.
## This version is not like all the other mod rewrite and search engine optimization mods
## out there. It will make your urls into keyword phrases. to do this it rewrites the url
## to look like the topic or forum title.
## To see this mod in action please goto:
## http://www.webmedic.net/index.php
##
## LICENSE:
## Due to some issues with others taking my work and not offering proper credit
## (in as much as they have removed my credits and added their own) I have added
## a LICENSE.TXT. I have decided to license this under the RPL which states you can not
## remove my credits and if you make any modifications you have to resubmit the modifications
## to me for includion into this toolkit again. You can read the license for yourself for
## further info. It is also an open source license that has been deemed ok by osi.
##
## Along with this I now require a link to use this mod. If you don't want to have the
## linkback I will remove the requirement for a linkback for a small fee. If you are
## interested in removing the link please contact me at bah@webmedic.net
##
## All previous versions are licensed under the rpl from 6/29/2005
##
##############################################################
## MOD History:
##
##   2005-08-14 - Version 2.3.0
##	- Fixes for header errors and code clean up
##	- Added new characters to make url friendly function
##	- I went up a whole revision number as there were quite a few little bug fixes.
##	  I also want to start a new thread for this.
##
##   2005-07-15 - Version 2.2.3
##	- small fix for some header issues.
##
##   2005-07-03 - Version 2.2.2
##	- Dissabled some of the page optimizations to fix issues with some javascripts
##	  and css.
##	- Added keyword meta tags to the zip.
##
##   2005-06-29 - Version 2.2.1
##	- Added LICENSE.TXT after finding a few other sites taking credit for this mod.
## 	- Added footer text for usage of this mod.
##	- Changed order of the install to help with any errors that may occur durring install.
##	- Fixed a few issues with overly optimizing the pages.
##
##   2005-06-24 - Version 2.2.0
##	- Rewrote some of the code for the smartor album again. This time it is more
##	   comprehensive and should fix even unforeseen issues.
##	- Added new features so that when the page is being gziped it also removes
##	   Unwanted comments, spaces, tabs, line feeds, and carriage returns. This also
##	   makes the page smaller and helps to speed things up.
##
##   TODO: Fix forward and back links as well as links within threads that have multiple pages.
##
##   2005-06-21 - Version 2.1.0
##	- Rewrote a good portion of the smartor album code so that it works better.
##	- Added support for categories hierarchy thanks to 993ti at the
##	   www.webmedic.net forums.
##	- Fixed major bug with phpbb were gzip was not working properly at all ever.
##	   This mod fixes that issue so that gzip encoding now works properly.
##
##   2005-06-19 - Version 2.0.2
##	- Fixed small issue with " showing up in the url as -quot-
##	  This was due to phpbb changing " to " which is correct
##	  but still does not look good in a url. So now it is completely removed.
##
##   2005-06-14 - Version 2.0.1
##	- Fixed small issue with url's not being rewritten if the site was using gzip compression.
##	- Fixed some of the string replace entries to not look for more than one space
##	- added < and > to the string replace functions
##
##   2005-06-07 - Version 2.0.0
##	- Added ability to use with pafiledb mod
##	- Added ability to use with kb mod (NOT WORKING YET)
##	- Added ability to use with Smartor album mod
##	- Added German umlauts & special characters (thanks to m³)
##	- Modified the way links are generated somewhat.
##	  Hopefully the new method will catch a few things the old one did not.
##
##   2004-11-03 - Version 1.1.0
##	- Added replacements for /, \, and foreign character sets.
##
##   2004-08-22 - Version 1.0.0
##      - Initial public release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ 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,1})img(.*?)(\/{0,1})\>/', 'image', $url);

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

	$find = array('é',
		'è',
		'ë',
		'ê',
		'É',
		'È',
		'Ë',
		'Ê');
	$url = str_replace ($find, 'e', $url);

	$find = array('í',
		'ì',
		'î',
		'ï',
		'Í',
		'Ì',
		'Î',
		'Ï');
	$url = str_replace ($find, 'i', $url);

	$find = array('ó',
		'ò',
		'ô',
		'Ó',
		'Ò',
		'Ô');
	$url = str_replace ($find, 'o', $url);

	$find = array('ö',
		 'Ö');
	$url = str_replace ($find, 'oe', $url);

	$find = array('á',
		'à',
		'â',
		'Á',
		'À',
		'Â');
	$url = str_replace ($find, 'a', $url);

	$find = array('ä',
		 'Ä');
	$url = str_replace ($find, 'ae', $url);

	$find = array('ú',
		'ù',
		'û',
		'Ú',
		'Ù',
		'Û');
	$url = str_replace ($find, 'u', $url);

	$find = array('ü',
		 'Ü');
	$url = str_replace ($find, 'ue', $url);

	$find = array('ß');
	$url = str_replace ($find, 'ss', $url);

	$find = array('ç');
	$url = str_replace ($find, 'c', $url);

	$find = array('/[^a-z0-9\-<>]/',
		'/[\-]+/',
		'/<[^>]*>/');

	$repl = array('',
		'-',
		'');

	$url =  preg_replace ($find, $repl, $url);

	$url = str_replace ('--', '-', $url);

	return $url;

}



function rewrite_urls($content)
{

	function if_query($amp)
	{

		if($amp != '')
		{
			return '?';
		}

	}

	$url_in = array('/(?<!\/)viewforum.php\?f=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)\.\/viewforum.php\?f=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)viewtopic.php\?p=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)viewtopic.php\?t=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

			'/(?<!\/)album_cat.php\?cat_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)album_thumbnail.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)album_pic.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)album_picm.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			//'/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(<img .*?)<\/a>/e',
			'/(?<!\/)album_showpage.php\?full=&pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)album_showpage.php\?pic_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)album_personal.php\?user_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)dload.php\?action=category&cat_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)dload.php\?action=file&file_id=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)kb.php\?mode=cat&cat=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)kb.php\?mode=article&k=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)kb.php\?mode=stats&stats=mostpopular((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)kb.php\?mode=stats&stats=toprated((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)kb.php\?mode=stats&stats=latest((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)press.php\?mode=cat&cat=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)press.php\?mode=article&k=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)press.php\?mode=stats&stats=mostpopular((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)press.php\?mode=stats&stats=toprated((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
			'/(?<!\/)press.php\?mode=stats&stats=latest((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e');

	$url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-ac\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-at\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-apic\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-apm\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			//"'show-pic-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"'image-full-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-aper\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-dc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-df\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-kbc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-kba\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\5') . '-kbsmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
			"make_url_friendly('\\5') . '-kbstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
			"make_url_friendly('\\5') . '-kbsl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
			"make_url_friendly('\\6') . '-pc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\6') . '-pa\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
			"make_url_friendly('\\5') . '-psmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
			"make_url_friendly('\\5') . '-pstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
			"make_url_friendly('\\5') . '-psl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'");

	$content = preg_replace($url_in, $url_out, $content);

	return $content;

}


//
// end keyword urls mod
//

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

includes/page_tail.php

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

if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}

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

//
// begin keyword urls mod
//


if( function_exists(ob_gzhandler) && $board_config['gzip_compress'] == 1)
{
	$gzip_contents = rewrite_urls(ob_get_contents());
	ob_end_clean();
	ob_start('ob_gzhandler');
	echo $gzip_contents;
	ob_end_flush();
}
else
{
	$contents = rewrite_urls(ob_get_contents());
	ob_end_clean();
	echo $contents;
	global $dbg_starttime;
}

//
// end keyword urls mod
//


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

/templates/THE TEMPLATE YOUR USING/overall_footer.tpl

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

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group

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

Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> {PHPBB_VERSION} &copy; phpBB Group <a href="http://www.webmedic.net/seo-toolkit-vf46.html">SEO toolkit &copy; 2004-2005 webmedic</a>


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Another question
If I have my topics:

xxx-yyy-or-any-text-vt952.html
How can I make (in .htaccess) that this old urls go to (redirect to):
viewtopic.php?t=952

Thanks a lot
luazo
Registered User
Posts: 5
Joined: Sun Jun 08, 2008 5:51 am

Re: SEO MOD

Post by luazo »

I have 2 problem, please help me

First: I use it in a Vietnamese forum, I give an examle, my forum has a topic named "Diễn đàn Trung học TPHCM", so the link on the address is : http://www.forum.trandainghia.info/main ... TPHCM.html. But if you copy this link to another one. It becomes "http://www.forum.trandainghia.info/main ... TPHCM.html . I want to change its name to English like : á changes to a, ê changes to e, etc. How can I do that?

Second: A topic in my forum has 8 pages. So if I click on the name of the topic, It's ok. But when I click on the page number under the name of the topic, it shows me " The page cannot be displayed". And after 30 minutes, i discover the link is wrong. When I click on the number under the name of the topic, the link is " http://www.forum.trandainghia.info/main ... 29s160.php" and if I change the extension "php" to "html" like this "http://www.forum.trandainghia.info/main ... 9s160.html", it's ok. How can I change it automatically? Because my members will not know it.

Please help me with 2 problems above. Thank you very much :(
Locked

Return to “[3.0.x] MOD Database Releases”