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

General question but very important question

Quote Reply
General question but very important question
I am maintaining huge website and now I am testing Links under subdirectory of my home page at http://www.slavophilia.net/pages/. If I find it perfect, I will move home page from there to http://www.slavophilia.net. What do I have to change in order to do this?
Quote Reply
Re: General question but very important question In reply to
You could use a redirector, an alias, or the easiest way would be to make a copy of the Links.pm file, change the paths to point the root directory of your server rather than the pages directory.

When you are ready to move the site,

Make sure you have the permissions on your root directory set to allow the program to write pages, copy the new Links.pm over the old, and rebuild.

If you were careful, the rebuild should go without a hitch, and the new root URL will be your main one.

I've done this several times moving the beta to the public version.

You can then rm -R the pages directory, to reclaim that space.

------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/







Quote Reply
Re: General question but very important question In reply to
If you are on a shared server, I wouldn't recommend making your main htdocs directory world writeable (which Links SQL needs). Also, it makes it much easier if you want to wipe out Links SQL generated pages only.

What I would do is keep Links SQL building in /pages/ directory and then add:

DirectoryIndex index.html index.htm index.shtml /pages/index.html

to a .htaccess file and put that in your root directory. This will bring up the /pages/ directory whenever someone requests the www.yoursite.com. It will be 100% transparent to the user.

Alternatively, if you have FollowSymLinks on in your conf file, you can do:

ln -s /full/path/to/pages/index.html index.html

from within your main htdocs directory. This will acomplish the same thing.

Cheers,

Alex
Quote Reply
Re: General question but very important question In reply to
I agree about the world writable, and realized it after I wrote the message, but it is an option -- albeit not the best.

Aliases or Symlinks are the best way to go.

The main reason is as mentioned -- the ability to rearrange the server. If you are set up to use symlinks or aliases, you can develop the new site, change the symlinks or alias, and it's up and running. You can then delete, or update the old one, and flip between them for development and upgrades.

Alex -- since a lot of people want to use Links as a main/top portal, what about allowing the HOME page to be placed in a different directory than the rest of the database? That file would have to have more lax permissions, but it's one file. That way, people could more easily set links up as the main way to get to their site, without having to modify the server or have super-user permissions. The pages would still be built in the "pages" tree, but the Top or Home page could be a level or two higher.

------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/







Quote Reply
Re: General question but very important question In reply to
Hi,

Like many others around here I'm considering the Links 2.0 to Links SQL upgrade.

Code:
$site_footer = qq~</TD></TR></TABLE>~;
$file2 = "/path/to/file/pointer3.txt";
open (FILE, $file2) or die "Can't open $file2 ($!)";
@lines = <FILE>;
close FILE;
foreach $line (@lines) {
$site_footer .= $line;
}

Will I still be able to make use of that method?

Thanks,
Dan
Quote Reply
Re: General question but very important question In reply to
Dan,

Both Links 2 and Links SQL operate in the same way when building pages. The web server creates an index.html in the main pages directory, and then a directory for each top level category and so on.

If you are able to build without changing permissions, one of a couple things could be going on:

1. Your web server is using CGIwrap or suEXEC to run as your own userid. This is nice in that your pages are created as your own user, and you don't need to worry about setting anything world writeable.

2. The files already exist and are world-writeable.

3. The home directory already exist and is world-writeable.

Other then that, I'm not sure what else it could be. The DirectoryIndex wouldn't interfere with your 404 cgi script.

As for the mods:

Rating with images - I think this can all be done in Templates, if not, it would be very simple to move over.

Add Confirmation - would need to be implemented, never seen this one before, so not sure how hard it is to do.

Priority links - similiar concept, but easier to do in Links SQL. 1. Add a new field called Priority from the web based admin, 2. Set the sort order in Links.pm to sort by priority first.

The include code - You can just use <%include filename.txt%> in your template to include it in.

Cheers,

Alex
Quote Reply
Re: General question but very important question In reply to
Hi Alex,

Thanks for the quick replies. I'm guessing #1 is the case, considering I built all the pages and links directories from scratch (as opposed to creating a /links/ directory, chmoding it, and building under that; everything was built at root level). As long as it will work the same in SQL, it sounds as if there won't be any problems there.

The mods definitely sound simpler with Links SQL. The image ratings mod shouldn't have anything to do with the templates (except for link.html), as it currently is in site_html_templates.pl.

Thanks,
Dan