Firefox PHP

conversion script v3->v5 that preserves internal links

Posted by pat 
pat
conversion script v3->v5 that preserves internal links
June 20, 2004 12:22AM
Hi,
the topic pretty much says it all - I would really like to keep the links from thread to thread that people in my forum already made. In the current Version the conversionscript does not convert internal links...

thanx
pat
Re: conversion script v3->v5 that preserves internal links
June 24, 2004 04:53PM
There was talk of a module to do this. The only problem is that message ids are changed in the conversion making it nearly impossible to do.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
pat
Re: conversion script v3->v5 that preserves internal links
July 05, 2004 11:03PM
Hi Brian,

I still don't understand why that should be impossible, maybe I'm to simple minded.

If I have the old url on one hand and the new url on the other there should be a way to determine what has changed and apply it to all the other (internal) links aswell.

old:
[www.xyz.com]

new:
[www.xyz.com]

it doesn't look that different to me, where is the big deal?

Re: conversion script v3->v5 that preserves internal links
July 06, 2004 12:25AM
the big deal is that you just don't have both urls available at the same time ... also the second will be different, not using the same ids.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
pat
Re: conversion script v3->v5 that preserves internal links
July 10, 2004 07:30PM
Hi Thomas,

> the big deal is that you just don't have both urls
> available at the same time ...

Why not? I had both available at the same time in fact I took the urls above from my phorum installation one v3 the other v5, as the old tables are not overwritten during conversion, you have both Versions parallel on the same server and in the same db what more can you ask for?

> also the second will be different, not using the same ids.

as you can see they are the same, but that might be because I only have 1 Forum and another two in a folder.

Is it not possible to ask the user to provide the urls of one thread per forum before and after conversion, as a basis to start the conversion via script throughout the whole db?

pat



Re: conversion script v3->v5 that preserves internal links
July 10, 2004 07:42PM
> you have both Versions parallel on the same server and in the same db what more can you ask for?

I could ask for having only ONE forum, never before other posts in your p5-tables and so on.

Again, it doesn't work if you have more than one forum.
Crosslinking between multiple forums in one install would be even worse.

You could probably do it this way (no promises that it really works):

- go through all the forums, collect each ones LOWEST message_id
- go through all the messages,
- search for INTERNAL-links through your phorum-install
- parse each link at take its forum-id, message-id, thread-id
- set message-id to old message-id + lowest message-id of this forum - 1
- same for thread-id
- store that message again


this could only work AFTER all conversion is done (to have the data there for ALL forums) and never in the conversion-script itself as it puts a great strain on your server and might run even longer than the conversion itself.



Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
pat
Re: conversion script v3->v5 that preserves internal links
July 10, 2004 08:01PM
Hi Thomas,

> this could only work AFTER all conversion is done
> (to have the data there for ALL forums) and never
> in the conversion-script itself.

Yes, thats fine. I don't care if conversion is done in one or two steps, or if I have to call one or two sripts during the proceedure, all I care about, that migrating from v3 to v5 doesn't srew up the structure of my phorum.

There is a net of links between threads which add a lot to the usability of the forum especially for people who search for something specific. It would be a shame to loose that, I mean it took people years to knit that net...

I thought of keeping the old v3-install (only read), just for the links, but then I would have to give the v5-install a different url. That of course would be quite a crutch but it seems to be the simplest approach.

thanx pat
Re: conversion script v3->v5 that preserves internal links
July 13, 2004 04:52PM
I just thought of something. We have the msgid field in the messages tables. It does not change and is unique. I don't know how, but it is possible it could be leveraged to make this happen.

It may mean keeping you P3 tables around and writing a mod that does a lookup in them for the msgid and then creates the proper Phorum 5 url.

It is a lead anyway.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
pat
Re: conversion script v3->v5 that preserves internal links
July 14, 2004 09:07PM
Hi brian & Thomas,

thank you for your concern, I'll try to work it out one way or an other...

thanx
pat
Sorry, only registered users may post in this forum.

Click here to login