Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

I'm thinking of switching links to....

Quote Reply
I'm thinking of switching links to....
I new that subject would get you in here.

I am about to set up links 2 on one site, which is a tilde URl (~mic) and later will get a domain name. How will transferring all the data from one URL to another affect the pathing and all the files and directories.

Mic
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Hiya makker,

That Attention Grabber - was almost about to gain you a smack if I'd read IndexFinger Smile kiddin'

On the most part the only file you should have to reconfigure would be links.cfg once that is the done the rest will build accordingly. Though you'll need to delete all the other files by hand or programmatically (pain in 'da butt Frown)...

If you have made modfications to other files you may need to look at their pathing...I don't know for sure but you might need to hide the tilde in your configuration files...you'd do this like this:
/\~username/ <== (hidden)
/~username/ <== (not hidden)

Try without first but if you get error messages this is the first place I'd look.

Good Luck
Rod

[This message has been edited by phoule (edited April 11, 1999).]

[This message has been edited by phoule (edited April 11, 1999).]
Quote Reply
Re: I'm thinking of switching links to.... In reply to
 
Quote:
Though you'll need to delete all the
other files by hand or programmatically (pain in 'da butt )...

Which files are you referring too. I would hate to add all my existing url's only to find I would have to start over when I make the switch to a .com address

Mic
Quote Reply
Re: I'm thinking of switching links to.... In reply to
I think he is referring to the html pages that get built. This may or may not be necessary once you have a domain name, depending on whether or not the domain address will be point to the same ~yourname directory on your server when the domain name is activated. Only your ISP will know that for sure.

For example, let's say your setup right now uses a path such as:

/.../.../public_html/~mic/links

When your ISP activates the domain name for your account, he can point to the same ~mic directory (but it won't show as ~mic under the domain name) or your domain may be pointed to another directory someplace. If it gets point to another directory, then you will probably need to delete the built pages from the ~mic/links directories manually.

I hope this is clear (it is rather a simplified explanation).
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Hello,

Here is what will happen on my server before and after a domain is registered.

It will change from

/home/users/mic/CGI-BIN/links to

/home/users/mic/newdomain/CGI-BIN/links

Now my question is this: I currently have a Canada Business Directory with about 2000 links that I want to convert to the links ver 2 script.

I have set up the links script, using the first path, and it is ready to recieve the 2000 links, which I will enter manually. Probably take a month.

When I get the domain, I will need to transfer them again, using the second path. I would hate to loose any information or directory structure and have to start over. I am hoping that I can just upload all files to the new folders of the second path and it will be done.

Of course I would change the links.cfg file to reflect new paths to cgi files.

Now why don't I just wait for the domain name and do it once, you ask? I cannot afford the monthly fee involved with hosting a domain and its necessary disk space. So I want to get started where it is in the tilde site.

Makes sense?

Quote Reply
Re: I'm thinking of switching links to.... In reply to
What is linkmat.cgi? Post a small sample of how the links are stored and I'll see if I can put together a conversion script for you..

By the way, you could have saved a lot of messages by stating from the beginning that you wanted to switch from linksmat.cgi to Links.

Cheers,

Alex

[This message has been edited by Alex (edited April 12, 1999).]
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Poor bobsie...all that typing for nothing.

I am not using links ver1 or indexfinger. using linkmat.cgi

SO.....I will be ok with my dilemma...right?
Quote Reply
Re: I'm thinking of switching links to.... In reply to
makker,

If I were you I would definately try to find some programmatic of converting your current linkmat.cgi database over to a links format...Hell I'm so lazy (curse myself for what I'm about to say Smile) If I had 2000 links that I couldn't find a way to programmatically make the conversion I don't think I'd make the switch...

Rod
Quote Reply
Re: I'm thinking of switching links to.... In reply to
I hear ya Phoule,

But if you were to compare my current Canada Business Directory www.weblife2000.com/provinces.htm with the Links format and all its admin functions, you probably would make the switch.

I am a patient man and have no quams about converting. However, if you can help me find a conversion script, I would be more than happy Smile I wouldn't begin to know where to look.

NOW....no one has actually answered emphatically, my original post question.
Quote:
SO.....I will be ok with my dilemma...right?


MIC Smile
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Makes sense to me. However, you should not have to reenter your 2000 links manually. If you are upgrading from Links v1, there is a script that comes with Links v2 that will upgrade your links.db to v2 format for you. It is called upgrade.pl and is located in the root Links directory when you extract the archives (same place where the readme and upgrade text files are). Just put that script in your Links v1 data directory, chmod it to 755, chmod the data directory to 777, and copy your links.db to that directory as well. Then, execute upgrade.pl and it will create a file called links2.db which will be in the v2 format.

Once that is done, rename the original links.db to something else, then rename links2.db to links.db. Edit your categories.db file to replace all occurances of NULL with nothing (i.e., if "|NULL" is in the file, change it to "|"). That should do it. Now you can test the program once you have updated links.cfg.

I hope this helps.
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Sorry Alex,

I didn't think of that. Wasn't expecting anyone too make a converson script. Who would have thunk it.

Here is a sample of the database file linkmat.cgi stores.


The categories I am going to use are the same categories for each province.

Let me know if you need the cgi files or coressponding directories for this program.

Mic

[This message has been edited by makker (edited April 12, 1999).]

[This message has been edited by makker (edited April 12, 1999).]
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Alex,

I have a copy of linkmat that I used to use (before I found Links). According to the docs, this is the format of the links data file (each field is delimited by the pipe symbol):

Quote:
Default field names are:
0. Category
1. Website Title
2. URL
3. Description
4. Name
5. E-Mail address
6. DateStamp (added by script)
7. Newline (\n) character

Another file, link.cfg, contains the actual category names that correspond to the Category field in the above description. Again, according to the docs, that file's format is:

Quote:
Line 1 is for the body tag to be used on results pages.
Line 2 is the title shown on results pages.
Starting with line 3, fill in your category names one per line, for up to 90 categories. Delete any stray blank lines.

A sample list of categories, taken from the default linkmat links.cfg looks like this (the "&" in the category names are actually "& amp;" in the file, without the space):

Quote:
Arts/Entertainment
Business/Finance
Computers/Internet
Education
Government/Politics
Health/Medicine
Living & Leisure
News & Reference
Science/Technology
Sports
Travel

Makker,

I think the above is more what Alex was looking for, or, at least, is all he really needs to write the conversion script. If you would be so kind as to edit your post and delete the database lines you entered or, change the code and /code to quote and /quote respectively, we won't have to vertically scroll to read this thread anymore. Smile

[This message has been edited by Bobsie (edited April 12, 1999).]
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Makker,

Here's your emphatic reply: YES! You will be OK. You won't lose any data from your database. The worst case scenario is that you will have to delete the generated html files off the old account. But the database of links will still be intact and useable.

Phoenix
Quote Reply
Re: I'm thinking of switching links to.... In reply to
Thank you Phoenix,

Tis what I was hoping to hear.

P.S. Let me know Alex

Mic