Gossamer Forum
Home : Products : DBMan : Customization :

Help Please -Short Long Mod

Quote Reply
Help Please -Short Long Mod
I have installed the short_long mod and everything works
fine, except I have to click on the 3 times before it will
jump to the long mod.
http://www.stillpoint.org/schedule/schedule.shtml. Just enter an * and then click the links.....?

First Click: http://stillpoint.org/cgi-bin/schedule/db.cgi?db=default&uid=default&USER_SEARCH=USER_SEARCH&view_records
=USER_SEARCH&keyword=*&view_record=Go&First+Name=
&view_record=Go&sb=2&so=ascend&view_record=Search&Last+
Name=&State=&view_record=Go&sb=2&so=ascend&mh=10&Country=&sb
=2&so=ascend&ma=YES&mh=10&so=ascend&nh=1&mh=1


Second Click: http://stillpoint.org/cgi-bin/schedule/db.cgi?
db=default&uid=default&USER_SEARCH=USER_SEARCH&view_records
=USER_SEARCH&keyword=*&view_record=Go&First+Name=
&view_record=Go&sb=2&so=ascend&view_record=Search&Last+
Name=&State=&view_record=Go&sb=2&so=ascend&Country=&sb=
2&so=ascend&ma=YES&mh=10&so=ascend&mh=1&nh=1&mh=1


Third Click: http://stillpoint.org/cgi-bin/schedule/db.cgi?
db=default&uid=default&USER_SEARCH=USER_SEARCH&view_records=
USER_SEARCH&keyword=*&view_record=Go&First+Name=&view_record
=Go&sb=2&so=ascend&view_record=Search&Last+Name=&State=&view
_record=Go&sb=2&so=ascend&Country=&sb=2&so=ascend&ma=YES&
so=ascend&mh=1&mh=1&nh=1&mh=1


I have also enclosed sub html_record.

Thanks in advance for your help.

Tommy

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
# This is the "short display" -- the list of records that are returned
# from a search.

my (%rec) = @_;

# create link to full display
$record_number = ((($nh - 1) * $db_max_hits) + $rec_count);

$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";

print "<TD>"; # do not remove this! It is necessary to make the records display properly

# Below is where you define what you want to appear for each record in the "short" display.
# You can make this whatever you want, and display as many fields as you would like.
# Choose which of the fields you would like for users to click on to reach the full display
# of records and use that field name in place of "Title" below.
#
# Be sure that you use <a href="$long_url"> for the link to your full record display.

# <-- Start of short display formatting -- >

print qq|
<a href="$long_url">$rec{'Last Name'}</a>
|;

# if you want to display your fields in columns, use the following format:
# print qq|
# $rec{'Field'}</td>
# <td>$rec{'Field'}</td>
# <td>$rec{'Field'}</td>
# <td>$rec{'Field'}|;

# Add or remove columns as needed. Be sure you add the $long_url link to one of your fields

# <-- End of short display formatting -- >

print "</TD>"; # do not remove this! It is necessary to make the records display properly

}


Quote Reply
Re: Help Please -Short Long Mod In reply to
Hi Tommy, there are several areas in the search form which are causing the problems. I'm not real sure what changes you've made on the form but at least a couple variables are repeated over and over in the form.

Can you post your code from sub html_view_search ?
I believe that's where your problem is at - I have modified the file and added User-Friendly and Short-Long mods also and do not have the same problem you are experiencing.

~ Karen

Quote Reply
Re: Help Please -Short Long Mod In reply to
Thank You Karen,

Here is the sub routine.

I really appreciate your help.

Tommy


sub html_view_search {
# --------------------------------------------------------
# This page is displayed when a user requests to search the
# database for viewing.
# Note: all searches must use GET method.
#

$page_title= "Search Stillpoint Graduate";
&html_page_top;

$submit_button = "View Records";
$reset_button = "Reset Form";

# < -- Start page text -- >
print qq|

|;
# < -- End page text -->

print qq|
<form action="$db_script_url" method="GET">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

&html_record_form();

&html_search_options;

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom;
}

Quote Reply
Re: Help Please -Short Long Mod In reply to
Well Tommy, don't see the problem there either :-) Can you save the file as a text file and upload it to your server where I can take a look at the file?

Quote Reply
Re: Help Please -Short Long Mod In reply to
Karen,

The entire program is on the server at:
/usr/local/etc/httpd/cgi-bin/schedule/*.*

Let me know if you need anything.

Again, thanks so much for your help... it's my birthday so I stepped out for supper!

Tommy

Quote Reply
Re: Help Please -Short Long Mod In reply to
Karen,

I was calling the search from an html page .... switched back to the sstandard search page and it got rid of the problem. Maybe I will call it from inside and use SSI to make it look like the rest of the site.

Thank you so much.
Tommy