Gossamer Forum
Home : Products : DBMan : Installation :

Short/Long Display

Quote Reply
Short/Long Display
I am using the short/long display. I added a few additional fields to the short display and it looks nice, but I want those 4 fields in a table (with blank fields showing up)and I would also like more search results to a page? Any help will be appreciated...
Quote Reply
Re: Short/Long Display In reply to
Adding more search results to a page is just a matter of changing the value of $db_max_hits in the .cfg file.

To have more fields in the short display, use

Code:
print "<TD>"; # don't remove this...

# <-- Start of short display formatting -- >
if ($rec{'Field'}) {
print qq|$rec{'Field'}|;
}
else { print "& nbsp;"; }

print "</td><td>";

if ($rec{'Field'}) {
print qq|$rec{'Field'}|;
}
else { print "& nbsp;"; }
print "</td><td>";

if ($rec{'Field'}) {
print qq|$rec{'Field'}|;
}
else { print "& nbsp;"; }
print "</td><td>";

if ($rec{'Field'}) {
print qq|$rec{'Field'}|;
}
else { print "& nbsp;"; }
# <-- End of short display formatting -- >

print "</TD>"; # do not remove this!

Replace Field with the name of your field.

Take out the space between & and nbsp; (I had to put a space in there or it wouldn't show up on the forum.)

On one of them, you'll want to print out the link to the full display. Instead of

print qq|$rec{'Field'}|;

use

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

You can really use any formatting you want in the

print qq|$rec{'Field'}|;

lines. It all depends on what you want and what your fields are.


------------------
JPD







[This message has been edited by JPDeni (edited May 18, 1999).]
Quote Reply
Re: Short/Long Display In reply to
First I want to say Thanks! The max hits was right in front of my face..so stupid.

I still have a ? I have the fields listed just how I want them (as stated above) but I want the fields in a table with a boarder and a header...I have tried everything I know and all I get is errors (couldn't possibly hae anything to do with lack of concentration time, lol)

-Thanks from one busy Mom
Quote Reply
Re: Short/Long Display In reply to
You're welcome. Smile (I do understand about being a busy mom. Been there. Done that! Smile )

To add a border and header to the table, look in html_view_success for

Code:
$i = 1;
print "<table>";
for (0 .. $numhits - 1) {
print "<tr>";
&html_record (&array_to_hash($_, @hits));
print "</tr>";
++$i;
}
print "</table>";

(I've taken out all of my dire warnings to save space. Smile )

Change the

print "<table>";

to

Code:
print "<table border=1>
<tr><td>heading1</td>
<td>heading2</td>
<td>heading3</td>
<td>heading4</td></tr>";

That should do it.

------------------
JPD





Quote Reply
Re: Short/Long Display In reply to
Thanks a million!!!! I actually got that one done in one nap..lol I tried the new short/long mod really quick got errors..but I didnt spend alot of time on it..Will try it tonight and post and let you know. I also have a few ? about the password mods but I will post that seperately. Thanks so much for all your help!

~Gina
Quote Reply
Re: Short/Long Display In reply to
If you continue to get errors, please copy your html.pl file to a web-accessible directory -- one where you would place your html files -- and rename it so it has a .txt extension. I'll take a look at it.


------------------
JPD





Quote Reply
Re: Short/Long Display In reply to
Ok, take a peek please! I am using user friendly html.pl, censor mod, short/long mod #1 (worked great) a few modifications you gave me...and I decided to try the new short/long display with now luck. Some of the things that needed to be replaced were different on mine (obviously) and I did the best I could to figure out what went where. Thanks again!

http://geegee.virtualave.net/html.txt

~Gina
Quote Reply
Re: Short/Long Display In reply to
I fixed the errors in your script -- some were yours and some were mine Smile. I also updated the script to match the new short/long display mod. I tried to send it to the email address in your html.pl file, but it was returned. You can pick up the file at http://www.jpdeni.com/Gina_html2.txt

------------------
JPD





Quote Reply
Re: Short/Long Display In reply to
Thank you thank you thank you! I did look a the email addy under the $admin_email and it was right I will have to look into that. It works great.

I do have one more ? about the passwords. With no password Mods if someone forgets there password is there any way to handle that? Can the password even mannually be emailed or changed? I know they are encrypted so I am going to assume no but you know what they say when you assume! I am not so concerned with people being able to change there passwords (yet) but I am concerned about people 4getting what they used (because I do it all the time!)

If not I will have to do the password modification and I am afraid I am going to mess that one up too! lol

Thanks again for the help...

~Gina
Quote Reply
Re: Short/Long Display In reply to
Glad it worked for you. Sorry about the mixup before.

The only way to have people lookup their passwords is to add the password mod. If you don't feel confident to add the mod, let me know and we'll work something out. I do have a business going with customizing DBMan, but my rates are pretty low for just adding a modification.

Without the password mod, you can go in and change a password for someone if they lose theirs. That's really the only way.


------------------
JPD





Quote Reply
Re: Short/Long Display In reply to
Thank you so much for all of your help. I will think on the password thing not sure how I want to do that. Now I just have to play around a little more till I am confident I am ready to use it. Thanks!