Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Frames and Rate.cgi

Quote Reply
Frames and Rate.cgi
Hi there. I have tried to get a frames set-up working for my web site. The frames are working...sort of. Well, the frames are created yet the new template file I created,'toprateframe.html', which is the top frame is located in a protected sub-directory below the 'admin' directory. So the FIRST problem is that a password protection window is invoked because of the .htaccess file in the 'admin' directory.
The SECOND problem is that the rate.cgi file DOES NOT work.

Question: How do I set up frames so that the rate form is in the top frame (and works properly) and the site linked shows up in the bottom frame???

Here are some files that may help you diagnose the problem:

TEMPLATES:

rate.html
http://www.anthrotech.com/cgibin/wwwvl/rate.txt

toprateframe.html
http://www.anthrotech.com/cgibin/wwwvl/toprateframe.txt

I also made the follow edit in the 'site_html_template.pl' file:

sub site_html_rate_top_form {
# --------------------------------------------------------
# This routine determines how the rate form page will look like.
#
my %rec = @_;

&html_print_headers;
print &load_template ('toprateframe.html', {
%rec,
%in,
%globals
});
}

I would greatly appreciate any assistance
on this...BTW: I did search through this BBS and found some references to enabling search forms to work in the top frame, but they did not address my problem.

Thanks.

Regards,



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Frames and Rate.cgi In reply to
 
Quote:
the new template file I
created,'toprateframe.html', which is the top frame is located in a protected
sub-directory below the 'admin' directory

All templates must be in the "templates" directory under linksadmin. Only linksadmin needs a password...take off all passwords on the subdirectories below it. The rate.cgi script won't work either because it can't access the rate.html template in the password protected directory (unless you're getting some other error that is).

I'm not totally clear on what you mean by "the site linked" in the bottom frame. I think what you want is have your ratings form appear in one frame, and have the other frame load the actual (outside) site so people can look at it while they rate it, yes? If so, don't reinvent the wheel...just use the "frame it" script at:
www.verysimple.com/scripts/frameit.html

Quote:
http://www.anthrotech.com/cgibin/wwwvl/rate.txt
http://www.anthrotech.com/cgibin/wwwvl/toprateframe.txt

Ummm...just checking--these are just samples right? You DID upload your templates with .html extensions?
Quote Reply
Re: Frames and Rate.cgi In reply to
Yes, I did upload them as .html files. Yes, I have all the template files located in the templates directory underneath the admin directory. The problem is that .htaccess in my server covers all directories beneath the main directory that is protected. So, I cannot "remove" it from the templates directory. The password protection is the least of my worries compared to getting the rate.cgi to work.

To see the rate.cgi "in action", go to this web page:

http://www.anthrotech.com/resources/links/Applied_Anthro/

Then click on the "Rate It" Link for any of the web sites listed in this directory.

You will notice that the frames do work in that the external site loads in the bottom window and then the rate.cgi form loads in the top window.

But I get a "Bad Request" error when trying to run the rate.cgi script.

I am unsure how using Frameit would assist me. Thanks for the suggestion though.

All I'd like to do is offer users the ability to rate the site while viewing it rather than clicking on the link, then coming back to my site to rate it...very cumbersome to say the least.

Anyone know a work around???


------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Frames and Rate.cgi In reply to
Hello again. I have not touched rate.cgi. I will try to move the file out of the password protected directory. However, why would the other template files work just fine without invoking a password window and the 'toprateframe.html" does not???

Also, I would like to know if anyone has been able to accomplish this task successfully. I appreciate the ideas posted so far, but real live experiences and knowledge would be greatly appreciated it. I can't be the only one who has attempted to do this.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited May 04, 1999).]
Quote Reply
Re: Frames and Rate.cgi In reply to
Oh. I thought you had a separate password on the subdirectories. It's not going to work like this at all--when I click the rate link the empty frame set loads, then I just get your password input screen and get kicked out.

Try moving the templates to an unprotected directory outside of admin ...they don't ACTUALLY have to be there, the script was just set up to look for them there.

Put them wherever you want, then change the path in links.cfg (just put the new full path instead):
$db_template_path = "$db_script_path/templates"; # PATH to templates.

This might fix the bad request error with rate.cgi--it might not. Have you made edits to the rate.cgi script itself? If so, maybe there's a typo or something. Anyway, if it still doesn't work try running from the command line to see if you get a more informative error then post again!
Quote Reply
Re: Frames and Rate.cgi In reply to
Well, I spent two hours moving files, including the template files, into unprotected directories (except admin.cgi).
It still does not work. I am still getting a BAD REQUEST message. Does anyone know how I could fix rate.cgi or the template files to make the frames work for rating sites???

To see this in action, go to

http://www.anthrotech.com/resources/links/Applied_Anthro/

Then click on "Rate It" of one of the sites.

Any assistance would be greatly appreciated!

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Frames and Rate.cgi In reply to
I think you wasted a lot of time moving your files around. I think your problem is here:

Quote:
<FRAME src="http://www.anthrotech.com/cgibin/wwwvl/templates/toprateframe.html" "NAME="ratebar" marginheight="0" marginwidth="0" resize=no SCROLLING="no" FRAMEBORDER="0" BORDER="0" FRAMESPACING="0">

Your main document is pointing to rate.cgi to create the frames. Instead, you should be pointing the src of the top frame to rate.cgi which would then load the template, rate.html which, in this case, should be your source for that frame window. The source for the main frames document should be a separate html document.

I hope this makes sense.

[This message has been edited by Bobsie (edited May 15, 1999).]
Quote Reply
Re: Frames and Rate.cgi In reply to
It makes sense. But how would you edit the link.html file so that when you click on "Rate It" you will maintain the ID of the link record? If I am understanding you correctly, I need to refer to the top frame to rate.cgi. But I am lost when it comes from linking the "Rate It" link properly.

I tried what you have suggested by linking the "Rate It" to a "frames.html" file, and then referencing rate.cgi in the top frame. Still getting BAD REQUEST error.

Anyone else want to give a shot at this challenge???

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us