This will never be supported and direct manipulation of the auto_inc isn't going to be supported due to merge imports, where id's will already exist.
External incoming links
Collapse
This topic is closed.
X
X
-
The auto increment adjustment is a bit wierd and not something I'd expect you to put into ImpEx. I just want to see if I can do it myself.Comment
-
Well, suppose the old board has threadids as high as 1500, but 100 of them were deleted or invalid in some way so the max thread ID ImpEx creates is 1400. I open the board and people start posting. How does it know the difference between thread 1450 (on the old board) and thread 1450 (on the new board)?
Possibly, I've seen a few try it, though it's really not something I want to promote or talk about here as it's a recipe for disaster.Comment
-
I came up with a happy medium for cases in which vBulletin is imported to vBulletin. This lets your members take a stale pre-ImpEx link, like this:
...and change 'show' to 'old', so they get this:
This has to be done BEFORE the ImpEx import IDs are dropped.
First, create a table to map the old to the new:
Code:CREATE TABLE `legacy_thread` ( `oldThreadID` int(10) unsigned NOT NULL, `newThreadID` int(10) unsigned NOT NULL, PRIMARY KEY (`oldThreadID`) ) ENGINE=InnoDB;
Code:insert into legacy_thread select importthreadid,threadid from thread;
Code:<?php // Use this at your own risk. // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'oldthread'); // change this depending on your filename // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $oldThreadID = $vbulletin->input->clean($_REQUEST["t"], TYPE_INT); $sql = $db->query_read( "SELECT newThreadID FROM " . TABLE_PREFIX . "legacy_thread WHERE oldThreadID='$oldThreadID'" ); $result = $db->fetch_Array($sql); $no_thread_URL = "{$vbulletin->options[bburl]}"; if($result[newThreadID]) { header("HTTP/1.1 301 Moved Permanently"); header("Location: showthread.php?t=$result[newThreadID]"); } else { echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $no_thread_URL'>"; } ?>
Comment
-
I'm trying to get my 404 page setup, but coming across problems.
My old forum was in the root directory, my new one in a subdomain.
I've setup my 404.php command like such:
PHP Code:// Domain
// Example :: http://www.example.com/phpBB/
$old_folder = '/'; // With trailing slash
$old_ext_type = '.php'; // Including preceding dot
$standard_404 = 'http://www.example.com/404.shtml'; // The usual 404 that this script replaces
// Example :: www.example.com/vBulletin/
$new_domain = 'http://www.example.com';
$new_folder = 'forum/'; // With trailing slash
$ext_type = '.php'; // File extension type that vBulletin is using, i.e. index.php including the preceding dot
I've uploaded the .htaccess both to the root directory (where the old forum was) and the forum folder.
404.php is in the forum folder.
.htaccess:
PHP Code:ErrorDocument 404 /forum/404.php
Thanks in advance.Comment
-
I've updated a lot of details (removed the subdomain in case that was causing problems) and now everytime I click a link it goes direct to the 404.htm page.
I ran the SQL query listed in the help file and get the result that no files are recorded. It clearly isn't redirecting through the 404.php, and I'm now at a complete loss.
Any suggestions?Comment
-
It was working initially, until it stopped working yesterday, maybe after installed a vRewrite (seo script) plugin.
but i uninstalled it as it was giving problems.
but now, i'm unable to redirect. on debug=true, i get
Action :: thread
SQL :: SELECT threadid FROM vBull_thread WHERE importthreadid = 13197
REQUEST_URI :: /forums/viewtopic.php?t=13197
so why does it go to my not_found?
www.motorolafans.comComment
-
i would like to forward my attachment links as well
is this correct?
// It's a download linkI did this but my debug was funny:
if (strpos($_SERVER['REQUEST_URI'], "/{$old_folder}{$old_attachment_script}") === 0)
{
$action = 'attachment';
$sql = "SELECT attachmentid FROM {$tableprefix}attachment WHERE importattachmentid = " . substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?id=')+3);
}
case 'download':
$new_url = "http://{$new_domain}/{$new_folder}showpost{$ext_type}?attachmentid=" . $row[0];
if ($postcount)
{
$new_url = "http://{$new_domain}/{$new_folder}attachment{$ext_type}?attachmentid=" . $row[0];
}
$action_code = 5;
break;
Action :: download
SQL :: SELECT attachmentid FROM vBull_attachment WHERE importattachmentid = =2955
REQUEST_URI :: /forums/download.php?id=2955
why is there = =2955?Comment
-
One more thing - My link was
but its not converting properly.
I ran debug and got this:
Action :: thread
SQL :: SELECT threadid FROM vBull_thread WHERE importthreadid = orums/viewtopic.php?t=4371
REQUEST_URI :: /forums/viewtopic.php?t=4371&postdays=0&postorder=asc&start=0
Whats wrong?Comment
-
I couldn't find any SMF version of this 404.php, is that possible?
My urls are like this:
Forum Post
xxxhttp://www.domain.com/forums/index.php?topic=226.0
Forum List (All Forums)
xxxhttp://www.domain.com/forums/index.php
Forum List (Specific Board)
xxxhttp://www.domain.com/forums/index.php?board=2.0
Member Profile
xxxhttp://www.domain.com/forums/index.php?action=profile;u=1
Not sure what else is needed
Thanks!Last edited by AffGuardDog; Wed 10 Oct '07, 8:56am.Comment
-
I couldn't find any SMF version of this 404.php, is that possible?
My urls are like this:
Forum Post
xxxhttp://www.domain.com/forums/index.php?topic=226.0
Forum List (All Forums)
xxxhttp://www.domain.com/forums/index.php
Forum List (Specific Board)
xxxhttp://www.domain.com/forums/index.php?board=2.0
Member Profile
xxxhttp://www.domain.com/forums/index.php?action=profile;u=1
Not sure what else is needed
Thanks!Comment
-
-
I've updated a lot of details (removed the subdomain in case that was causing problems) and now everytime I click a link it goes direct to the 404.htm page.
I ran the SQL query listed in the help file and get the result that no files are recorded. It clearly isn't redirecting through the 404.php, and I'm now at a complete loss.
Any suggestions?
TIAComment
-
Finally sorted the problem thanks to the help of a friend. Just a quick explanation of what was wrong in case anyone else has such a problem (my comments are (quasar) followed by my comment):
phpBB2 forum import from a root directory (phpBB2) to a folder (vB3):
PHP Code:$old_folder = ''; // With trailing slash - (quasar) I left this blank as it was in root directory
$old_ext_type = '.php'; // Including preceding dot
$standard_404 = 'http://www.example.com/404.htm'; // The usual 404 that this script replaces (quasar) Full 404 URL, including http://
// Example :: www.example.com/vBulletin/
$new_domain = 'www.example.com'; // (quasar) without the http:// and no trailing slash ('/')
$new_folder = 'forum/'; // With trailing slash (quasar) Note this is the folder without the first slash, but includes the trailing slash
$ext_type = '.php'; // File extension type that vBulletin is using, i.e. index.php including the preceding dot
Then, .htaccess should be like this:
PHP Code:ErrorDocument 404 /forum/404.php
I found that it was a combination of both these that caused the problems.
Hope this helps someone in the future (Please note this doesn't supercede the readme file, but is meant to be a working example)
QuasarComment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment