Gossamer Forum
Home : Products : Gossamer Links : Discussions :

review graph/chart on detailed paged

(Page 1 of 2)
> >
Quote Reply
review graph/chart on detailed paged
When reading reviews user can view the review helpfulness graph/chart, how can I place the same chart on Detailed page? It is not letting me do that :(

Vishal
-------------------------------------------------------
Quote Reply
Re: [TRPN] review graph/chart on detailed paged In reply to
You need to add <%Links::Utils::load_review%> on to the detailed.html template. Search the forum for more info.

(I think it's that syntax, if not, it's very similar).
Quote Reply
Re: [TLA] review graph/chart on detailed paged In reply to
maybe try <%Links::User::Review::review_search_results($ID)%>
Quote Reply
Re: [TLA] review graph/chart on detailed paged In reply to
I am having a small problem using that. I mean it is working great, but it seems to be messing up the whole layout - visit http://www.trpnscripts.com/cgi/page.cgi?g=Resource%2F991.html&d=1 you will see what I mean.

Thank for the help.

------edit--------

I tried adding below code on detailed page but still it is not showing the graph/chart :(

<%Links::Utils::load_reviews%>
<%if Review_Count%>
There are <%Review_Count%> Reviews: <%loop Review_Loop%> Review #<%row_num%> : <%Review_Subject%>
<br><%endloop%>
<%endif%>

Vishal
-------------------------------------------------------

Last edited by:

TRPN: Jul 23, 2002, 8:08 AM
Quote Reply
Re: [TRPN] review graph/chart on detailed paged In reply to
Has there been any resolution to this problem?

The Review comments etc do display, but similar to yourself I have not been able to get the Review Stats Graph to display?



Regards,



Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] review graph/chart on detailed paged In reply to
~~ BUMP ~~

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] review graph/chart on detailed paged In reply to
Any one??

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] review graph/chart on detailed paged In reply to
Do you get the distinct impression we are talking to ourselves here?Sly

Regards,



Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] review graph/chart on detailed paged In reply to
Try this global:

sub {
my $args=shift;
my ($review_stats,$review_count);
my $reviews = $DB->table('Reviews');
%$review_stats = map {$_ => $reviews->count({ Review_LinkID => $args->{ID}, Review_Rating => $_, Review_Validated => 'Yes'})} (1..5);
$review_count = $reviews->count({ Review_LinkID => $args->{ID}, Review_Validated => 'Yes'} );
if ($review_count) {
for (1..5) {
$review_stats->{'p'.$_} = ($review_stats->{$_}*150)/$review_count;
}
}

my $output;
$output = Links::SiteHTML::display('review_stats', {%$review_stats});
return $output;
}

Laura.
The UK High Street
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
where do we put that code afinir?
Quote Reply
Re: [knewt] review graph/chart on detailed paged In reply to
Go to Admin>Build>Template Globals

Go to the bottom of the list and paste the code into the large empty box and in the New: box type review_graph

Then in your detail page type <%review_graph%> where you want the graph.

Hope it works!

Laura.
The UK High Street
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
afinlr It works great!! you are awsome!
thanks so much. I am also trying to decrease the height of the graph to 160 pixels , which is easy enough, but when there is a review the image bars tend to shoot it back up to 185 pixels. Looking at the code it appears there are some images used for the bars in the graph. would changing the size be of the graph be simple or would every bar image have to be changed to fit a resized graph?

thanks again for the global, wich i could write those like that. :)
Quote Reply
Re: [knewt] review graph/chart on detailed paged In reply to
When there is a review the line in the global

$review_stats->{'p'.$_} = ($review_stats->{$_}*150)/$review_count;

comes into play. You will need to change the 150 to a suitable value for the size of your graph (this is the maximum height of the bar).

Laura.
The UK High Street
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
thanks Laura :) easy stuff...once I'm told
Quote Reply
Re: [knewt] review graph/chart on detailed paged In reply to
Hi Laura,

Above code seems to be working wonderful on normal setting, however I am using seperate template for every main category and when I try to use above code it give me *unknown tag* error.

I was wondering if you can help me out.

Thank you for your support.

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] review graph/chart on detailed paged In reply to
Oh Yeah !!!!

I got it working now even on sub category templates... All what I had to do what just to create global for each template and it worked like charm :)

Thanks Laura for your wonderful code :)

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] review graph/chart on detailed paged In reply to
Ouch.... I guess I said it little to early :(

I am still having a silly error.

I am able to see review graph on the dymanic detailed pages, but I am not able to see the review graph on static detailed pages.

Can you please help.

Thank you.

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] review graph/chart on detailed paged In reply to
The global returns a value when the page is written, dynamic or static.

Did you rebuild your website after making the changes?

Did you "reload" the page to make sure it was updated?

If you are using different template sets for each category, did you make sure you updated the globals for each set?


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] review graph/chart on detailed paged In reply to
Hi PUGDOG,

<% delete %>

it is working great :) thanks for the help..

P.S... now people will be able to see even more updates + features at Need Scripts :)

Vishal
-------------------------------------------------------

Last edited by:

NeedScripts.Com: Feb 4, 2003, 12:26 AM
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
Hi Laura,

Instead of Review Stats, I would like to have Review Subject and Body.

How could I accomplish that using this global

Thanks for the help.
Quote Reply
Re: [cassandra] review graph/chart on detailed paged In reply to
Hi,

You don't need the global for that. You just need to make sure that you include the tag

<%Links::Utils::load_reviews%>

somewhere on the page before the place that you want to show the reviews. Then you can use a loop to loop through the reviews:

<%if Review_Count%>
<%loop Review_Loop%><b><%Review_Subject%></b><br><%Review_Contents%>
<br><%endloop%>
<%endif%>

Laura.
The UK High Street
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
Thanks,

How should I limit it to say only 5 Reviews out 25.


Thanks for the help.
Quote Reply
Re: [cassandra] review graph/chart on detailed paged In reply to
Did anyone find a way ti limit the number of reviews on the detail page? It would be nice to maybe have 5 reviews then a link to the next 5 reviews and so on. Anyone know how to accomplish this?

Thanks,

Craven
Quote Reply
Re: [craven32] review graph/chart on detailed paged In reply to
Why not just link to the reviews page instead of the detail page - this is much easier.
Quote Reply
Re: [afinlr] review graph/chart on detailed paged In reply to
I personally think it looks better to at least have a review or 2 on the detail page. The detail pages are pretty plain and boring without some reviews. I'm using another links indexing script and it has the reviews posted on the details page which just looks better. Not to mention the page will be more likeable to googlebots.

Craven
> >