Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

How to add links from text file

Quote Reply
How to add links from text file
Hi All

Newbie to links here and I have a text file full of links and descriptions. Anyone know a way for me to auto add them to the links database? I understand that I would have to put a category number with each url or something. I just hate to add every url by hand one at a time. We run a closed directory (don't allow outsiders to add links) and we have thousands of links to add.

Thanks for any and all comments!
Quote Reply
Re: [bizopp] How to add links from text file In reply to
I find this easiest to setup in MS Excel. Get your data in columns - the first row of your file should be the field names (here's one I've used)
lsql_Links.URL|lsql_Links.Title|lsql_Links.Description|lsql_Category.ID|lsql_Category.Name|
lsql_Links.Contact_Name|lsql_Links.Contact_Email|lsql_Links.LinkOwner|lsql_Links.Add_Date|
lsql_Links.Mod_Date|lsql_Links.Hits|lsql_Links.isNew|lsql_Links.isChanged|lsql_Links.isPopular|
lsql_Links.isValidated|lsql_Links.Rating|lsql_Links.Votes|lsql_Links.Status|lsql_Links.link_claimable

You must include values for the lsql_Category.ID and lsql_Category.Name fields - don't have a lsql_Links.ID field - it will automatically be assigned.

After getting your data ready in MS Excel - export it as a tab-delimted file. Open the exported file in a text editor and convert the tabs to | and remove the quote around your description field. Use FTP to upload this text file (using a text transfer) to the Admin directory. Go to the Links Property page and use the Import link (at the bottom of the page). Give it the name of the file and _do not_ repeat _do not_ click the replace old links checkbox at the bottom. The first time you do this read the error message carefully as they are informative.

After successfully importing - click the Repair Tables in the left hand column (this will update your link count) and you are done.

- Tom Ransom
HighTechTraveler.com
Quote Reply
Re: [transom] How to add links from text file In reply to
THANKS for the help!

I followed what you said and it worked just fine. You saved me a ton of time and work.

Thanks again