Quote:
Originally Posted by jbeam
Code:
http://thenewx.org/phpbb2/profile.php?mode=viewprofile&u=1594
This is an example of one of the old URL's. From what I can tell it looks right.
|
That is a default link for the profile and what the script is expecting, the default in the script should be fine, just set the domain :
PHP Code:
$old_folder = 'phpBB/'; // With trailing slash
$old_ext_type = '.php'; // Including preceding dot
Quote:
Originally Posted by tommythejoat
Jerry,
I am planning to install this for my bbV2 migration. I presume there is no reason to keep all the code for the other message board combinations with the conditionals, switches and so forth. I can just hard code it for the bbV2 url forms.
|
Yes, you don't need any of it, it's the import id's in the vBulletin tables and this script that take care of the look ups and refrences to old data.
Quote:
Originally Posted by tommythejoat
bbV2 does not support displaying posts independently of threads, and does not support displaying user profiles externally. I was planning to just provide the translation of thread and forum references.
|
Half the work then
Quote:
Originally Posted by tommythejoat
Since bbV2 is a Perl script, the form of the urls are /bbBoard.cgi?a=viewthread;fid=3;gtid=305734 for a thread and bbBoard.cgi?a=viewforum;fid=3 for a forum. I could use your logic for the forum, but I will need to use a regular expression to skip the fid piece for threads.
|
True, for the forum it looks like a fixed length string with the forumid on the end so crop the string and what ever is left is the forum id, as for the thread id, i'd use this :
PHP Code:
// It's a thread link
if (strpos($_SERVER['REQUEST_URI'], "/{$old_folder}{$old_thread_script}") === 0)
{
$action = 'thread';
$old_id = intval(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], 'gtid=')+5));
$sql = "SELECT threadid FROM {$tableprefix}thread WHERE importthreadid={$old_id}";
}
Where :
PHP Code:
$old_folder = "";
$old_thread_script = "bbBoard.cgi?a=viewthread";
For :
PHP Code:
$_SERVER['REQUEST_URI'] = "/bbBoard.cgi?a=viewthread;fid=3;gtid=305734";
Quote:
Originally Posted by tommythejoat
As mentioned in my previous response, I was modifying this tool to work with a bbBoardV2 migration.
A question comes up with respect to migrating between two different servers. The old server is still alive and clearly this script needs to run on the new server where vBulletin is located. If I put a redirect on the old board in place of the bbBoard.cgi script, I think that will handle it, but I am not sure.
|
You could update the DNS to send the old requests to the new server and have the web server handle it.