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...
May 18, 1999, 1:46 PM
Veteran / Moderator (8669 posts)
May 18, 1999, 1:46 PM
Post #2 of 11
Views: 2819
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
# <-- 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).]
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).]
May 18, 1999, 3:47 PM
Novice (47 posts)
May 18, 1999, 3:47 PM
Post #3 of 11
Views: 2819
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
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
May 19, 1999, 7:55 AM
Veteran / Moderator (8669 posts)
May 19, 1999, 7:55 AM
Post #4 of 11
Views: 2832
You're welcome. (I do understand about being a busy mom. Been there. Done that! )
To add a border and header to the table, look in html_view_success for
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. )
Change the
print "<table>";
to
<tr><td>heading1</td>
<td>heading2</td>
<td>heading3</td>
<td>heading4</td></tr>";
That should do it.
------------------
JPD
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. )
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
May 19, 1999, 11:09 AM
Novice (47 posts)
May 19, 1999, 11:09 AM
Post #5 of 11
Views: 2814
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
~Gina
May 19, 1999, 11:40 AM
Veteran / Moderator (8669 posts)
May 19, 1999, 11:40 AM
Post #6 of 11
Views: 2803
May 19, 1999, 9:39 PM
Novice (47 posts)
May 19, 1999, 9:39 PM
Post #7 of 11
Views: 2810
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
http://geegee.virtualave.net/html.txt
~Gina
May 20, 1999, 1:15 PM
Veteran / Moderator (8669 posts)
May 20, 1999, 1:15 PM
Post #8 of 11
Views: 2792
I fixed the errors in your script -- some were yours and some were mine . 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
------------------
JPD
May 20, 1999, 3:56 PM
Novice (47 posts)
May 20, 1999, 3:56 PM
Post #9 of 11
Views: 2805
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
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
May 20, 1999, 8:20 PM
Veteran / Moderator (8669 posts)
May 20, 1999, 8:20 PM
Post #10 of 11
Views: 2825
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
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