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

NOT -> $db_detail_url for newbies

Quote Reply
NOT -> $db_detail_url for newbies
I seemed to have found a bug in site_html_templates.pl and in links.cfg.

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 0;
$build_detail_path = "$build_root_path/Detailed";
$build_detail_url = "$build_root_url/Detailed";


BUT Crazy + Crazy = Frown

in site_html_templates.pl under sub site_html_link


return &load_template ('link.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});

my solution take your pick and use either of the variables but not both Wink

Veterans, please feel free to correct me on this, since i don't know perl or this script very well in fact.

Boy, I could've saved lots of debugging time if I found this in a simple place and I thought that this was one mod or another screwing me over. Frown

Well, I'm sure all the pro's out there all ready knew this Wink fearless leaders please pity those of us who don't which way is up and share the way to nirvana, that way we can cut down on tums/coffeee/and cigarettes -- saves money too by the way.

sorry getting a little carried away, frustration makes people edgy and written words wil be misuderstood, don't forget we are all beg-iners at one time or another.

Quote Reply
Re: NOT -> $db_detail_url for newbies In reply to
"I seemed to have found a bug in site_html_templates.pl and in links.cfg."

There's no bug there, you do need both!


$build_detail_path = "$build_root_path/Detailed";
This specifies the path to the detailed pages directory. (It's used in nph-build sub build_detailed_view)

$build_detail_url = "$build_root_url/Detailed";
This is used to give the url to the detailed pages directory. It's different to $build_detail_path

detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
This is used to give url to a detailed page of a specific link.


Hope this helps explain things alittle.


Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: NOT -> $db_detail_url for newbies In reply to
okay, don't want to start a war over this especially since you obvious know more than me (this is not intended to be sacastic) cause I just don't know perl Frown and I agree without you saying it that I didnt make myself clear about the "$build_detail_path + " these I agree shouldn't be messed with. sorry...

but what I couldn't figure out was where "$db_detailed_url" is being tied with "$build_detail_url"
which made me wonder if you did use <%detail_url%> on a template why you'd get errors?? I am using the script fresh off this site, no outside templates (though I do like those better), just the ones that come with 2.0.

which led me to just change

detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
to
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",

then <%detail_url%> would work just fine.

please correct me if I'm wrong, I'm just trying to help. and thanks for straigtening out the mess I almost made of links.cfg


Quote Reply
Re: NOT -> $db_detail_url for newbies In reply to
Oh right I see what you mean. You're right it should be:

detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",

I looked at m ysite_html_templates.pl and it already was

detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",



Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: NOT -> $db_detail_url for newbies In reply to
I noticed this as well. $db_detailed_url is not defined anywhere, so it won't work. Once I changed it to
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension" it worked fine. (Although I did have to modify link.html to accept the detail link instead of the jump.)