Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Unkown Tag: R

Quote Reply
Unkown Tag: R
I tried rating a resource, and got the following notice:

Unkown Tag: R

I clicked back, and tried again and it said I'd already rated it recently, so apparently, it went through, but what is wrong that it shows the Unkown Tag: R thingy? What can I do to fix that?


------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
The 'R' variable is part of the external rate it script. If you are trying to display the rating received <%R%> on the page, it can't be recognized unless you add %rec, to sub home_site_html_rating_form_success in site_html_templates.pl. If you still have problems, check the instructions to be sure you didn't miss something else:
speculativevision.com/rateit/rateitmod.shtml

I don't think this is necessary for the non template version.
Quote Reply
Re: Unkown Tag: R In reply to
OK, all I do is add the following:

Quote:
%rec

to sub home_site_html_rating_form_success in
site_html_templates.pl right? That's all? That will get rid of the unkown tag: R thing? OK.

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
%rec is already there:

Quote:
sub home_site_html_rating_form_success {
# --------------------------------------------------------
# This routine is for the remote rating success page.

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

I think I got the error when I was trying to rate it from the Directory, anyway. So what do I do now?

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
Ah-ha...it sounds like your added the <%R%> variable to your normal rate success template. That won't work. The R is a special variable that only exists when you run the remote ratings script. I'm not sure off the top of my head what the variable in the regular ratings script is, but try taking the <% R %> out of the regular rate success template and see if that eliminates the error.
Quote Reply
Re: Unkown Tag: R In reply to
But I never _added_ the %R% tag to begin with; it was already there when I got the script. *whimper* Should I still take it out?

I'm sorry if I'm sounding incredibly stupid, I don't know about these things...

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
*sigh* Well, should I? I don't really know what I'm doing and the last thing I want to do is screw up my scripts so they don't work. :/

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
Sorry...missed your reply Frown

I don't know why it would be in your downloaded templates, but if the <%R%> is in ANY template other than remote_rate_success.html, take it out and it should work.

If you still have trouble, let me know.
Quote Reply
Re: Unkown Tag: R In reply to
OK, the <%R%> tag was found only in rate_success.html and remote_rate_success.html templates in the form of the following line:

Quote:
Your rating of <%R%> was received. Thank you for your vote. This sites current overall rating is <%Rating%>. Current site ratings will appear when the Directory is updated.

It must have come in rate_success.html (and remote_rate_success.html, for that matter) because I sure didn't put it in there. Should I take it out of rate_success.html ? Why would that make any difference in how it worked? If it works in remote_rate_success.html why wouldn't it work in rate_success.html ? I mean, it's just feeding the person back the rating they submitted...

I'm kinda confused...(did she say "kinda"?)

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: Unkown Tag: R In reply to
 
Quote:
Should I take it out of rate_success.html
Yes.

Quote:
If it works in remote_rate_success.html why wouldn't it work in rate_success.html?
It's because the R variable is not a "standard" part of links. It was made up by MRaburn when he came up with the original remote ratings script...I kept it in the templates version. The R variable is ONLY created by the remote ratings script, then "fed" directly to remote_rate_success.html. No R variable is created by the regular/internal ratings script, so there is nothing to pass to rate_success.html. In essence, when Links trys to parse rate_success.html, its getting to the %R% call and coughing up an error at you to say "hey, what do you expect me to do with this non-existent variable?".

Quote Reply
Re: Unkown Tag: R In reply to
Hey, whaddaya know. I took it out and didn't have any problems rating stuff after that! Thanx!

------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/