Gossamer Forum
Home : Products : Links 2.0 : Customization :

My Links Error: Unkown Tag: rate_img

Quote Reply
My Links Error: Unkown Tag: rate_img
Hi All,

I am trying out the MyLinks but its not working and I am getting error, Unkown Tag: rate_img

Below is the code from site_html_templates.pl

sub site_html_mylink {
#---------------------------------
my %rec = @_;
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('mylink.html', {
rate_img => &get_rating_image($rec{'Rating'}),
%rec,
%globals
});
}


Please help. Thank you.

Pagla

Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Do you have a sub called sub get_rating_image in yoursite_html_templates.pl file?

If you are using someone else's templates, then the problem is that you have not defined the rate_img tag...If you do not have the get_rating_image sub in your site_html_templates.pl, simply delete the following codes from your sub site_html_mylink routine:

Code:

rate_img => &get_rating_image($rec{'Rating'}),


Regards,


Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Hi Eliot Lee
T
hank you for your reply. It didn't solve the problem.

I don't have a sub called sub get_rating_image in my site_html_templates.pl file.

I am using someone else's templetes. I deleted the following code from sub site_html_mylink

rate_img => &get_rating_image($rec{'Rating'}),

But I am still getting the same error.

Thanks,

Pagla



Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Did you upload your EDITED site_html_templates.pl???

Wink

Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Yes I did uploaded the edited site_html_templates.pl file.

If you want me to paste the sub site_html_link from site_html_templates.pl I could do that. When I tried to refresh the page it says Error: Already in Cookie: 215 5Z

I copied all the information about MyLinks from the Forum located at
http://207.105.53.169/perl/forum/showthreaded.pl?Cat=&Board=L2Cust&Number=49644

Thanks,

Pagla

Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Refresh what page???

Your mylinks.cgi???

Try deleting the link or adding another link to your My Links and see what happens.

Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
I was refreshing http://www.mydomain.com/cgi-bin/links/mylinks.cgi?add=3


By going to mylinks.cgi I got this


Total Number of Links Stored: 12

< Previous 1 2 Next >

The only problem is not showing the additions. Link to the help page working fine. And when I click to the Next it goes there fine but nothing shows. Do you think the templetes are wrong?

Thanks

Pagla


Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Could be....this is what I have in my sub site_html_mylinks routine:

Code:

sub site_html_mylink {
# --------------------------------------------------------
# This routine shows the layout of the links in the MY Link Pages
my %rec = @_;
return &load_template ('my_link.html', {
%rec,
%globals
});
}


Which is similar to yours, I believe.

Make sure that in your my_home.html file, you have tags on separate lines...like the following:

Code:

<%if links%>
<%links%>
<%endif%>


Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
 
I tried to put exactly like your code but its not working. I pasted some codes below, please take a look.


myhome.html
==================
<div align="center"><center>

<table border="0" width="96%" cellpadding="0" cellspacing="0">
<tr><td>
<font size="2">
Welcome to My Links Service. This page is where your Links are stored. If you are having problems with adding a site to your My Links, please read our <b><a href="<Û_cgi_url%>/mylinks.cgi?help=1">Help Page</a></b>.</font></p>

<p>
<font size="2" color="04649C">Total Number of Links Stored: <b><%total%></b></font></p>


<%ifnot links%>
<p align="center">
<font size="2" color="04649C"><b>You do not have any links stored in My Links.</b></font>
</p>
<%endif%>


<%if links%>
<%links%>
<%endif%>

<%if span%>
<p align="center">
<font size="2" color="04649C"><%span%></font>
</p>
<%endif%>

</td></tr>
</table>

</center></div>




sub site_html_mylink
============================================
sub site_html_mylink {
#---------------------------------
my %rec = @_;
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('mylink.html', {

%rec,
%globals
});
}



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

my %rec = @_;
my $rate_img = "";

# 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'});
$rate_00 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate00.gif" WIDTH=102 HEIGHT=18 ALT="Rate It!" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_01 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate01.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_02 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate02.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_03 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate03.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_04 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate04.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_05 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate05.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_06 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate06.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_07 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate07.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_08 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate08.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_09 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate09.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_10 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate10.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_11 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate11.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_12 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate12.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_13 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate13.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_14 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate14.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_15 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate15.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_16 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate16.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_17 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate17.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_18 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate18.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_19 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate19.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;

$rate_20 = qq|<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}"><IMG SRC="/image_set/rate20.gif" WIDTH=102 HEIGHT=18 ALT="Rating: $rec{'Rating'}, $rec{'Votes'} Votes" BORDER="0" ALIGN="ABSMIDDLE"></A>|;
if ($rec{'Rating'} eq '10.00') { $rate_img = $rate_20; }
elsif ($rec{'Rating'} eq '0') { $rate_img = $rate_00; }
elsif ($rec{'Rating'} le '0.50') { $rate_img = $rate_01; }
elsif ($rec{'Rating'} le '1.00') { $rate_img = $rate_02; }
elsif ($rec{'Rating'} le '1.50') { $rate_img = $rate_03; }
elsif ($rec{'Rating'} le '2.00') { $rate_img = $rate_04; }
elsif ($rec{'Rating'} le '2.50') { $rate_img = $rate_05; }
elsif ($rec{'Rating'} le '3.00') { $rate_img = $rate_06; }
elsif ($rec{'Rating'} le '3.50') { $rate_img = $rate_07; }
elsif ($rec{'Rating'} le '4.00') { $rate_img = $rate_08; }
elsif ($rec{'Rating'} le '4.50') { $rate_img = $rate_09; }
elsif ($rec{'Rating'} le '5.00') { $rate_img = $rate_10; }
elsif ($rec{'Rating'} le '5.50') { $rate_img = $rate_11; }
elsif ($rec{'Rating'} le '6.00') { $rate_img = $rate_12; }
elsif ($rec{'Rating'} le '6.50') { $rate_img = $rate_13; }
elsif ($rec{'Rating'} le '7.00') { $rate_img = $rate_14; }
elsif ($rec{'Rating'} le '7.50') { $rate_img = $rate_15; }
elsif ($rec{'Rating'} le '8.00') { $rate_img = $rate_16; }
elsif ($rec{'Rating'} le '8.50') { $rate_img = $rate_17; }
elsif ($rec{'Rating'} le '9.00') { $rate_img = $rate_18; }
elsif ($rec{'Rating'} le '9.50') { $rate_img = $rate_19; }
else { $rate_img = $rate_20; }

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


I am trying to solve this problem for past three days.

Thanks,

Pagla

Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Why did you post the sub site_html_link routine? This should NOT be used with the mylinks.cgi script.

The problem is most likely in your sub site_html_my_home routine in your site_html_templates.pl. It should look like the following:

Code:

sub site_html_my_home {
# --------------------------------------------------------
# This routine shows the layout of the MY Link Home Page

my $my_link;
my $tags = shift;
print &load_template ('my_home.html', {
title_linked => $title_linked,
%$tags,
%globals
});
}


Regards,

Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
I thought there is some problem with sub site_html_link routine in site_html_templates thats why I put it.

Here is the sub site_html_my_home routine in my site_html_templates.pl


sub site_html_myhome {
# --------------------------------------------------------
# This routine shows the layout of the MY Link Home Page
my $tags = shift;
print &load_template ('myhome.html', {
%$tags,
%globals
});
}

I tried to put the same code as yours sub site_html_my_home routine in site_html_templates.pl and I got the following error
Undefined subroutine &main::load_cgi_template called at /home/www/username/public_html/cgi-bin/links/admin/site_html_templates.pl line 253.



Thanks,

Pagla



Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Oops...forgot to edit that line before I posted it...See why I removed from my templates from a publicly accessible directory...too many custom codes and tags...

Anyway...I have edited my previous Posting.

And again...your sub site_html_link has NOTHING to do with the current problems you are experiencing with the MY Links script!

Wink

Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
 
Having the same Error Unknowen Tag: rate_img


Thanks,

Pagla

Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Don't know what to tell you other than re-installing the files and subs for the site_html_templates.pl file again.

Regards,

Eliot Lee
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
pagala2000

I've been out of town and just got back in. The codes that you have were modified and posted by me and they included the priority logo and rate image mods. I thought I had stripped all of that code out of them. If you got those codes from this thread;

http://207.105.53.169/...=&part=&vc=1

then I think I know where your problem is. I left the rate_img tag in the mylinks.html

I have gone back through them and restored them to the original code, so you might check back to that thread and get them again.

The sub site_html_link that you have is not my codes. My sub looks similar to AnthroRules. All that rate_image code that you have in there would belong somewhere else if you were using that mod. Did you take them out like Eliot suggested?

Anyway if you go back to the thread above and get the code again it should get rid of the rate_img error. Sorry, but I forgot to think about the fact that everybody's links looks different because of hacks. I'm still fairly new here.

If you didn't get the codes from that thread, do you remember which one it was and I will go back and edit it too if I posted it.

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Hi Jimmy Crow,


Yes, the codes are yours and I copied from the forum you posted located at:http://207.105.53.169/perl/forum/showthreaded.pl?Cat=&Board=L2Cust&Number=49644&page=&view=&sb=&part=&vc=1


My sub site_html_mylink in site_html_templates.pl looks like following:


sub site_html_mylink {
#---------------------------------
my %rec = @_;
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ('mylink.html', {

%rec,
%globals
});
}




The whole My Links hack was copied from you I didn't use anyone else's mod. I am still getting Unknown Tag: rate_img. I just took out Rating:<%rate_img%> from the templetes and it work fine without the rating images.

Please help me out. I did whatever Eliot Lee told me to do and I posted all errors in this thread as I was doing it.

Thanks,

Pagla

Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Did you compare your mylinks.html to the codes in the thread mentioned in my previous reply. When I checked the codes there was a tag in the mylinks.html.

All of the code posted on the site now does not have any extra mods that I have on my site. Check that template out, I bet that is where the source of the problem is.

If that doesn't work there is probably some more rate image hack left in the codes that you have missed. I have those codes on my site working now the only difference is that I have changed them to post the bookmarks on my homepage also.

I get a lot of hits on myhome.html and myadd.html everyday and nobody has written saying they are not working. So the next option to take if the mylink.html is not the problem is to re-copy the whole set of codes.

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
I took out <%rate_img%> and put <%Rating%> instead in mylinks.html templete. Its working fine but I want the image rating.

The image rating is working fine with regular pages (Links 2.0). I pasted sub site_html_link from site_html_templates.pl in this thread and it has the original Image Rating Mod. Eliot told me thats not the problem. If you want, you can take a look.


Thanks,

Pagla


Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Oh okay, I thought you didn't want the rate image since you took out the tags in the rest of the code. They will have to be put back in. Can you post your templates and cgi and .pl on your server and then post the url to it here. It wouldn't do any good to look at my current codes because there four extra hacks in them.

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
In your second post you said that you did not have the sub get_rating_image in your site_html_templates.pl The rate_image tag is going to show an error without that sub. Question is how are the images working on the rest of your site without that sub?

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
Please take a look at my 5th post you will find sub site_html_link taken from my site_html_templates.pl.

I had the same question, how <%rate_img%> working in rest of the site without sub get_rating_image.Thats why I was keep reffering to it (sub site_html_link ).

I got the image rating mod from http://www.asan.com/users/phoenix/mod-ratings.html


Thanks,

Pagla


Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
It's going to be pretty hard to find the problem without posting the code, because there is no way of knowing what it looks like. If you don't want to post it maybe you could email it or send it in the private mail. You don't have to worry about me hacking anything on your site, I have a hard enough time navigating through my own site, but I could compare the codes. It's 4:00 am here and I've got to get up in four hours so I'm down for the night but I'll compare them in the morning if you want me to.

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: My Links Error: Unkown Tag: rate_img In reply to
 
Which code do you want to see? Please tell me.

Could you please tell me where can I find the original mod of "Rating With The Images" that you are using?


Thanks,

Pagla