Gossamer Forum
Home : Products : DBMan : Customization :

Back and with questions!

Quote Reply
Back and with questions!
Hello again to all, but specifically JPDeni and LoisC. I first of all want to extend a BIG THANK YOU to both of you for helping me get this far.

I took a break from my website but have finally had time to sit down and have some full dBman (and website design) days.. and I have re done my entire site and have a few questions:

(1) I want to implement the Short/Long Display Method but by going to my site you can see it isn't working.

(2) For each entry, I want to put a picture of the vehicle witin the entry.

(3) I want to take off the grey background, get rid of the white table and customize the site. How can I get rid of that thing at the top that say's the title of the site, the boder, and the gray?

http://www.theyoungspot.com/cgi-bin/putnam/new/db.cgi

I know I have more questions but I think once I arrive at solutions for those three I can determine where I should go from there.

Also, I realize that some of these questions (specifically #2) and I figured that these boards would be archived farther back.. and they'd be here upon my return, but I guess not.

THANK YOU!!
Quote Reply
Re: Back and with questions! In reply to
1) How to you mean "it isn't working"?

2) Okay. How will the graphic be associated with the record? Will you name the graphic to match the $db_key value of the record, or will there be a field in the database for the name of the graphic?

3) You'll need to edit the html.pl file. For example, to change the background color, look for every instance of bgcolor="#DDDDDD" and change it to your desired background color.

You might consider using the "user-friendly" html.pl file at http://www.jpdeni.com/dbman/Mods/html_pl.txt . I think it's a little easier to edit than the default html.pl file.

If you want to use the short/long display, you might try

http://www.jpdeni.com/...ds/short_html_pl.txt

That is a "user-friendly" file which has the short/long function already installed.


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






Quote Reply
Re: Back and with questions! In reply to
Thanks for the quick reply!
I only had 1 entry in my database and I didn't realize that the short/long view just showed the record if there was only 1.

For the picture, I have set up a field called "Internet Identification" and this is my "key field" that I checked using your configurator. I plan on having the photo named by this identification number.

One other question, when I search/view my entries the Make and Model, Body Style, Fuel Type and Internet Identification fields don't show on the table (but the Make and Model shows at the top). How can I fix this so that they all appear? I am entering information for all fields. And, oddly, I just realized that these fields are named with two or three words.
Quote Reply
Re: Back and with questions! In reply to
Regarding the graphic, if you're going to have a graphic related to each record, and they are all in the same format, you can just add the following to sub html_record_long (within a print qq|..|; statment):

Code:
<img src="http://www.server.com/graphics/$rec{'Internet Identification'}.gif">

To be even more complete, you could add an "ALT" tag:

Code:
<img src="http://www.server.com/graphics/$rec{'Internet Identification'}.gif" ALT="$rec{'Name'}">

or whatever your field is called that names the item.

If your graphics will be in .jpg mode, change .gif above to .jpg. If you're not sure that every record will have a graphic, we'll need to do a little more work, but I thought I'd give you the easy one first. Smile

Regarding your other question, did you use the code for your display that came from the Configurator? That ought to have taken care of the multiple-word field problems. If you would like me to take a look at your html.pl file, copy it to a web-accessible directory (one where you would place .html files) and rename it to html_pl.txt. Then come back and tell me where I can find it and I'll take a look.


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






Quote Reply
Re: Back and with questions! In reply to
Ok! I got the picture thing to work!

I saved my html.pl file to
http://www.theyoungspot.com/html.txt

I went back and tried to modify one of my previous entries and it said it couldn't find that entry, possibly because the Internet Identification Number (my key) isn't showing?

Also, I want any user who visits the site to be able to search the entries, without logging in. I got and saved the code from my last round (a month ago) but I lost it when I rewrote over a html file.

BTW, my database is at http://www.theyoungspot.com/cgi-bin/putnam/new/db.cgi

[This message has been edited by CMY (edited April 23, 2000).]
Quote Reply
Re: Back and with questions! In reply to
My guess is that the problem with your fields not showing up is that there are line breaks in the middle of the field names:

<td width="314"><font face="Tahoma" color="#0000A0"><b> $rec{'Make
and Model'} </b></font></td>

<td width="314"> <font color="#0000A0" face="Tahoma"><b>$rec{'Body
Style'}</b></font></td>

<td width="314"><font face="Tahoma" color="#0000A0"><b> $rec{'Fuel
Type'} </b></font></td>

<td width="314"><font face="Tahoma" color="#0000A0"><b> $rec{'Internet
Identification'}</b></font></td>

I'm not sure of the reason for this. Could it be you used a text editor that had "word wrap" on? If you take out the line breaks and have the field names all in one line, you should be okay.

Regarding default users -- you need to send them to the following URL:

http://www.theyoungspot.com/cgi-bin/putnam/new/db.cgi?db=default&uid=default



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






Quote Reply
Re: Back and with questions! In reply to
Thank you so much! Taking out the spaces helped!

However, now the picture doesn't show up (almost immediately after I last posted that it was working, it quit.. I guess I jinxed it.)

I left moused clicked on it in the browswer, and somehow it is pulling in bold tags <B> causing the source of the picture to be incorrect.

I want to thank you one more time for your outstanding assistance!
Quote Reply
Re: Back and with questions! In reply to
If I never see another bold tag in DBMan it'll be too soon!!! Smile

Before you print out the <img src...> tag, outside of a print qq|...|; statment, add

Code:
$rec{'Internet Identification'} =~ s/<?.B>//g;

That'll get rid of the bold tag.


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






Quote Reply
Re: Back and with questions! In reply to
Thank you so much for your help! I got my whole website done in two days.. the design yesterday and today and the whole database today!

My next step, however, will be to better alter the search for a car dealership. Any ideas?

THANK YOU SO MUCH! JPDeni! You are the best!
Quote Reply
Re: Back and with questions! In reply to
Glad I could help. Smile

One problem I noticed on your database was with the "List All" function. Since you have a two-word $db_key field, there is a space in the URL and Netscape doesn't like that.

Add the following to db.cgi:

Code:
sub urlencode {
# --------------------------------------------------------
# Escapes a string to make it suitable for printing as a URL.
#
my($toencode) = shift;
$toencode =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;
return $toencode;
}

Then, in sub html_footer, right at the begining, add

Code:
$db_key=&urlencode($db_key);

That should fix the problem.

What did you want to do with the search?[/code]
------------------
JPD






Quote Reply
Re: Back and with questions! In reply to
Ok, great! I entered that so I hope it is working.

I figured out how to rename the links in the footer and redirect them!

However, I saw on your "bookstore," JPDeni, that the titles automatically appear in a drop down menu. I'd like to do that with the Year, Make and Model. Is this easy/possible to do?

Thanks!



[This message has been edited by CMY (edited April 24, 2000).]
Quote Reply
Re: Back and with questions! In reply to
Yep. It's a piece o' cake. Smile

First you will have to make your own html_record_form and probably a separate search form. Why don't you do that first and then we'll get to creating your select field. 'K? Smile


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