PDA

View Full Version : vB 3.6.0 as source incoming links after import



Razasharp
Thu 17th Aug '06, 12:03pm
Hi Jerry - another fairly important request if possible please, and that is when importing is it possible to keep thread ID's the same?

Thanks.

Colin F
Thu 17th Aug '06, 1:03pm
No, that's not possible. You can set up a script that catches 404 errors and redirects those to the correct thread though.

Razasharp
Thu 17th Aug '06, 1:05pm
It was a suggestion for the 'new' Impex Jerry is working on - especially in terms of people using it as a disaster recovery option :)

Jerry
Thu 17th Aug '06, 1:26pm
It was a suggestion for the 'new' Impex Jerry is working on - especially in terms of people using it as a disaster recovery option :)

There is no way that is possiable, its the same as userid mapping.

http://www.vbulletin.com/docs/html/impex_terminology

Razasharp
Sat 19th Aug '06, 10:03pm
It 'seems' to have sortof worked on this last import...

On all threads (I have tested so far) I just need to add 8189

So the thread:

http://www.mysiteB4import.com/showthread.php?t=1

is

http://www.mysiteAfterImport.com/showthread.php?t=8190

on the site after the import (I had to run the importer twice).

So are you saying this formula will 'break' on other threads? If not I could probably get a mod-rewrite written to direct all old threads to the new places (I moved domains too so they won't conflict with each other).

Unless you know how I can delete the first 'attempt' of the import (there are no duplicate threads etc as I cleared them all before running the import again) so they have the same IDs on both new/old.

(please feel free to split this if you'd rather it in a new thread)

Jerry
Sun 20th Aug '06, 5:33pm
ImpEx will not force id's into a database for an import, that would break any existing data, I will not ever make it do that, its the primary requirement of ImpEx to protect the database.

If you have moved URL's you can use this :

http://www.vbulletin.com/forum/showthread.php?t=178161

Though i would have to update it for vB3 support if you are thinking of using it.

Razasharp
Sun 20th Aug '06, 8:47pm
Thanks Jerry - I'll look into that thread, and get back to you.

Zachery - what do you mean? The forum has moved to a new domain and the threads were imported via Impex (therefore no longer have the same thread IDs as the originals did).

Razasharp
Sun 20th Aug '06, 8:53pm
ImpEx will not force id's into a database for an import, that would break any existing data, I will not ever make it do that, its the primary requirement of ImpEx to protect the database.

If you have moved URL's you can use this :

http://www.vbulletin.com/forum/showthread.php?t=178161

Though i would have to update it for vB3 support if you are thinking of using it.


Hi Jerry

Yes please could you update it for vB3 too?

Thanks!

Jerry
Sun 20th Aug '06, 9:00pm
Hi Jerry

Yes please could you update it for vB3 too?

Thanks!

On the to-do, list :) Should be pretty easy ;)

Razasharp
Sun 20th Aug '06, 9:18pm
Thanks Jerry :)

Jerry
Mon 21st Aug '06, 9:44pm
Thanks Jerry :)

Done, 404.php has been updated.

Razasharp
Tue 22nd Aug '06, 7:21am
Thanks Jerry... but it's not working :-/

These are my settings


// System

#Currently supported : 'phpBB2' 'ubb.threads' 'vb3'

$old_system = 'vb3';

// Domain
// Example :: http://www.example.com/phpBB/

$old_folder = 'oldfolder';
$standard_404 = 'http://www.old-domain.co.uk/index.htm'; // The usual 404 that this script replaces

// Example :: http://www.example.com/vBulletin/

$new_domain = 'newdomain';
$new_folder = '';
$ext_type = 'php'; // File extension type that vBulletin is using, i.e. index.php

// Database
// This is the vBulletin database, needed for import id look up and logging
$server = 'localhost';
$user = 'myNEW3.6site_user';
$password = 'mypassword';
$database = 'myNEW3.6site_db';
$tableprefix = '';

// System
$refresh_speed = 0; // Speed of the redirect, 0 advised.
$do_logs = true; // Always best to log to see that its working and if there are any "Unknown link type, talk to Jerry" links
$do_404 = false; // true = a 404 (Not Found) redirect. false is a 301 search engine friendly redirect (Moved Permanently)

The new vB is in the root so I just left the setting '' - was that right?
I took down showthread.php and put index.htm as the normal 404 to test, and when I go to a showthread page it just goes to the index.htm but nothing else happens.

The old vb3 was in: mysite.co.uk/oldfolder
the new 3.6vb is in: mynewsite.com

I created the new 404 error table in the new database - was it meant to be created in the old one?

I used htaccess to specify your 404 as the 404 (that works as it goes to index.htm which I specified in your script).

Any ideas?
Feel free to split/move this post as you see fit.
Thanks.

Jerry
Tue 22nd Aug '06, 3:40pm
The new vB is in the root so I just left the setting '' - was that right?

Yes, though I can see how that would break the script, as I've left in the / for the folder on the redirect. If you check the script in the download now, the var must include the trailing slash, so if its all blank it dosn't leave double slasshes on the redirect URL.


I took down showthread.php and put index.htm as the normal 404 to test, and when I go to a showthread page it just goes to the index.htm but nothing else happens.

You have to configure the webserver to use this 404.php script as the 404 redirect now.

If you are using apache thats :



ErrorDocument 404 /404.php





I created the new 404 error table in the new database - was it meant to be created in the old one?

As it has its own config it can be in either or any database, personally I set it up with the target database then review it ever day at the beginning to see whats getting through.


I used htaccess to specify your 404 as the 404 (that works as it goes to index.htm which I specified in your script).


As for .htaccess check out this :

http://www.vbulletin.com/forum/showpost.php?p=1194124&postcount=48

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond

Razasharp
Tue 22nd Aug '06, 8:27pm
Sorry Jerry still not working.

Just to confirm - Htaccess is working because the 404 page is whatever I specify inside your script (I used index.htm as a test, see below). So that tells me it's going to your script, but your script is just sending the user to the normal 404 page (or whatever I specify as the 404) and not the new location. Do I need to check anything in my new DB? To check the import IDs are still there for eg?

Also, the DB user and password I entered are for the NEW db, I assume this is right?

Here are the settings I used:


// System

#Currently supported : 'phpBB2' 'ubb.threads' 'vb3'

$old_system = 'vb3';

// Domain
// Example :: http://www.example.com/phpBB/

$old_folder = 'oldfolder';
$standard_404 = 'http://www.OLDdomain.co.uk/index.htm'; // The usual 404 that this script replaces

// Example :: http://www.example.com/vBulletin/

$new_domain = 'www.mydomain.com';
$new_folder = ''; // With trailing slash
$ext_type = 'php'; // File extension type that vBulletin is using, i.e. index.php

// Database
// This is the vBulletin database, needed for import id look up and logging
$server = 'localhost';
$user = 'MYnewDBuser';
$password = 'mypass';
$database = 'MYnewDBname';
$tableprefix = '';

// System
$refresh_speed = 0; // Speed of the redirect, 0 advised.
$do_logs = true; // Always best to log to see that its working and if there are any "Unknown link type, talk to Jerry" links
$do_404 = false; // true = a 404 (Not Found) redirect. false is a 301 search engine friendly redirect (Moved Permanently)


Any ideas as to why its not working?

Thanks.

Jerry
Tue 22nd Aug '06, 8:37pm
On lines 302 and 309 (ish) :



#die('Could not connect: ' . mysql_error());
#die ('Can\'t use foo : ' . mysql_error());


Remove the # and see if it dies with a dB error telling you what is going on.

If its accessible public and you can give me access, open a support ticket and I'll have a look.

Razasharp
Tue 22nd Aug '06, 9:04pm
Just tried that and it's still the same - it goes to index.htm (specified as my 404) via your script...

Anything else it could be?
Does it matter that I've specified index.htm (the homepage) as the acting 404? (I wouldn't have thought so).

Jerry
Tue 22nd Aug '06, 9:06pm
We've covered the basics, without access, I can't really debug it like this.

Razasharp
Tue 22nd Aug '06, 9:14pm
What do you need? FTP and Admin CP?

Jerry
Tue 22nd Aug '06, 9:27pm
What do you need? FTP and Admin CP?

Hmmm, FTP and the old and new URL examples should do it.

Razasharp
Tue 22nd Aug '06, 9:49pm
Have PM'd you the details.

Thanks!

Razasharp
Thu 24th Aug '06, 9:50am
Hi Jerry - did you manage to look into this?

Thanks.

Jerry
Thu 24th Aug '06, 2:00pm
Hi Jerry - did you manage to look into this?

Thanks.

So many people and one of me ;)

I'm looking at it now :)