Gossamer Forum
Home : Products : DBMan : Installation :

Help question # 1 font color

Quote Reply
Help question # 1 font color
I have changed the colors in my html.pl file to have a black background. I got all of the tables and text to display correctly but when I do a serch the record text is black as well. Can you tell me where the parameters are to change this? I also want to change my link text colors in the nav bar how would I do this? I am testing my new configuration online at: http://www.cnptalent.com/data/dbman/db.cgi?db=buyer



Quote Reply
Re: Help question # 1 font color In reply to
In sub html_record in the html.pl file there are the following lines:

Code:
my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';
From the look of your site, you are probably just using the $font variable. Set the value of your font color there.

If you want white text, change $font to

my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#FFFFFF';



JPD
Quote Reply
Re: Help question # 1 font color In reply to
Hey, I tried that first. Any other suggestions?

Quote Reply
Re: Help question # 1 font color In reply to
I am using #F0E68C in the $font face paramater. Now here is the funny thing. If I highlight the text it is that color. Could it have anything to do with linking colors for the nav bar?

Quote Reply
Re: Help question # 1 font color In reply to
I don't think so.

Could you post your $font variable definition? The font color code is not showing up in the source for your pages.

JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
OOOPS wrong file. Here ya go.

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#F0E68C';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';


Quote Reply
Re: Help question # 1 font color OOOPs In reply to
In the rest of sub html_record, are you using the variable $font or the variable $font_color?



JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#F0E68C';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';

print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#800000">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ID:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'ID'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Title:</FONT></TD>
<TD> <$font>$rec{'Title'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>URL: </FONT></TD>
<TD> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Type: </FONT></TD>
<TD> <$font>$rec{'Type'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Date:</FONT></TD>
<TD> <$font>$rec{'Date'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Category:</FONT></TD>
<TD> <$font>$rec{'Category'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Description:</FONT></TD>
<TD> <$font>$rec{'Description'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Validated:</FONT></TD>
<TD> <$font>$rec{'Validated'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Popular:</FONT></TD>
<TD> <$font>$rec{'Popular'}</Font></TD></TR>
</TABLE>
|;
}


Quote Reply
Re: Help question # 1 font color OOOPs In reply to
You're using the autogenerate feature, right?

You'll need to add the color tag to the $font variable in the .cfg file.


JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
Can you tell me where? I have looked all over and am getting plenty brain dead. Thanks, CN

Quote Reply
Re: Help question # 1 font color OOOPs In reply to
In the file which you have obviously named buyer.cfg there should be the following section:

Code:

# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generation and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';

# Authorization Options
# --------------------------------------------------------
Add the color tag to the red line above.


JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
Thanks, I got frustrated and moved on to a different color schem. Having little knowlege of perl and limited HTML man this wan a brain teaser. Great script though.
I have three other questions.
1. How can I change the colors of the link text "add, veiw, delete etc..."
2. I get a error message "no serch results specified" when I click on the 'list all".
I want to build an alfabetical directory like the one I saw on a couple sites that use your dbman. can you direct me to an easy way to do this?

3. Is there a way to integrate a file upload option like the profile section in my webbbs forum?

Quote Reply
Re: Help question # 1 font color OOOPs In reply to
In Reply To:
1. How can I change the colors of the link text "add, veiw, delete etc..."
In the html.pl file, in each of the subroutines, you'll see <body bgcolor="#DDDDDD">. Add tags to the body tag just as you would add them to an .html page.

In Reply To:
2. I get a error message "no serch results specified" when I click on the 'list all".
I noticed that. My suspicion is that you have not changed the setting

$db_key = 'ID';

in your .cfg file to match the name of the key field in your database.

In Reply To:
I want to build an alfabetical directory like the one I saw on a couple sites that use your dbman. can you
direct me to an easy way to do this?
There is code all over the forum for this. I think I've written it 10 times. Take a look at
http://www.gossamer-threads.com/...b=&vc=1#Post7630.

In Reply To:
3. Is there a way to integrate a file upload option like the profile section in my webbbs forum?
There is a mod that allows a file to be uploaded with each record. The mod is at http://www.jpdeni.com/...ods/file_upload2.txt.

JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
Hey, I want to thank you for all of your help so far. I am finally getting the swing of this thing. I do have one problem yet. If you go to my site www.cnptalent.com and check out the list all or any search what is happening is that once you get a page or two into the data results it seem to skip 6 lines of data which throw the alignment of the record with the field names. Do you know what would be causing this. The first record of each page is correct but the second record and others are off.

Quote Reply
Re: Help question # 1 font color OOOPs In reply to
I'll tell what I told someone else who had a similar problem.

Save your .db file to a safe place and upload a new blank .db file. Enter a bunch of records and see if the problem persists.

If it doesn't, it means that one or more of the records in your old .db file has fewer fields in it than it is supposed to.

Did you export the .db file from another program?


JPD
Quote Reply
Re: Help question # 1 font color OOOPs In reply to
I have gone over my db file with a fine tooth comb. Why would the first record of each page always be right? I could see being off by one record because I had that problem an sorted it out to have the right number of fields but I think it may be something with the way the html page is generated? Any other ideas. CN

Quote Reply
Re: Help question # 1 font color OOOPs In reply to
The previous person also had gone over his records with a fine-toothed comb and then found the errors.

When I do a "List All," the first page is fine. The second page starts having problems with the record with the name Worcester Polytechnic Institute. That record seems to be missing some fields, as do the rest of the records that follow.

In Reply To:
Why would the first record of each page always be right?
Explaining the reason for this is not easy, but I'll give it a shot.

Each time you go from one page to the next, the script does the search all over again. It only collects those records that will be displayed on the page.

The fields for all records that are displayed on a page are saved into one array, called @hits.

Let's say you have 7 fields in your database and 10 records are returned. The @hits array will have 70 items in it, which are numbered from 0 to 69. When the first record is displayed, the values of $hits[0] through $hits[6] are converted into a hash called % rec, which includes the field names. When the second record is displayed, $hits[7] through $hits[13] are converted and so on.

If you were to only have 6 fields in the first record, the $hits[6] would actually be the first field of record 2, but the script has no way of knowing that. All of the records displayed on the page would be off.

In Reply To:
I think it may be something with the way the html page is generated
No. It is a problem with your .db file.

May I ask what the "ID" field is for? In the records that are correct, it is blank every time. Also, what is your $db_key field?


JPD