Gossamer Forum
Home : Products : DBMan : Installation :

Short and long display of records

Quote Reply
Short and long display of records
I've played with this for a few days now and I'm totally frustrated. Does someone have a copy of this mod already filled out so I can use it to get it to work. If you do, please send it to fredp@oz.net

Thanks in advance
Fred
Quote Reply
Re: Short and long display of records In reply to
I'm also having problems with the short display. I've modified according to the instructions but can't get the short display to display anything.

Do I need to do something special with:
$rec{$db_key} =~ s/<.?B>//g; in my sub html_record? I don't know what the above means. It's the only thing I can think of which might make things not work.

Quote Reply
Re: Short and long display of records In reply to
The trouble is that most of the scripting in the mod is specific to your database. Someone else's script will have different formatting than you want.

Can you copy your html.pl file to a directory where we can access it through a browser (the same directory where you put your web pages). Rename the file to html_pl.txt (or anything with a .txt extension) and let us know where it is.

I'll be glad to take a look at it and see if I can fix it up for you.



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





Quote Reply
Re: Short and long display of records In reply to
Thanks.. you can get at http://www.oz.net/~fredp/david/swidthtofull.pl.txt

Like I said.. having a hell of a time with it. I sure appreciate you help.

thanks in advance
Fred
Quote Reply
Re: Short and long display of records In reply to
I'm looking at your file now.

You didn't just try to run the modification page, did you? It definitely won't work. The modification is just instructions on how to edit the html.pl file. Possibly I need to clarify that in the mod file.

If you have edited the html.pl file, that would be easier for me to help you with. There's lots of comments and things within the mod file that get in the way.

I would suggest for building your html displays that you use an html editor with sample data, just to get the structure of your tables correct. Then copy the table information into the html.pl file, replacing the sample data with the "$rec" variables.


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





Quote Reply
Re: Short and long display of records In reply to
What problems are you having?

The line

$rec{$db_key} =~ s/<.?B>//g;

is to get rid of bold tags that might appear if you have set $db_bold to 1 to bold search results. If you do that, the URL to the full display won't work unless you take out the tags. That's what that line does.

Did you take the line out and try it? It shouldn't cause a problem, but maybe....

Post a URL to a place where I can see your full html.pl file and I'll take a look at it.


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





Quote Reply
Re: Short and long display of records In reply to
The problem with the 2 tiered output is:
1. The long version works fine for hits == 1.
2. The short version prints my header but then has a completely blank screen for hits > 1.
3. The url to view my file is:
http://192.41.11.48/html.pl.txt
4. Another question: in the sub html_page_top routine, I want to put a $banner tag to have a different graphic display for each page -- that is instead of a text banner, I want a graphic banner. I've set a $banner to be in the image tag: <IMG id="Banner2" HEIGHT=71 WIDTH=509 SRC="$banner" BORDER=0> and I define $banner to be: $banner = "../../../myimage"
but this doesn't work -- it's probably the way I'm setting up my strings but I'm new to perl and can't get it to work.
5. One final question unrelated to the above. I can't get my searches to work the way I envision. I have my sb flag set to Name and my sort order set to ascend but the search just returns the results in the order it finds them in the database. Any ideas.

Thanks for your help. The most pressing problem is the long and short display issue.
Quote Reply
Re: Short and long display of records In reply to
After looking at your file for quite a while, I don't see anything wrong with it. Can I see the database in action?

One thing I would suggest is that you try to simplify your html.pl file. All those tables will take an awfully long time to load. They're also pretty tough to debug.

I'm not sure what you're trying to accomplish with the banners. I don't know anything about displaying random banners. Sorry.

Regarding the searches, again, I'd have to see it in action.

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





Quote Reply
Re: Short and long display of records In reply to
Ok... now that you explained that to me. I'm still totally lost.

Try looking at this file if you find some extra time. http://www.oz.net/~fredp/david/viewhtml.pl.txt That is the real pl file. The file I want it to expand to is http://www.oz.net/~fredp/david/fullsize.htm

All I need is a good place to start. Then I can work on it from there. I'm brand new to perl so please give me a break.

And thanks for your patience.

Fred
Quote Reply
Re: Short and long display of records In reply to
Okey-dokey. I'll take a look at them. I have some plans tonight, so I may not get back to you until tomorrow.

BTW, I noticed that you're on oz.net and the sample page was in Maple Valley, WA. Are you in western Washington? I'm in Kent. Smile


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





Quote Reply
Re: Short and long display of records In reply to
Right next door.. Renton.. Grand idea... stop on over for a beer..

Fred
Quote Reply
Re: Short and long display of records In reply to
fred, I'm still looking at your script. I'll get back to you. (And I may take you up on that beer! Smile )

pabloa, I understand your not wanting to put your script up yet.

The only thing I can think is that you don't have your $db_key set up correctly. Could you post your .cfg file in the same directory where you have your html.pl file?

(BTW, I thought it was Net Objects. I've dealt with others who used it. I take a look at the script, though, and my eyes glaze over! Smile )


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





Quote Reply
Re: Short and long display of records In reply to
Thanks JP for the assistance so far. Your comments about the complex tables are appropriate, they are, however, generated by Net Objects Fusion and are optimized -- they do load quit quickly although they are complex.

I prefer not to upload the short/long version of html.pl on my working site until it is working properly. You have looked at the source and here is the output from the short search:

As you can see 4 hits were obtained and the table sets up properly for the hits. What is missing is db_key value (in this case the db_key is ID). So you look at each hit line and you will see ID= with no value. That is why I'm not getting any results -- but in looking at your source and my inclusion of the same, I see no reason why the db_key value is not present -- do you?? Please advise. Note that the field name doesn't obviously print because no db_key value was identified to associate with a field.

HTML Output from a SEARCH WITH 4 HITS:
<HTML>
<HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">

<TITLE>Search Results</TITLE>

</HEAD>

<BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080" TEXT="#000000" TOPMARGIN=16 LEFTMARGIN=10 MARGINWIDTH=10 MARGINHEIGHT=16>

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=642>



<TR VALIGN="top" ALIGN="left">
<TD></TD>
<TD WIDTH=540 COLSPAN=5>
<UL>
<P>
<DIV ALIGN=LEFT>
<TABLE WIDTH=460 BORDER=0 CELLSPACING=6 CELLPADDING=0><TR>
<TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=448 HEIGHT=27><TR ALIGN=LEFT VALIGN=TOP><TD>

<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=448>
<TR VALIGN="top" ALIGN="left">
<TD HEIGHT =13></TD>
<TD WIDTH=441 BGCOLOR="#FFCC66">
<UL><B><FONT COLOR="#663333" SIZE="-2" FACE="MS Sans Serif">
Bed & Breakfast, Country Inns Guide: Search Results:</FONT><FONT COLOR="#000099" SIZE="-2" FACE="MS Sans Serif"> 4 matches found </FONT></B></TD>
</TR>
</TABLE></TD></TR></TABLE>
</TD></TR></TABLE>
</DIV>
<P><CENTER><TABLE><TR><TD>
<a href="http://192.41.11.48/cgi-bin/dbman/db.cgi?db=bedbreak&uid=default&ww=on&ID=&view_records=1"></a>
</TD></TR><TR><TD>
<a href="http://192.41.11.48/cgi-bin/dbman/db.cgi?db=bedbreak&uid=default&ww=on&ID=&view_records=1"></a>
</TD></TR><TR><TD>
<a href="http://192.41.11.48/cgi-bin/dbman/db.cgi?db=bedbreak&uid=default&ww=on&ID=&view_records=1"></a>
</TD></TR><TR><TD>
<a href="http://192.41.11.48/cgi-bin/dbman/db.cgi?db=bedbreak&uid=default&ww=on&ID=&view_records=1"></a>
</TD></TR></TABLE></CENTER></TD>
</TR>
<TR VALIGN="top" ALIGN="left">
<TD COLSPAN=6 HEIGHT =5></TD>
</TR>
<TR VALIGN="top" ALIGN="left">
<TD COLSPAN=2 HEIGHT =19></TD>
<TD WIDTH=500 COLSPAN=3>
<UL>
<P></TD>
<TD></TD>
</TR>

</TABLE></BODY>
</HTML>


Quote Reply
Re: Short and long display of records In reply to
OK, the config file will be at:
http://192.41.11.48/bedbreak.cfg.txt
and I've taken your easy-html.pl file and
redone most of my previously Net Objects
generated html. (html.pl file size went
from 143000K to 86000K -- !).
Hopefully the code will be easier to read.
This file is named html.pl.txt and is at the above url.
Thanks
Paul
Quote Reply
Re: Short and long display of records In reply to
Oh. Dear. This must be something I forgot to put in my mod. Just a sec and I'll check.

Well, I didn't really forget it, because it's already in the html_record script, but I don't actually mention it. Anyway, the first line of your html_record subroutine needs to be

my (%rec) = @_;

Put it right below

sub html_record {

Let me know if that fixes it for you.

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





Quote Reply
Re: Short and long display of records In reply to
Yep! Yahoo! That did it. Just a little missing line! You may want to put it into your mod ---

Works great now! Thanks.

If I want more than one field displayed, I assume I just use the $rec{'fieldname'} separated by spaces or whatever. I'll try it now. Thanks again.
Quote Reply
Re: Short and long display of records In reply to
Everything is working great now. Well, just about everything -- I've been nagged by a problem with the search options. Even though I specify a sb=Name and so=ascend, I cannot get my search results to sort -- they just display in the order in the database? Is this a bug in the program or is there some magic beyond setting up the search options.
Quote Reply
Re: Short and long display of records In reply to
When ever you're ready for it, give me a call 253-639-1390. I'm right on the Kent border on 196th & 140th

Fred
Quote Reply
Re: Short and long display of records In reply to
Yay, pabloa! Smile I will make a note of that line in my mod so people don't forget.

Yes, if there's anything else you want to display in the short record, just use $rec{'FieldName'}.

Regarding the "sb" -- easy fix. Don't use "sb=Name." Use "sb=[field number]". That'll do it.

fred, I'll be in touch. Smile


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





Quote Reply
Re: Short and long display of records In reply to
It works -- I'm happy again -- thanks so much!
Quote Reply
Re: Short and long display of records In reply to
Can you call one more time..

Thanks
Fred
Quote Reply
Re: Short and long display of records In reply to
If I throw it in the air...maybe it will stick.

Corrected a few things.. but now.. its all messed up. If you have a moment could you look at it.

http://oz.net/~fredp/david/stoppel.pl.txt

thanks
Fred
Quote Reply
Re: Short and long display of records In reply to
I'm afraid "all messed up" doesn't help. I need to know what it's doing and what you did so I know where to look.


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





Quote Reply
Re: Short and long display of records In reply to
Still having problems with the images. Can you look at that.

Also, can't get rid of the tool bar at the bottom when db=newdefault&uid=default.

Thanks
Fred
Quote Reply
Re: Short and long display of records In reply to
Could you call me again?

Thanks
Fred