Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

importing links

Quote Reply
importing links
Question:
I'm having problems importing from a file. What do I need to enter into the box?

Import data to Links table!
You can either import from a file or you can cut and paste the contents into a textarea box. If you have a large number of records, you should really import from a file. If you use quick mode, the file must contain the same number of fields as the current table, and in the same order. If you don't use quick mode, the first line of either the file or the text box must be a list of column names!

Import data from file: or from textarea box:

http://link-fabulous.com
Groovy adult links
Quote Reply
Re: [HotMop] importing links In reply to
You need to mirror the field structure of your LINKS table in your flat file.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] importing links In reply to
I've tried copying and pasting the entire file but apparently it's too large...1.5 megs. How can I import the file? Any examples for an idiot Blush
http://link-fabulous.com
Groovy adult links
Quote Reply
Re: [HotMop] importing links In reply to
I would use the upload or path option for importing rather than pasting the file into the text box.

When I said mirror...I meant that there has to be the same number of field separated by pipe delimiters in your flat file versus the number of fields you have in your LINKS table.

I can't be more clear than that.

Best of luck!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] importing links In reply to
Eliot,
I tried using a path from my harddrive to upload the file.

example.
c://windows/....

also, I've tried uploading for the host
web/link/.....

What method is correct as neither of these will work.


http://link-fabulous.com
Groovy adult links
Quote Reply
Re: [HotMop] importing links In reply to
One of the things that changes when upgrading to LinksSQL is the category linking method. LinksSQL uses category ID numbers to refer to categories, whereas Links uses the actual category name.

This means that a straight 'import' of your old record text through the Admin panel of LinksSQL (Table Maintenance > Links > Import Data) won't work because the category names won't be translated to their relevant LinksSQL Category ID numbers.

You should have a directory within your LinksSQL installation called setup(/cgi-bin/links/admin/setup) or similar. This contains a script that imports your Links text files and maps your category names to the new LinksSQL Category ID's, as well as importing all your Link records.

Within this directory you'll need to place copies of the following text files from your old Links installation:

categories.db
category.def
links.db
links.def
url.db
validate.db
email.db

You begin the import process by calling /cgi-bin/links/admin/setup/import.cgi from your browser, but there are a few notes to consider before attempting this:

• The import is designed for a new/clean installation of LinksSQL and is best used on an 'empty' table set
• If you have custom fields in your old Links files, you should add these to your LinksSQL tables with the same name before starting the import
Caution should be taken to backup all your files (Links) and tables (LinksSQL) before attempting an import, with a special note for the .def files in your LinksSQL installation

When you run the import script it will report any errors to your browser screen. Take note of these as they may inform you of records that have NOT been imported for one reason or another, or of fields that have not been added or are not found in the tables.

If, during the import, certain records/fields are not imported, you'll need to start again (after correcting the error) with a clean table set, i.e.; empty all your LinksSQL tables.

You may find that the first time import doesn't complete, if not, make a note of the errors and 'fix' them before attempting to import again. Each time you carry out the import and 'fix', you'll find it gets through more and more records and eventually it'll do the lot Smile

Hope this helps.

All the best
Shaun
Quote Reply
Re: [qango] importing links In reply to
Quote:
• The import is designed for a new/clean installation of LinksSQL and is best used on an 'empty' table set

......although it does work with non-empty tables...