Gossamer Forum
Home : Products : Links 2.0 : Customization :

detailed pages

Quote Reply
detailed pages
Would it be possible to get links to store the detailed page urls in the links data base instead of the normal urls?
If so how would you do this?

Quote Reply
Re: detailed pages In reply to
I believe this has been talked about before. Try searching the forum.

Actually thinking about it should be easy to do. To get the detailed pages built inside your category directories you could just go into nph-build.cgi and replace your build detailed page sub with this:

sub build_detailed_view {
# --------------------------------------------------------
# This routine build a single page for every link.
#
my (@values, $id, %rec, $count);
if ($build_detail_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
print "\t";
open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
LINE: while (<DB>) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp;
@values = &split_decode ($_);
$id = $values[$db_key_pos];
%rec = &array_to_hash (0, @values);
$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");
open (DETAIL, ">$build_root_path/$rec{'Category'}/$id$build_extension") or &cgierr ("Unable to build detail page: $build_root_path/$rec{'Category'}/$id$build_extension. Reason: $!");
print DETAIL &site_html_detailed (%rec);
close DETAIL;
$use_html ?
print qq~<a href="$build_root_path/$rec{'Category'}/$id$build_extension" target="_blank">$id</a> ~ :
print qq~$id ~;
(++$count % 10) or print "\n\t";
}
close DB;
print "\n";
}

Then just alter the link to the detailed page in link.html.




Good Luck!

Glenn
Host Links
http://cgi-resource.co.uk/links
Quote Reply
Re: detailed pages In reply to
What I was really trying to acomplish was to get jump.cgi to count the hits on the detailed pages only. Your Idea about puting the detailed pages under categories did not work with jump.cgi, I thought it would and really appriciate the time you took to come up with this mod.
I did find out on my own how to make jump.cgi count the hit s on detailed pages.
here is what you do (this only works so far with detailed pages in a directory under the main build url)
In jump.cgi on line 126.
change this
print "Location: $build_root_url/$id$build_extension\n\n" :
to this
print "Location: $build_root_url/Detailed/$id$build_extension\n\n" :

Thats it, this works perfect, it counts the hits to my detailed pages from my category pages.
Here is my link.html code
<%if YearMakeModel%>
<ul><li><%YearMakeModel%>
<%endif%><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">Click here for photograph and details</a>

<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>

<%if isPopular%>
<small><sup class="pop">pop</sup></small>
<%endif%>

<small class="date">(Added: <%Date%> Hits: <%Hits%> </small></li>

</ul>
I do not even have a url data base in my links.def because I am using links for a catalog and not for outside links. My category pages show a brief listing of the article and a link to the detailed page where the item is fully described with photo and price and features. By being able to get a hit count I can see how popular an item is so I can adjust the inventory to match each items popularity.
Again Thanks for the help it was really appriciated.
Bob Stennett

Quote Reply
Re: detailed pages In reply to
Yeah sorry about that, I miss read your post.

Good Luck!

Glenn
Host Links
http://cgi-resource.co.uk/links
Quote Reply
Re: detailed pages In reply to
I might have miss stated what I was trying to do. I have read a lot of post about counting detailed pages and there were a lot of complicated scemes to do this but I found out the simple answer was just to insert /Detailed/ between the lines already there. Going thru all of these post I see a lot of complicated answers that don't need to be that complicated to solve, one person was trying to get links to put the home page categories in a single column instead of two, there were several complicated answers that would work. The simple answer was to eliminate the inside "</TD></TR><TR><TD>" in the scritpt.

Quote Reply
Re: detailed pages In reply to
In Reply To:
one person was trying to get links to put the home page categories in a single column instead of two, there were several complicated answers that would work. The simple answer was to eliminate the inside "</TD></TR><TR><TD>" in the scritpt.


Which page do I delete it from?

- Hunter

Quote Reply
Nevermind (Re: detailed pages) In reply to
Found it... no need to respond Crazy

- Hunter

Quote Reply
Count Detailed In reply to
http://www.gossamer-threads.com/...ew=&sb=&vc=1