It's not something that could easily be worked out on a forum such as this. If you are trying to have un-modified vb3.8 urls redirected to the proper threads after an xf conversion, I *might* be able to help - but I would need access to the account. PM me if you want me to try.Still haven't gotten this figured out, anyone have an idea?
Dean, thank you. It appears I figured this one out at the last minute.
All my redirects are going to forum home, so I assume I have a problem with my import log table. My table is archived, anyone see anything wrong with this from my 301config? My log looks to be inside my xenforo database.
define('IMPORT_LOG_TABLE', 'archived_import_log');
In http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/ you find the newest release, version 6. There is a script 301config.php included. This script includes text about how to use this script. However this text is not commented. That's why this script does not work. Fix is to outcomment the text or just delete it.Dean, thank you. It appears I figured this one out at the last minute.
<?php
/* ----------------------------------------------------------- *\
This variable defines where XenForo is installed.
If you have not installed XenForo into the same directory in which
vBulletin was installed, you will need to provide the full path to
the XenForo directory here. Remove the leading // and then enter
the path as in the following examples:
$fileDir = '/home/example/public_html/new_forums';
$fileDir = 'C:/inetpub/wwwroot/xenforo';
\* ----------------------------------------------------------- */
// $fileDir = '/home/username/www/forums';
/* ----------------------------------------------------------- *\
This constant defines the table from which the import redirection
scripts will fetch their data. Normally they will use the table
'xf_import_log', but if you have archived your import data, you
should provide the name of the archive table here. Remove the
leading // and then replace 'import_log_x' with the name of your
archive table, as in the following examples:
define('IMPORT_LOG_TABLE', 'my_import_log');
define('IMPORT_LOG_TABLE', 'import_log_my_forums');
\* ----------------------------------------------------------- */
// define('IMPORT_LOG_TABLE', 'import_log_x');
<?php
/* ----------------------------------------------------------- *\
This variable defines where XenForo is installed.
If you have not installed XenForo into the same directory in which
vBulletin was installed, you will need to provide the full path to
the XenForo directory here. Remove the leading // and then enter
the path as in the following examples:
$fileDir = '/home/example/public_html/new_forums';
$fileDir = 'C:/inetpub/wwwroot/xenforo';
\* ----------------------------------------------------------- */
// $fileDir = '/home/username/www/forums';
/* ----------------------------------------------------------- *\
This constant defines the table from which the import redirection
scripts will fetch their data. Normally they will use the table
'xf_import_log', but if you have archived your import data, you
should provide the name of the archive table here. Remove the
leading // and then replace 'import_log_x' with the name of your
archive table, as in the following examples:
define('IMPORT_LOG_TABLE', 'my_import_log');
define('IMPORT_LOG_TABLE', 'import_log_my_forums');
\* ----------------------------------------------------------- */
// define('IMPORT_LOG_TABLE', 'import_log_x');
Change showthread.php to thisAnother suggestion:
In the redirection script showthread.php first check the post id and then the thread id to fetch the more specific page / message when a url includes both page and thread information. In general, always check the most specific urls and then go more general.
Now showthread.php?t=234&p=234 would redirect always to the first page. But if the post would be on the third page, my suggestion would redirect not only to the right third page, but also anchors directly to the post which is excellent.
$target = false;
if ($input['p'])
{
$newId = $importModel->mapPostId($input['p']);
if ($newId)
{
$target = XenForo_Link::buildPublicLink('canonical:posts', array('post_id' => $newId));
}
}
else if ($input['t'])
{
if ($newId = $importModel->mapThreadId($input['t']))
{
$target = XenForo_Link::buildPublicLink('canonical:threads', array('thread_id' => $newId));
}
}
$input = $inputHandler->filter(array(
't' => XenForo_Input::UINT,
'p' => XenForo_Input::UINT,
'page' => XenForo_Input::UINT
));
$importModel = XenForo_Model::create('XenForo_Model_Import');
$target = false;
if ($input['p'])
{
$newId = $importModel->mapPostId($input['p']);
if ($newId)
{
$target = XenForo_Link::buildPublicLink('canonicalosts', array('post_id' => $newId));
}
} else if ($input['t'])
{
if ($newId = $importModel->mapThreadId($input['t']))
{
if($input['page']) { $tmp_addtourl = "page-" . $input['page']; }
$target = XenForo_Link::buildPublicLink('canonical:threads', array('thread_id' => $newId)) . $tmp_addtourl;
}
}
https://www.vbulletin.com/forum/showthread.php/387006-Thanks-to-Steve-Machol?p=2203237&viewfull=1#post2203237
We use essential cookies to make this site work, and optional cookies to enhance your experience.