Gossamer Forum
Home : Products : Links 2.0 : Discussions :

What is the easiest way to add 500 subcategories for each one of 40 category?

Quote Reply
What is the easiest way to add 500 subcategories for each one of 40 category?
Greetings,
Say I have 40 City names as the main categories on may index.html. I want to add for each city name(Category) a 500 subcateogies:

(e.g. Category Miami
Miami/Real_Estates
Miami/Car_Dealers
.
.
Newyork
Newyork/Real_Estates
Newyork/Car_Dealers
.... etc.).

So what is the easiest way to do that?!?! with LINKS2.0 ? I hope I do not have to go through the admin.cgi and add each subcategory for each cateogry one by one. That will take for ever :-o

Can I do this: can I complete one whole city directory including categories and subcategories, then copy the entire directory structure into a new city name in order to create the same directory strucure for the new city?
But where I should Update the CATEGORIES/SUBCATEGORIES IDs for links to use?

Thank you in advance for your help..
Mark
Quote Reply
Re: What is the easiest way to add 500 subcategories for each one of 40 category? In reply to
Small addition: If you do it as Eliot outlined, be sure to set the value in categoryid.txt to the highest record ID in categories.db. That will tell the script what category # to begin with if you add more categories through the admin area.

Dan
Quote Reply
Re: What is the easiest way to add 500 subcategories for each one of 40 category? In reply to
One thing you can do....

Use EditPlus or WordPad to copy the Category/Sub_Category Structure for each state and then paste it under each other in the text editor...You will then have to change the RECORD ID for each of the records.

Then you will have to re-save the categories.db, and upload it your server.

Another suggestion is to use Excel or another spreadsheet program to create your categories.db file (keeping the same structure of fields defined in the category.def file), and then export the spreadsheet into a tab delimited text file...then save the text file as categories.db file, then upload the file to your server making sure that you change the permissions of this file to 666 (rw-rw-rw-).

Regards,

------------------
Eliot Lee
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------













[This message has been edited by Eliot (edited February 18, 2000).]
Quote Reply
Re: What is the easiest way to add 500 subcategories for each one of 40 category? In reply to
Thank you Eliot and Dan for your help. I will be working on it...
Regards..
Mark