Gossamer Forum
Home : Products : Gossamer Links : Discussions :

If Review_Count tag

Quote Reply
If Review_Count tag
Hi

I am trying to use the tag <%if Review_Count%> on the detailed page but it is returing unknown tag..

Also if a user get to the Review view page of a link with no reviews they the same tag <%Review_Count%> does not work?

I thought it should be defaulted to 0 but it is not...

What is a good solution for that?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If Review_Count tag In reply to
<%if Review_Count%>
<%Review_Count%>
<%else%>
0
<%endif%>

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: [Andy] If Review_Count tag In reply to
Hi

that is what I have and it is returning unknown tag..!!
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If Review_Count tag In reply to
Use GT::Template::dump and you'll probably see that Review_Count isn't available on the detailed page.

You'll need a global by the look of it.

Last edited by:

Paul: Aug 15, 2002, 4:29 AM
Quote Reply
Re: [Paul] If Review_Count tag In reply to
In Reply To:
You'll need a global by the look of it.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If Review_Count tag In reply to
Hi:



Here is a quick global for review_count (although you might want to use a different name....)



Quote:


sub {
no strict;
my ($rec) = @_;
my $user_name = $rec->{'user_name'};
my $review_db = $DB->table('Reviews');
my $count = $review_db->count ({Review_Owner => $user_name });
return $count;
}
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] If Review_Count tag In reply to
Hehe you can get rid of that no strict you always seem to have :)

Last edited by:

Paul: Aug 15, 2002, 1:43 PM
Quote Reply
Re: [Paul] If Review_Count tag In reply to
Paul:



What does that mean? I always leave that in because I do not know what it does... but what does "use Strict" and No Strick" actually do?



Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] If Review_Count tag In reply to
Do you read the replies you get to your posts? I posted an url to a page that explains what use strict does....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] If Review_Count tag In reply to
Yogi:



I was posting here when you were replying there Blush.... but yes, I did see that later. Thank you!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] If Review_Count tag In reply to
Thanks...

I do not think i was clear..

What I am trying to do is use an if statement in the link detailed page so if that link has reviews a link to read the reviews will appear...

the tag that we can us in link.html does not work any where else for some reason...
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If Review_Count tag In reply to
The Review_Count tag should be available on the detailed page.

You can use <%GT::Template::dump%> to see which tags are there, and which are not.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] If Review_Count tag In reply to
I did that and it shows as not available...

I thought it will be but its not..!!

I think the detailed page lists all the links variables not the Review table variables
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

katabd: Aug 16, 2002, 2:07 PM
Quote Reply
Re: [katabd] If Review_Count tag In reply to
Hi KaTaBd,

You just need to add the tag <%Links::Utils::load_reviews%> before you use any of the review tags.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] If Review_Count tag In reply to
Thank

That worked as good as.....
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory