Gossamer Forum
Home : Products : Links 2.0 : Customization :

deadlink 2 problem

Quote Reply
deadlink 2 problem
I installed deadlink 2 by glennu. First I got an error when I pressed the "Report a deadlink" button/link, but the path was just the problem. I fixed it, but now I get this lousy message:
Quote:
Unkown Tag: Name

What might be the case here?
I appreciate all help.

Thanks.

- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
You may be missing the Name definition in the hash within the deadlink subroutines in the site_html_templates.pl. Double check the codes in the deadlink subroutines you added to the site_html_templates.pl file.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] deadlink 2 problem In reply to
 I added the code from this page: http://mir.spaceports.com/~glennu/linkdead2.html

Code:
sub site_html_deadlink_mail {
# --------------------------------------------------------
# This routine determines how the deadlink mail success page will look like.
&html_print_headers();
print &load_template ('linkdead_success.html', {
%in,
%globals
});
}

sub site_html_add_linkdead {
# --------------------------------------------------------
# This routine determines how the deadlink comment page looks like.
&html_print_headers();
print &load_template ('linkdead_add.html', {
%rec,
%globals
});
}

sub site_html_deadlink_error {
# --------------------------------------------------------
# This routine determines how the deadlink mail error page will look like.
&html_print_headers();
print &load_template ('linkdead_error.html', {
%in,
%globals
});
}

This I have in site_html_templates.pl

Any clues?

- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
okay...look in your deadlink form codes...you should have a hidden field with Name and <%Name%> as its value...or you may need to change Name to Title.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] deadlink 2 problem In reply to
You mean in the linkdead_add.html?

I don't have a hidden field with %NAME. But there is one there named %TITLE !

This confuses me quite a lot.

Waiting again for respons and thanking for the ones I have got.

- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
Well, look in all your linkdead templates, since that error means that you are passing an unknown tag, remove it from your template and you should be okay...also look in the linkdead.cgi and check for the NAME variable in it.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] deadlink 2 problem In reply to
I think I got something now. I removed the Title field.
Code:
<input type="HIDDEN" NAME="Title"
VALUE="<%Title%>">

And I uploaded the file and tried it. No changes. Still getting: Unknown tag:Name

I searched through both deadlink.cgi and deadlink2.cgi. No Name variable.

But in linkdead_add.html there was a Name variable:
Code:
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr>
<td ALIGN=RIGHT VALIGN=TOP>
<center><font color="#66FF99">Site Name</font></center>
</td>

<td>
<center><font color="#66FF99"><%TITLE%></font></center>
</td>
</tr>

I changed name to title and I got the message:
Quote:
Unknown tag: Title

I also tried adding the hidden field with it. But that didn't make a change. Do I miss a NAME variable in deadlink.cgi?

Thanks for the responses so far.

- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
Looks like you missing the following:

my %rec = @_;

in the sub site_html_add_linkdead.

Should look like the following:

Code:
sub site_html_add_linkdead {
# -------------------------------------------------------
# This routine determines how the deadlink comment page looks like.
my %rec = @_;
&html_print_headers();
print &load_template ('linkdead_add.html', {
%rec,
%globals });
}
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Aug 18, 2003, 8:02 PM
Quote Reply
Re: [Stealth] deadlink 2 problem In reply to
Still get's
Quote:
Unknown tag: Title
or
Quote:
Unknown tag: Name

Thanks for the help, but it don't look like this thing will work! Frown

- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
try adding the name to the page to be built, in site_html_templates. An example from the file:

sub site_html_new {
# --------------------------------------------------------
# This routine will build a what's new page.

return &load_template ('new.html', {
total => $total,
grand_total => $grand_total,
link_results => $link_results,
title_linked => $title_linked,
%globals
} );
}



So add a line like this:

name => $name

Also note that the case is important; name is not the same as Name. Have you tried changing just that?


Just looked, and my report template has this: <input
type="hidden"
name="Title"
value="<%Title%>" />

and the site_html_template has this:

sub site_html_report_success_form {
# --------------------------------------------------------
# This routine determines how the report deadlink success page will look like.

my %rec = @_;
&html_print_headers;

print &load_template ( 'report_success.html', {
title_linked => $title_linked,
remail => $remail,
serror => $serror,
Title => $Title,
URL => $URL,
time => $time,
grand_total => $grand_total,
%in,
%rec,
%globals
});
}



I did not see any field called "Name".


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Aug 19, 2003, 12:38 PM
Quote Reply
Re: [PerlFlunkie] deadlink 2 problem In reply to
I got a lousy error when I tried to build pages.
Quote:
Error including libraries: syntax error at /home/g/ga/gameu/public_html/archive/cgi/admin/site_html_templates.pl line 39, near "name"
Compilation failed in require at /home/p/pt/pt-home/public_html/gameu/archive/cgi/admin/nph-build.cgi line 33.

Make sure they exist, permissions are set properly, and paths are set correctly.


I'm just posting some of the files to see if you can find the mistakes for yourselves. This is beyond my area. I'll be glad for any help!Smile

Thanks PerlFlunkie for your reply. It almost helped me...Unsure

Am I allowed to post the site_html_templates.pl file here? Hope I am. If not I will removed it at once. Just let me know...
- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
You need a comma after the line before name:

# You can put variables here that you would like to use in any
# of your templates.

%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => '',
name => $name
);


Actually, looking at your code, the 'name' you're using is trying to call the link name, which should be called using <%Title%>. Here is a snippet from my file, ignore the CSS coding:

<div
class="row">
<span
class="label">Report as a deadlink:</span> <span
class="field"><a
href="<%URL%>">
<%Title%></a><br />
<%Description%>
<br />
<span class="smalltype">
<%URL%></span></span>
</div>

This show up like so:

Report as a deadlink: True Lies
Today's media is lying to your students about sex, drugs, alcohol, violence and suicide. They tell them premarital sex has no consequences, drugs and alcohol make life more exciting, violence is a way to solve your problems, and suicide is an easy escape. How can you combat this? Get informed with a True Lies Youth Talk. We address these issues using the very same media that students are plugged into, and tell them the truth.
http://www.truelies.org/home.htm

Also, you need more info in the form action, which you have as

<form action="linkdead2.cgi" method="POST">

and should be

<form action=" <%db_cgi_url%>/report.cgi" method="POST">

Actually, I just notice you're using a different mod! Try the one attached.


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Aug 19, 2003, 5:07 PM
Quote Reply
Re: [PerlFlunkie] deadlink 2 problem In reply to
thanks for the script. All worked fine until I was gonna rebuild the script after uploading the link.html file. I got this error at the rebuild page:
Quote:
CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::site_html_lastlink called at /home/p/pt/pt-home/public_html/gameu/archive/cgi/admin/nph-build.cgi line 946.

Script Location : /home/p/pt/pt-home/public_html/gameu/archive/cgi/admin/nph-build.cgi
Perl Version : 5.006

Relly buggy. Haven't done anything in the nph-build.cgi file, I think/hope..

Any suggestions.

Super thanks for the help so far. Things are looking good. Many deadlinks..


- perlman
Quote Reply
Re: [perlman] deadlink 2 problem In reply to
Did you replace the site_html_template file? The error means you left out these from the file you posted before:

sub site_html_lastlink {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like in the lastlink.html webpage.

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 ('lastlink.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}


sub site_html_lastlinkpage {
# --------------------------------------------------------
# This routine will build a seperate last link page.

return &load_template ('lastlinkpage.html', {
category => $category,
grand_total => $grand_total,
lastlink2 => $lastlink2,
%globals
});
}


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] deadlink 2 problem In reply to
All working. Thanks for all the help guys!

Keep it on! Smile

- perlman