Gossamer Forum
Home : Products : Gossamer Links : Discussions :

import or conversion script?

Quote Reply
import or conversion script?
Alex,

Any basic import or conversion script?

It seems:

The Category import: "Father" equals the ID of the category that matches the level to the left of the last '/'

The Links are imported minus the CategoryID, and the Link.ID is then paired with the appropriate Category.ID in the

The CategoryID is paired with the ID from the Links table in the CatLinks table.

The real "Trick" seems to be the first part... importing the Categories properly, then matching the old Links.CategoryID to the new Category.ID and importing the link record.

Everything else should come from a reindex, it seems.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: import or conversion script? In reply to
An import script is in the works. It will be more robust then the Import.pl, and will handle importing from Links SQL, Links 1.x, Links 2.x and backup files.

Your right about the category structure, it will be the biggest hurdle to manage. It looks like:

Name => Name of the category. Just the last part, so if this is Computers/Hardware/Video Cards, Name would be just Video Cards.

FatherID => ID number of the parent category, or 0 if it is a root level category. So it would be the ID number of Computers/Hardware.

Full Name => Full Name of the category, just like in Links SQL now. So it would be 'Computers/Hardware/Video Cards'.

This is handled behind the scenes though. When entering in a new category you just enter in the categories name, and the parent (either Root or another category). Or if you are using the browser, you just click add underneath the category you want.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: import or conversion script? In reply to
How about a quick and dirty script to convert 1.1x to the next gen, so we can start to really play with it??

The folks coming from 2.0 don't really need a conversion script until the programs released.

What about adding a column to the Category table during import, that contains the old CategoryID. Then, once the categories are parsed in, the links are imported using that field, and that field can then be dropped?



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: import or conversion script? In reply to
What about importing the categories, leaving the "Father" field blank,
but preserving the old Category.ID (either as the new ID, or in a field).

Then, on a second pass, setting the "Father" field to the ID of the category that matches the "Full Name" to the left of the last '/'

The "FatherID" would be equal to the Full_Name trim "/Name"

That might work... :)

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: import or conversion script? In reply to
Actually, I did a few SQL statements, and imported the FAQ into the New Links.

So, the concepts are sound :)

Check http://pugdog.com/LinkSQL/pages

One buglet... the "Days_Old" tag isn't working right. What's the equivalent in this version???

BTW... that will be the new location of the FAQ once the next version is released as a beta... the shortcut will be pugdog.com/FAQ and the old URL's will _hopefully_ be rewritten to send you to the new domain. (Paths all stay the same... just the domain changes).


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: import or conversion script? In reply to
BTW.... the "jump.cgi" doesn't work right, since it's the 'generic' version 1.2 jump.cgi, and of course my links use my customized format to decide to jump internally or externally -- that will be fixed shortly, but for now, DEAL WITH IT <G> (ie: use the 'stable' FAQ site <G>)

Just figured I would say that before someone complained --- it's NOT a Links 1.2 bug, it's the fact I have customized link formats to decide where to jump.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: import or conversion script? In reply to
Hi I cant access some area of admin, due to problems, can you let me know what the new Multiple Category submission is like, we were told we would get something where we could make multiple submissions instead of one, Has this been implimented.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: import or conversion script? In reply to
I'm not sure what you mean.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ