Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Detailed Pages And Directory

Quote Reply
Detailed Pages And Directory
Hi.
Two Qstns.

(1) I have a custom_column in Links Table which is holding 'unique' six digit alphanumeric code. Instead of having Detailed Pages built as <%ID%>.html i would want it to be <%column_value%>.html Yes this custom_column can be used as template tag as the same is being used in Title of the Detailed Page.

How Do I Do This? What needs to be changed and where?

(2) Why is Detailed Directory Without It's Own index.html page? I had asked this in one of earlier threads. How to get a index.html in Detailed directory also, carrying an linked index (on Title) of all the Detailed Pages ....

TIA
Anup
Quote Reply
Re: [anup123] Detailed Pages And Directory In reply to
Hi,

1) Good luck :) You have to modify Build.pm, Page.pm (if using page.cgi), nph-build.cgi, Tools.pm (I think)... and something else. Its quite a deep change, as it requires all the detailed page link codes to be modified (and the "next" and "prev" buttons to not build correctly if you are using them).

In short, you would be better using mod_rewrite to do this :)

2) I'm not quite sure why you are trying to do this? You could just use Yogi PageBuilder plugin, so that it grabs a list of all your links, and then builds static pages linking to them. I'm assuming this is for SEO related stuff? Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed Pages And Directory In reply to
(1). Tried mod_rewrite (the one's suggested on this forum) and always get 404 though the url's are being re -written. So gave that up.

(2). I was just wondering as to why as LinksSql evolved over the years, a Static index.html page was never considered for Detailed directory. Was it intentional or accidental.... i am not clear.

Yep it is SEO related where i would like to have a DETAILED link right on home page of Links ...

TIA
Anup


=_= =_= =_= =_= =_= =_=


You can chain me, you can torture me, you can even destroy this body, but you will never imprison my mind.
-Mahatma Gandhi
Quote Reply
Re: [Andy] Detailed Pages And Directory In reply to
Hi.

This does it but it generates a dirty list of links by filename. Could this be somehow modified to list the Links by Title and perhaps add some pagination :)


#!/usr/bin/perl
#
# Set the variables
$file_dir = "/home/username/public_html/Detailed";
$file_dir_url = "http://somesite.com/Detailed";
# These specify the directory where all the files you want links added for
# are located. The first is their path on the server, the second is
# thier URL.
$link_file = "/home/username/public_html/Detailed/links.html";
# This is the name of the file which will be created. DO NOT
# specify an existing file, because the contents of it will
# be overwritten by these links.
$links = "http://somesite.com/Detailed/links.html";
#
# That's all there is to it. You can edit the resulting file to your heart's
# content. Be sure to chmod the script to 755. This script can (and should)
# be run from the Unix shell rather than a browser. (A web browser should
# be able to run it, but then the resulting file will be owned by nobody
# and the directory where the file is created would need by be chmod 777)
#################
opendir(FILES,"$file_dir");
@allfiles = grep(!/^\.\.?$/,readdir(FILES));
closedir(FILES);
@allfiles = sort(@allfiles);
open(NEW,">$link_file");
foreach $file(@allfiles){
print NEW "<A href=\"$file_dir_url/$file\">$file</a><br>\n";
}
close(NEW);
print "Location: $links\n\n";
exit;

Any help on this??

TIA
Anup