Gossamer Forum
Home : Products : DBMan : Customization :

Newest Records with Short/Long display

Quote Reply
Newest Records with Short/Long display
Hi everyone,

I have been having trouble making the Newest Records with Short/Long display play together nicely! I tried the fix that JPDeni created on April 13, 2000 and that mostly worked except that when clicked the Newest record short list (sub html_record_new) linked to the regular short display list (sub html_record) which then linked to the long listing. Is it possible to have the Newest record short list link directly to the long description?

This is what I have altered as per JPDeni's post.

Thanks for your help!

-Dave



Create a new subroutine in html.pl -- sub html_record_new. Copy sub html_record and put it into the new subroutine. In the new subroutine, change

--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------

$long_url = $ENV{'QUERY_STRING'}; $long_url =~ s/\&nh=\d+//; $long_url =~ s/\&mh=\d+//; $long_url = "$db_script_url?$long_url&nh=$record_number&mh=1";

--------------------------------------------------------------------------------


to


--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------

$long_url = "$db_script_link_url&$db_key=$rec{$db_key}&view_records=1";

--------------------------------------------------------------------------------


Then, in sub html_new_records, change

&html_record (&array_to_hash($_, @hits));

to


--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------

&html_record_new (&array_to_hash($_, @hits));

--------------------------------------------------------------------------------
Quote Reply
Re: [daverad] Newest Records with Short/Long display In reply to
I fixed it. I ended up changing the code in the sub html_record_new html.pl under

from $long_url = "$db_script_link_url&$db_key=$rec{$db_key}&view_records=1";

to

$long_url = "$db_script_link_url&$db_key=$rec{$db_key}&view_records=1&nh=1&mh=1";