this about how I moved vbseo to ZiontsSEO without loosing any pages that has been crawed by google already
I tested with vbulletin 3.5 and 3.6
rewrite rules (using lighty )
PHP Code:
url.rewrite-once = (
"(?i)^/([a-z0-9_-]*-(f|all)[0-9]+(p[0-9]+|/index[0-9]*)?.html).*$" => "/forumdisplay.php",
"(?i)^/([a-z0-9_-]*-(t|p)[0-9]+(p[0-9]+|/index[0-9]*)?.html).*$" => "/showthread.php",
"(?i)^/(archive|sitemap)/(.*)$ " => "/$1/index.php/$2",
#that's the vbseo part
"(?i)^/members/?([^.]+).html$" => "/member.php?mn=$1",
"(?i)^/([a-z-_]+)/?(?:index([0-9]+).html)?$" => "/forumdisplay.php?ft=$1&page=$2",
"(?i)^/[a-z-_]+/([0-9])+[^.]+.html$" => "/showthread.php?t=$1",
}
add to functions_zseo.php end
PHP Code:
#functions for getting forum ids from title
#by walid aly http://walid.kurtubba.com
function zeo_get_forumid($string)
{
global $vbulletin;
$bit = iif($vbulletin->options['zointsseo_url_separator'], '_', '-');
$string = str_replace('-',$bit,$string);
foreach($vbulletin->forumcache as $forums){
if(zseo_cleaned_string($forums['title']) == $string)
return $forums['forumid'];
}
return 0;
}
#functions for getting member ids from username
#by walid aly http://walid.kurtubba.com
function zeo_get_memberid($string)
{
global $db;
if($u = $db->query_first("
SELECT username, userid
FROM " . TABLE_PREFIX . "user
WHERE username LIKE '".$db->escape_string($string)."'
LIMIT 1
")){
return $u['userid'];
}
return 0;
}
edit file product-zointsseo-2.2.2.xml inside the plugin source files
find
PHP Code:
<hookname>init_startup</hookname>
<phpcode><![CDATA[require_once(DIR . '/includes/functions_zseo.php');
$vbulletin->zointsseo = array();
if ($vbulletin->options['zointsseo_on'])
{
replace with
PHP Code:
<hookname>init_startup</hookname>
<phpcode><![CDATA[require_once(DIR . '/includes/functions_zseo.php');
$vbulletin->zointsseo = array();
if ($vbulletin->options['zointsseo_on'])
{
if(isset($_REQUEST['mn']) && THIS_SCRIPT == 'member' )
$_REQUEST['u'] = $_REQUEST['userid'] = zeo_get_memberid($_REQUEST['mn']);
find
PHP Code:
if (THIS_SCRIPT == 'showpost')
{
$_REQUEST['p'] = $_REQUEST['postid'] = intval($zinfo['id']);
}
}
replace with
PHP Code:
if (THIS_SCRIPT == 'showpost')
{
$_REQUEST['p'] = $_REQUEST['postid'] = intval($zinfo['id']);
}
}else{
if(isset($_REQUEST['ft']) )
$_REQUEST['f'] = $_REQUEST['forumid'] = zeo_get_forumid($_REQUEST['ft']);
}
if you've already installed the hook you can do that through 'Plugin Manager' in your admincp on 'Hook Location : init_startup -> Zoints Search Engine Optimization'
- it might not work if you're using datastore file class as it's cached, try to reupload the default datastore_cache.php file that came with vBulletin source