Gossamer Forum
Home : Products : DBMan : Customization :

Problem with columns displaying

Quote Reply
Problem with columns displaying
Hello!
I did all as in "Column Record Display - Allows you to display search results in either horizontal or vertical columns." But I receive error message: "Reason: Missing right curly or square bracket at ./catalog.pl line 1707, at end of line syntax error at ./catalog.pl line 1707, at EOF"
The line 1707 is: print "<tr>";
This line is from the mod, provided by:
#Column Record Display
# by JPDeni
# Written 3 October 2000
I have done all corractly, but it doees not work.
I've spent a lot of time, trying to solve the problem. Please, help me to display columns.
Thank you in advance,
Alexander.


Quote Reply
Re: Problem with columns displaying In reply to
Hi Alexander, please post the code for line 1707 in context (post about 8 lines above and below line 1707) Usually the error is somewhere in the area of the line rather than the specific line.

Error messages oftentimes indicate a specific line was not able to complete however, the cause of the failure is something around that line.

Quote Reply
Re: Problem with columns displaying In reply to
Hello, Karen.
Thank you very much for your reply.
Actually, the error occurs somewhere within the code of the mod. Does the code work? Help me, plese. Thank you.
#--------------------------------------------------------------------
$i = 1;
$cols = 4; # Change this to the number of columns you want
print "<table>";
for (0 .. $numhits - 1) {
unless ($_%$cols) {
print "<tr>";
}
print "<td>"; # Remove this line if you're using the short/long display mod
&html_record (&array_to_hash($_, @hits));
print "</td>"; # Remove this line if you're using the short/long display mod
if ($_%$cols==($cols-1)) {
print "</tr>\n";
}
++$i;
}
if ($numhits%$cols) {
for ($j=($cols-1);$j>=$numhits%$cols ;$j--) {
print "<td> </td>";
}
print "</tr>\n";
}
print "</table>";

#--------------------------------------------------------------------

Quote Reply
Re: Problem with columns displaying In reply to
Hi Alexander, it would be easiest if we look at the code just above and just below the line where the error is indicated. Would you mind posting a segment of the code which would have lines above and below the line reporting the error?

Quote Reply
Re: Problem with columns displaying In reply to
Hello, Karen!
Thank you very much for your attempt to help. Finally I found the mistake.
The mod said:# In sub html_view_success, there are two lines that say

if ($db_next_hits) { print "
<$font>Pages: $db_next_hits</font>"; }

# Between those lines is where your records print out.

# Replace whatever is between those lines with the following...

I replaced all, but in my html.pl the first line was:
print "
<$font>Pages: $db_next_hits</font>";
}

So, the last brake was on the next line and I deleted it. That was the problem.
Your last reply made me look through the code and I could find the mistake.
Thank you again very much, Karen. It's good that we all may count on each other.
Bye, Alexander.


Quote Reply
Re: [Alexander1975] Problem with columns displaying In reply to
In the mod it says:

if ($db_next_hits) { print "
<$font>Pages: $db_next_hits</font>"; }

# Between those lines is where your records print out.

Which two lines?? I replaced the code all over the place and it's still displaying as rows... please help!

Last edited by:

idg-usa: Aug 20, 2003, 12:21 PM
Quote Reply
Re: [idg-usa] Problem with columns displaying In reply to
Forget it. I figured it out after a few tries and have it working. Thanks anyway to whomever was going to answer.