Gossamer Forum
Home : Products : DBMan : Installation :

HTML.pl

Quote Reply
HTML.pl
Thanks for all the help getting the script working, now configuring it. I have added an entry to my Database and would like to configure the way it's displayed. I have downloaded the alternate html.pl because it says it is easier to edit, but I am still having problems. I run a movie review website and want to put all my reviews in this database. I have set user default mode to on so that everyone can view the records. The problem is I need to change html.pl significantly. What section do I change so that the record is displayed like I would like when the user is taken directly to that record? I would like the finished product to look like http://www.outermost.net/wide/ , and I have input all the necessary variables.

Thanks in advance for all help.
-Blake Kunisch
Quote Reply
Re: HTML.pl In reply to
I think you have to edit your sub 'html_record_long',as it is what I think that you mean.
Succes!!

---------
Mart
Quote Reply
Re: HTML.pl In reply to
The reason I think the alternate html.pl file is easier to edit is that the header and footer for each page need only be defined once, instead of for every subroutine and the form tags are closer together, so it's easier to see what you can delete.

For your display to look as you want it to, you'll need to edit sub html_record. Be sure to keep:

Code:
my (%rec) = @_;

at the beginning of the subroutine.

Use an existing page as a template. Copy the part of your page which will change with each record -- your main text of your movie review. Delete the actual data, and, its place, use a variable in the form $rec{'fieldname'}. For example,

Code:
print qq|
<TABLE border="0" width="100%" cellspacing="0" cellpadding="0">
<TR>
<TD width="320" bgcolor="#C0C0C0" valign="top">
<TABLE border="0" width="100%" cellspacing="0" cellpadding="2">
<TR>
<TD width="100%">
<P><SMALL><FONT face="Georgia">$rec{'Review'}</font></SMALL>
</TR>
</TABLE>
</TD>
<TD width="2" valign="top"><IMG src="../images/transspacer.gif" width="2" height="2"></TD>
<TD width="139" bgcolor="#C0C0C0" valign="top">
<TABLE border="0" width="100%" cellspacing="0" cellpadding="2">
<TR>
<TD width="100%"><FONT face="Arial"><SMALL><STRONG>Rating:</STRONG> $rec{'Rating'}<BR>
<STRONG>MPAA:</STRONG>$rec{'MPAA'}<BR> <STRONG>Runtime:</STRONG>$rec{'Runtime'}<BR>
<STRONG>IMDb Top 250:</STRONG>
<A href="http://us.imdb.com/top_250_films">$rec{'IMDB'}</A></SMALL><BR>
<SMALL><STRONG>Genre:</STRONG> $rec{'Genre'}</SMALL><BR>

You will probably need to expand all of your graphic URLs to full URLs instead of relative ones.

Also, to keep your formatting in your review section, after

my (%rec) = @_;

you should add

Code:
$rec{'Review'} =~ s/\n/<BR>/g;

If your field name isn't "Review," change the above to match your actual field name.

The rest of it is just trial and error. Try something and take a look at it. If it isn't what you want, change it.

The thing you must remember, though, is that whatever you want to be printed to your page must start with

print qq|

and end with

|;

You can put anything -- except a | character -- within those and they will print out on the screen.


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





Quote Reply
Re: HTML.pl In reply to
Thanks for all the help. I am now getting an error message that I don't recognize when trying to run the script at:

www.outermost.net/cgi-bin/db/db.cgi

Here is my html.pl file:
www.outermost.net/html_pl.txt

Thanks, Blake

[This message has been edited by blakex (edited July 19, 1999).]
Quote Reply
Re: HTML.pl In reply to
You need to change

<link REV="made" href="mailto:blake@outermost.net">

to

<link REV="made" href="mailto:blake\@outermost.net">

and

<meta name="copyright" content="(C) 1996-1999 by Blake Kunisch ( blake@outermost.net ) -
Lighthouse Web Productions - All Rights Reserved">

to

<meta name="copyright" content="(C) 1996-1999 by Blake Kunisch ( blake\@outermost.net ) -
Lighthouse Web Productions - All Rights Reserved">

If you need help with the script again, it's easier for me to find problems if you copy the file to a web-accessible directory -- one where you would place html files -- and rename it so it has a text extension. Like html_pl.txt. Then come back here and let me know where to look at it. I would have found the problem in half the time.


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





Quote Reply
Re: HTML.pl In reply to
Sorry about putting the whole darn html.pl script in my previous post. I got the problem fixed, and everything seems to be working correctly. One slight problem:

How do I view a record without logging in? I have the permissions set as they should be according to the readme.txt for "* Users must log on to add, remove, modify but anyone can view without logging on:" I would like to be able to view record #1 without having to log in.

Another problem: apparently, I can't include SSI - is there any other way to have a page included? I need to do this because the left and right bars along with the ad need to be changed constantly.

My HTML.pl
www.outermost.net/html_pl.txt

My default.cfg
www.outermost.net/default_cfg.txt

Thanks in advance for all replies.
-Blake Kunisch

[This message has been edited by blakex (edited July 19, 1999).]
Quote Reply
Re: HTML.pl In reply to
I think I got it now. I figured out that to view records, I use this url:
http://www.outermost.net/...w_records=1&ID=1
and just replace the ID= with the number of the record.

Now I'm just stuck on includes. Is there a way to include pages (e.g. SSI)?

Also, when viewing records in default mode - default mode only - can I eliminate the footer and the "Your Search returned 1 matches"??

Thanks,
Blake

My html.pl
http://www.outermost.net/html_pl.txt

My default.cfg
http://www.outermost.net/default_cfg.txt
Quote Reply
Re: HTML.pl In reply to
I can't help you with SSI, since I know nothing about it at all.

Regarding, not showing the footer and "Your search returned 1 matches" in the default mode, a lot depends on what you're planning to do. Will users be able to search after having the one record displayed?

One suggestion with your "canned" search link. Add &ww=1 to your link. Otherwise you'll get records which have a 1 anywhere in the ID field -- 1, 10, 11, 12, 21, 100, etc.



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





Quote Reply
Re: HTML.pl In reply to
About adding the &ww=1 -

Do I change this to &ww=175 if I want record 175 displayed or do I just use ID=175&ww=1?

Thanks much,
Blake Kunisch

P.S. I got the SSI working - check out this thread: http://www.gossamer-threads.com/...um8/HTML/000601.html
Quote Reply
Re: HTML.pl In reply to
Just use &ww=1, no matter what your ID is. Actually, you can have it equal just about anything except 0. All of the following will work

&ww=yes
&ww=1425
&ww=on

It just has to be equal to something in order to tell the script to look for "whole words."

Glad you got the SSI to work. Stick around. I'll need you to answer questions for other folks with SSI problems. Smile

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





Quote Reply
Re: HTML.pl In reply to
 
Quote:
Glad you got the SSI to work. Stick around. I'll need you to answer questions for other folks with SSI problems.

The thing is I really didn't get SSI to work, but rather I was able to include separate pages withing the code. I wish I could get SSI to work within the db, but I think that's almost impossible with the way servers are set up.

Thanks again for all your help.
-Blake Kunisch
http://www.outermost.net