Gossamer Forum
Home : Products : Links 2.0 : Customization :

Adding different <Fields> into Frameset

Quote Reply
Adding different <Fields> into Frameset
I've read hundreds of posts about frames.... exhausted my eyes, fingers, and brain.....Frown

And I know about searching the forum for frameset! Pirate

I can't seem to get a definitive answer to a solution. I know how to make the frames pop up using FrameIt, and I've tried different snippets from several posts for use one for Links....But I can't get that working.

Does anyone know how too add differnt fields to a frameset? I need the <Link>, <Coupon>, and <Expire> (I added those 2) displayed on the top frame along with the usual Home, Remove Frame, ect.....

Any ideas on how too do this? Or where I can find this info? Because if someone has a better "Search Term" to find this info, besides Frame, Frameset, Frame Tags, FRAME EVERYTHING.....

Please Please let me know! Smile

Thanks!

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Not sure if this will work, but you may as well try it Wink

In frames.pl find,

Code:
$id = $FORM{id};

add below it;

Code:
$link = $FORM{link};
$coupon = $FORM{coupon};
$expire = $FORM{expire};

Then find the following in the same file;

<frame name="main" target="footnotes" src="$bannerurl?id=$id&title=$title&referer=$referer" scrolling="no">

and change it to;

<frame name="main" target="footnotes" src="$bannerurl?id=$id&title=$title&referer=$referer&coupon=$coupon&expire=$expire&link=$link" scrolling="no">


The open up banner.pl and find;


Code:
$id = $FORM{id};

the add below it;

Code:
$link = $FORM{link};
$coupon = $FORM{coupon};
$expire = $FORM{expire};

Then in the HTMl code you can use the variables $link, $coupon and $expire to show the contents of those tags.

In link.html you will need to change the link to frames.pl to;

frames.pl?id=<%ID%>&title=<%Title%>&coupon=<%Coupon%>&expier=<%Expire%>&link=<%URL%>


Well, hopefully that will sort you out Smile

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

PaulWilson: Sep 15, 2001, 4:44 AM
Quote Reply
Re: [youradds] Adding different <Fields> into Frameset In reply to
OK,

Before I start hacking the script to pieces, which I'm not too good at... Smile

I noticed you have in the Link:

frames.pl?id=<%ID%>&title=<%Title%>&coupon=<%Coupon%>&expier=<%Expire%>&link=<%URL%>

Now HTML I do know something about, but that sure looks like it's not going to work....

When I click a Link, I just want the top frame to show up using the proper ID tag of course, but I want too be able to use the Title, Coupon, and Expire tags in the template of the top from.....

Top Frame
==========================================
---------
| Logo | Title: <Title>
---------
Coupon Code: <Coupon> Expires: <Expires>

==========================================
Main Frame

Link: <ID> - The regular Link to open in this frame

==========================================


Hope you understand....and if your post above is what it actually does, then just slap me....I tend to be very careful in changing something before knowing if it going to work the way I want it too, cause like I said....

Me + Not Good At CGI = Screw Ups... Smile

Thanks!

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Yeah, it should be;

frames.pl?id=<%ID%>&title=<%Title%>&coupon=<%Coupon%>&expire=<%Expire%>&link=<%URL%>

Entering that into the link.html file, and then doing a rebuild of the directory will point it like

frames.pl?id=15&title=SiteTitle&Coupon=yes&expire=15days&link=www.site.com

Is that what you want?

That then means you can use the value of $coupno in the HTML, rather than using the tag, which the script does not allow! This is a clumsy way around, but im 99% sure it will do what you want Wink

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Adding different <Fields> into Frameset In reply to
I keep getting an Internal Server Error everytime I use those modifications.

The script works fine with out adding the extra {FORM} stuff, but when added, it doesn't work.

Hmm....wth. I can't seem to figure it out.

Anymore suggestions?? Smile


dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Please post the codes here to see if I can find any conlicts, or stuff that would cause a 500 IS error Wink

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [youradds] Adding different <Fields> into Frameset In reply to
Uhmm......

Crazy

After looking it over one more time, I didn't add the FORM stuff to the frames.pl, only the banner.pl Need to read the whole post I guess.....

*sigh*

I'll let ya know....sorry.
dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Ok,

This is what I've done....it still don't work:

frames.pl

$referer = $ENV{HTTP_REFERER};
$title = $FORM{title};
$id = $FORM{id};
$link = $FORM{link};
$coupon = $FORM{coupon};
$expiration = $FORM{expiration};

Expiration is the name in the database. $db_expiration

Called by the tag <%ExpireDays%> using the expirator mod.

Expirator Mod works just fine.

Also:

<frame name="main" target="footnotes" src="$bannerurl?id=$id&title=$title&referer=$referer&coupon=$coupon&expiration=$expiration&link=$link" scrolling="no"

I've tried &expiredays, expiration, ect.....


banner.pl

$referer = $FORM{referer};
$title = $FORM{title};
$id = $FORM{id};
$link = $FORM{link};
$coupon = $FORM{coupon};
$expiration = $FORM{expiration};


In frame.pl, I have the definitions pointing to my jump.cgi and banner.pl

Banner.pl I have the deifinition pointing to my jump.cgi

Linking:

frames.pl?id=<%ID%>&title=<%Title%>&coupon=<%Coupon%>&expiration=<%Expiration%>&link=<%URL%>

Also have tried <ExpireDays>, and everything I can think off.

Nothing works.

I CHMOD to 755 for both, and various others...hoping Smile


Like I said, if I just upload scripts as is, with the definitions pointing to jump and banner, it works perfect. But when modified, it doesn't....

Hope ya can help me...

Thanks,



dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Do you have access to your server logs? If so, what do the last few lines in the error log say?

Andy

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [youradds] Adding different <Fields> into Frameset In reply to
I don't know....I checked the logs, and it said Unkown Tag for expire....I had Expiration tag, and not ExpireDays tag... Changed, and the logs look fine, but Error still happens.

I've switched everything everywhere, to everything I can think of....and nothing works.

I can use all the tags except Expire....geez...one of the most important...go figure...

Very frustrating.....I've spent hours trying to figure this damn thing out...

It must have some conflict with the nph-expirator mod or something....all I can think of.....

Is there maybe a work around?? Or to complicated?

Thanks for anything and everything....

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Quote:
I checked the logs, and it said Unkown Tag for expire

Your error log wouldn't say Unknown tag - I don't think you were looking at the correct log :)
Quote Reply
Re: [PaulWilson] Adding different <Fields> into Frameset In reply to
Sure I was, because that is what it also said in the browser's address bar....

....coupon=FJHHSS&Expiration UNKOWN TAG;expiration..... and further down..... / 500 / 540 Error... link="mysite"

All on same line of LOG


expiration was in there twice, and like I said, I can add all the other fields cept expiration and it works just fine.

I can have it like that, and just hover the mouse over the link, and it will say UNKOWN TAG in the bottom of browser, when showing the link, before clicking it.

I don't know what the heck is going on, but I have to believe that the expirator mod is somehow blockin or lockin or #%#$@#Q@ me off!! Smile


I don't know.....Is there like a simpler way Paul?? =|


dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Quote:
Sure I was, because that is what it also said in the browser's address bar....

....coupon=FJHHSS&Expiration UNKOWN TAG;expiration..... and further down..... / 500 / 540 Error... link="mysite"

All on same line of LOG

Sorry I don't understnd what you mean

An error log is a file on your server that logs errors - it would not log Links2 unknown tag errors.

Anyway the error is caused by the unknown tag - we really need to see all the code if we are to help - its impossible otherwise.
Quote Reply
Re: [PaulWilson] Adding different <Fields> into Frameset In reply to
OK, first off.... It was from the error log, and it did say Unkown Tag.... even the browser says it.

63.23.109.119 - - [15/Sep/2001:22:40:25 -0400] "GET /cgi-bin/frames.pl?&id=7&title=Test%20Link&coupon=DFSGGGGS&expiration=Unkown%20Tag:%20Expiration HTTP/1.1" 500 540 "http://www.mysite.com/" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)"

But, like I said, I changed the <%Expiration%> tag to <%ExpireDays%>, and the unkown tag don't show up anymore.

Now, I can click the link, the 500 error STILL shows up, but the log or the browser doesn't display Unkown Tag. It's weird.

But I can cut the expiration part out of the thing altogether, and it works beautiful.

Here is what I've done.

I used the nph-expirator mod from resources, and added these fields to the links def.

ExpireDays => [14, 'numer', 12, 12, 1, '', ''],
Coupon => [15, 'alpha', 20, 30, 1, '', '']


For some reason, the tag for display is ExpireDays, but the database thingy is this:

$db_expiration = 14; $db_coupon = 15;

OK,

This is the Ace Framer thing, after I modified it:

Banner.pl

#!/usr/bin/perl
###############################################################
# Copyright Ace Installer 1999/2000/2001. All Rights Reserved #
# Ace Installer Accept no responsibility for any #
# problems that may occur through the use of Ace Referer #
# Mod For Links2 #
###############################################################
# Can't install this script? If so visit the link below #
# we will install it for you for free!!!!! #
# http://www.ace-installer.com/request/request.cgi #
##########################################################
# SUPPORT #
##########################################################
# If you have any problems with this mod or any of our #
# other ones please visit our forum at; #
# http://www.ace-installer.com/forum/ for support #
##########################################################

# Just add the following to your link.htmlpage;
# http://www.yoursite.com/location/to/frames.pl?id=<%ID%>&title=<%Title%>
# You also need to edit inbetween the qq| and |; tags (don't delete these
# tags otherwise it won't work!). If you are using an @ sign remember to escape
# it by putting a \ in front of it otherwise you will get a 500 Internal Server Error....
#
# Thats it except for defining the one variable below...

$locationtojump = "http://www.mysite.com/cgi-bin/links/jump.cgi"; # The location to your jump.cgi script.....

###########################################################
# Don't edit anythihng below this line...... ##############
###########################################################

if ($ENV{'REQUEST_METHOD'} eq 'GET') {
$buffer = $ENV{'QUERY_STRING'};
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}

# Break em up into a format the script can read

@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}


$referer = $FORM{referer};
$title = $FORM{title};
$id = $FORM{id};
$coupon = $FORM{coupon};
$expiration = $FORM{expiration};

#### I've Tried $expiredays, $expire, you name it!#####

print "Content-type: text/html\n\n";
print qq|

<html>

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Author" content="A.J.Newby">
<title>$title</title>
</head>

<body topmargin="0" leftmargin="0">

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="24%" rowspan="3">
<p align="center">Coupon: $coupon &nbsp;&nbsp;&nbsp;Expires: $expiration</td>
<td width="35%" rowspan="3">
<p align="center"><a href="$jumpurl?ID=$id" target="_top">Remove Frame<br>
</a><a href="http://$homeurl" target="_blank">Home<br>
</a><a href="$referer">Back</a></p>
</td>
<td width="91%"></td>
</tr>
<tr>
<td width="91%">
<p align="center">PUT A BANNER HERE OR SOMETHING HERE</td>
</tr>
<tr>
<td width="91%"></td>
</tr>
</table>
</center>
</div>

</body>

</html>



|;


Frame.pl

#!/usr/bin/perl
###############################################################
# Copyright Ace Installer 1999/2000/2001. All Rights Reserved #
# Ace Installer Accept no responsibility for any #
# problems that may occur through the use of Ace Referer #
# Mod For Links2 #
###############################################################
# Can't install this script? If so visit the link below #
# we will install it for you for free!!!!! #
# http://www.ace-installer.com/request/request.cgi #
##########################################################
# SUPPORT #
##########################################################
# If you have any problems with this mod or any of our #
# other ones please visit our forum at; #
# http://www.ace-installer.com/forum/ for support #
##########################################################

# Just add the following to your link.html page;
# http://www.yoursite.com/location/to/frames.pl?id=<%ID%>&title=<%Title%>
# You will also need to edit the banner template in banner.pl (more info at the
# top of the banner.pl file)


########### Things that need defining ##################
#
#
$locationtojump = "http://www.mysite.com/cgi-bin/links/jump.cgi"; # The location to your jump.cgi script.....
$bannerurl = "http://www.mysite.com/cgi-bin/banner.pl"; # location of the page you want to be shown in the top frame....

###########################################################
# Don't edit anythihng below this line...... ##############
###########################################################

if ($ENV{'REQUEST_METHOD'} eq 'GET') {
$buffer = $ENV{'QUERY_STRING'};
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}

# Break em up into a format the script can read

@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}

$referer = $ENV{HTTP_REFERER};
$title = $FORM{title};
$id = $FORM{id};
$coupon = $FORM{coupon};
$expiration = $FORM{expiration};
#### Again, I've Tried $expiredays, $expire, you name it! And I even switched it in the FrameName thing below to match#####
print "Content-type: text/html\n\n";
print qq|

<html>

<head>
<title>$title $referer</title>
<meta name="GENERATOR" content="Ace Installer">
<meta name="Author" content="A.J.Newby">
<meta name="Copyright" content="Ace Installer 1999-2000">
</head>

<frameset framespacing="1" border="0" rows="*,82%" frameborder="0">
<frame name="main" target="footnotes" src="$bannerurl?id=$id&title=$title&coupon=$coupon&expiration=$expiration&referer=$referer" scrolling="no">

<frame name="footnotes" src="$locationtojump?ID=$id">
<noframes>
<body>

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>


|;


Ok, Now this is how I call it from the link.html

/cgi-bin/frames.pl?&id=<%ID%>&title=<%Title%>&expiration=<%ExpireDays%>&coupon=<%Coupon%>

I've flipped flopped Coupon & ExpireDays thinking that they are in a diff order in the links.def, ect. Nothing works for the expire tag. I just left the link part out of the calling for this purpose, but it also works.

Whoooh. Smile

A little big, but hopefully someone can help.

Thanks people,



dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Quote:
OK, first off.... It was from the error log, and it did say Unkown Tag.... even the browser says it.

63.23.109.119 - - [15/Sep/2001:22:40:25 -0400] "GET /cgi-bin/frames.pl?&id=7&title=Test%20Link&coupon=DFSGGGGS&expiration=Unkown%20Tag:%20Expiration HTTP/1.1" 500 540 "http://www.mysite.com/" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)"

Unknown tag errors are internal to Links2 and would not show in your error log. The log you pasted that text above from is your web log which just says who has visited your site and what urls they visited.

Anyway thats not important. In link.html you have
frames.pl?&id=<%ID%>&title=<%Title%>&expiration=<%ExpireDays%>&coupon=<%Coupon%> .....do you have %rec, %in and %globals in site_html_link in site_html_templates.pl?


Quote Reply
Re: [PaulWilson] Adding different <Fields> into Frameset In reply to
Paul

Hell, I don't know. My site has 3 Folders...

mysite-logs
mysite-mail
mysite-www

I got that from the log part, and it was the only log. I've emailed the support to find out.

As for the second part..... This is my sub site link thingy, and I don't see nothing about the other parts.....I think


sub site_html_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like.

my %rec = @_;

# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('link.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}


Does that look right, or do I need to add something??

Thanks,

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Adding different <Fields> into Frameset In reply to
Seems ok.....your best bet it to find your error log as it is likely to hold the key.
Quote Reply
Re: [PaulWilson] Adding different <Fields> into Frameset In reply to
Well what about the %in thing you were talking about? I don't see that in there....or is it? Smile

Sheesh....this is frustrating....

You don't think the expirator mod has somehting to do with it do it?

From using the tag <ExpireDays>, but the links.def thing is $db_expiration...

Could there be a conflict or something? I mean, it has to be definatly something with that....cause like I said, I scratch that part, and it works perfect....

I COULD CRY!!!!!!!!! UHHGGG!!!!

Thanks for everything,

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Paul! I have the error log! In reply to
Here is the error in the log......

[client 63.24.242.247] Premature end of script headers: /home/path/to/cgi-bin/frames.pl
failed to open log file
fopen: Permission denied
[Mon Sep 17 13:51:55 2001] [error] [client 63.24.242.247] Premature end of script headers: /home/path/to/cgi-bin/frames.pl


What the heck does that stuff mean?? This is getting worse.

I've worked with the script all day without the $expiration part in there, and worked fine. I was just trying to get the frame to my liking.

This is what I've changed:

banner.pl

$expiration = $FORM{expiration};

frame.pl

$expiration = $FORM{expiration};

<frame name="main" target="footnotes" src="$bannerurl?id=$id&title=$title&coupon=$coupon&expiration=$expiration&referer=$referer" scrolling="no">

Then, the link.html to:

frames.pl?&id=<%ID%>&title=<%Title%>&coupon=<%Coupon%>&expiraton=<%ExpireDays%>


Once I was sent an email that the error log was set up, I went ahead an added the other stuff. An instant error or course.

I have a quick question also. The FORM thing. Should maybe it be $expiration = $FORM{ExpireDays}; like the tag I use to call it, or am I retarded? Smile

Hopefully you can disect it and help.

Thanks again!

dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Last edited by:

dunno: Sep 17, 2001, 11:04 AM
Quote Reply
Re: [dunno] Paul! I have the error log! In reply to
Quote:
failed to open log file
fopen: Permission denied

It means the script can't open whatever log file it is trying to open.

Can't tell you anymore than that as I don't know what log file it is opening.

Just make sure any log files are chmodded properly
Quote Reply
Re: [PaulWilson] Paul! I have the error log! In reply to
But the script doesn't use a log file Paul.

Only when I add this, does it try to use it. Could it mean something like the expirator mod uses one?

Oh man....came to far for this kind of ending. Unimpressed
dunno

God Bless our Great Nation

God Bless every Family involved in the Tragedy

God Bless all Rescue Efforts

God Bless Peace on Earth


Quote Reply
Re: [dunno] Paul! I have the error log! In reply to
Quote:
But the script doesn't use a log file Paul.

I know - thats why I said I couldn't help.

Yep could be expirator - sounds more likely.
Quote Reply
Re: [dunno] Paul! I have the error log! In reply to
Checking to see what the outcome of this was.

I moved to a new server over the weekend, and started getting this error on add.cgi. However, modify and search are working fine.

failed to open log file
fopen: Permission denied