Gossamer Forum
Home : Products : DBMan : Customization :

Single header output issues

Quote Reply
Single header output issues
ok i have db running and everything is working smoothly except one thing. when i installed and used the custom script from http://www.gossamer-threads.com/...gle%20header;#117232 for the Single Header table it works fine but for some reason it doesnt show the 1st record of the db. so if i have 10 items it only shows 9 on the table? why is it hiding it. and if i lets say want to only see 1 record, it doesnt display anything at all! why is that?

Here is the examples
list all http://www.egidiosimonelli.com/...w_records=1&ID=*


only one record http://www.egidiosimonelli.com/...ecords=1&ID=1009


and this is what my DB looks like
1000|DO NOT DELETE|DO NOT DELETE|XXXX
1001|Galleria Beliar |Caracas, Venezuela|1976
1002|Galeria Radio City |Caracas, Venezuela|1978
1003|Galleria Arte A.Z. |Caracas, Venezuela|1983
1004|Palazzo Frissaco |Tolmezzo, Italy|1995
1005|Galleria Artemisia |Udine, Italy|1996
1006|La Sibilla |Tarquinia, Italy|2002
1007|GAVAC |Viterbo, Italy|Feb. 2003
1008|Associazione Culturale Perseo |Rome, Italy|Jun. 2003
1009|World Fine Art Gallery |New York, U.S.A.|Jul. 2003
1010|Associazione Culturale Perseo |Rome, Italy|Sep. 2003
1011|Morgantown Art Expo|Morgantown WV USA|Nov. 2003

i added the first one with DO NOT DELETE as a dummy entry so that when i used the list all it displayed all the entries i wanted which is fine with me because it technically works but the problem goes further. If i needed to display the list in descending order then it will hide the last record added. So that is why i need to resolve this issue as i want to be able to display the records in descending order so from the last entry to the first one.

can anyone give me any help on this??

here is the code i added on html.pl and db.cgi

added subroutines to html.pl (or in my case exhibitions.pl)
sub html_table_top {
my (%rec) = @_;
print &build_html_table_top(%rec);
return;
}
sub html_table_row {
my (%rec) = @_;
print &build_html_table_row(%rec);
return;
}
sub html_table_bottom {
my (%rec) = @_;
print &build_html_table_bottom(%rec);
return;
}

then replaced
the output for the records in the same file to
print "<P>";
for (0 .. $numhits - 1) {
if ($_ == 0) {
&html_table_top (&array_to_hash($_, @hits));
} else {
&html_table_row (&array_to_hash($_, @hits));
}

and in the db.cgi added
sub build_html_table_top {
# --------------------------------------------------------
# Builds table column header based on the config information.
#
my (%rec) = @_;
my ($output, $field);
$output = "<p><table width=68% border=0 cellpadding=4 cellspacing=0 align=center>";
{
$output .= qq~
<tr bgcolor=1E356C> <td width=40%>
<div align=left><font color=CEE3FD><font size=4 face=Arial, Helvetica, sans-serif>
Event</font></font></div>
</td>
<td width=40%>
<div align=left><font color=CEE3FD><font size=4 face=Arial, Helvetica, sans-serif>Location</font></font></div>
</td>
<td width=20%>
<div align=left><font color=CEE3FD><font size=4 face=Arial, Helvetica, sans-serif>Year</font></font></div>
</td>
~;
}
$output .= "</tr>\n";
return $output;
}
sub build_html_table_row {
# --------------------------------------------------------
# Builds a record based on the config information.
#
my (%rec) = @_;
my ($output);
$output .= "<tr bgcolor=ACCCF0>";
{
$output .= qq~
<td width=40%>
<div align=left><i><b><font color=1E356C>$rec{'Title'}</font></b></i></div>
</td>
<td width=40%>
<div align=left><i><font color=1E356C>$rec{'Location'}</font></i></div>
</td>
<td width=20%>
<div align=left><font color=1E356C>$rec{'Year'}</font></div>
</td>
~;
}
$output .= "</tr>\n";
return $output;
}
sub build_html_table_bottom {
# --------------------------------------------------------
# Finish the search table
#
my (%rec) = @_;
my ($output, $field);
$output = "</tr></table></p>\n";
return $output;
}


I modified it a bit to go along with my color scheme, but it was doing the same thing even before i modified the code shown on the other post
Subject Author Views Date
Thread Single header output issues TKEP1008 4873 Mar 26, 2004, 7:54 PM
Thread Re: [TKEP1008] Single header output issues
LoisC 4744 Mar 27, 2004, 7:56 AM
Thread Re: [LoisC] Single header output issues
delicia 4755 Mar 27, 2004, 12:42 PM
Thread Re: [delicia] Single header output issues
TKEP1008 4632 Jun 1, 2004, 11:38 PM
Thread Re: [TKEP1008] Single header output issues
delicia 4620 Jun 2, 2004, 2:57 PM
Post Re: Single header output issues
TKEP1008 4610 Jun 11, 2004, 11:43 AM