Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Glinks 3 and review_stats.html?

Quote Reply
Glinks 3 and review_stats.html?
There is no template in Glinks3 for review_stats.html in Links SQL 2.X?

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Glinks 3 and review_stats.html? In reply to
No we decided to not include it with the new templates. However, the stats are still generated and the tags are still valid.

Adrian
Quote Reply
Re: [brewt] Glinks 3 and review_stats.html? In reply to
Hi.

i am not sure how to get the <%review_graph%> global from afinlr@Laura going ... in absence of that

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;
}

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Glinks 3 and review_stats.html? In reply to
A Dirty stuff though works just if anyone could convert it into CSS and tidy it out :

review_stats.html

<div class="description">

<table cellspacing="0" cellpadding="0" width="146" style="border: 1px solid rgb(0,0,0)">
<tr align="center">
<td valign="bottom" align="right" width="24" height="16">
100%
</td>
<td valign="bottom" align="center" width="30" rowspan="6" style="border-right: 1px solid rgb(0,0,0); border-bottom: 1px solid rgb(0,0,0); border-left: 1px solid rgb(0,0,0)">
<img height="<%if p1%><%p1%><%else%>1<%endif%>" alt="Times: <%1%>" src="<%build_images_url%>/default/graph_pixel_wide.gif" width="15" border="0" />
</td>
<td valign="bottom" align="center" width="30" rowspan="6" style="border-right: 1px solid rgb(0,0,0); border-bottom: 1px solid rgb(0,0,0)">
<img height="<%if p2%><%p2%><%else%>1<%endif%>" alt="Times: <%2%>" src="<%build_images_url%>/default/graph_pixel_wide.gif" width="15" border="0" />
</td>
<td valign="bottom" align="center" width="30" rowspan="6" style="border-right: 1px solid rgb(0,0,0); border-bottom: 1px solid rgb(0,0,0)">
<img height="<%if p3%><%p3%><%else%>1<%endif%>" alt="Times: <%3%>" src="<%build_images_url%>/default/graph_pixel_wide.gif" width="15" border="0" />
</td>
<td valign="bottom" align="center" width="30" rowspan="6" style="border-right: 1px solid rgb(0,0,0); border-bottom: 1px solid rgb(0,0,0)">
<img height="<%if p4%><%p4%><%else%>1<%endif%>" alt="Times: <%4%>" src="<%build_images_url%>/default/graph_pixel_wide.gif" width="15" border="0" />
</td>
<td valign="bottom" align="center" width="31" rowspan="6" style="border-bottom: 1px solid rgb(0,0,0)">
<img height="<%if p5%><%p5%><%else%>1<%endif%>" alt="Times: <%5%>" src="<%build_images_url%>/default/graph_pixel_wide.gif" width="15" border="0" />
</td>
</tr>
<tr>
<td valign="bottom" align="right" width="24" height="30">80%</td>
</tr>
<tr>
<td valign="bottom" align="right" width="24" height="30">60%</td>
</tr>
<tr>
<td valign="bottom" align="right" width="24" height="30">40%</td>
</tr>
<tr>
<td valign="bottom" align="right" width="24" height="30">20%</td>
</tr>
<tr>
<td valign="bottom" align="right" width="24" height="30">0%</td>
</tr>
<tr align="center">
<td valign="middle" align="right" width="24">
<font face="Verdana, Arial, Helvetica, sans-serif" color="#0066ff" size="1"><b>Times&nbsp;</b></font>
</td>
<td valign="middle" width="30" height="15" bgcolor="#000099"><font face="Arial, Helvetica, sans-serif" color="#ffffff" size="1"><%1%></font></td>
<td valign="middle" width="30" height="15" bgcolor="#000066"><font face="Arial, Helvetica, sans-serif" color="#ffffff" size="1"><%2%></font></td>
<td valign="middle" width="30" height="15" bgcolor="#000099">
<font face="Arial, Helvetica, sans-serif" color="#ffffff" size="1"><%3%></font>
</td>
<td valign="middle" width="30" height="15" bgcolor="#000066">
<font face="Arial, Helvetica, sans-serif" color="#ffffff" size="1"><%4%></font>
</td>
<td valign="middle" width="30" height="15" bgcolor="#000099">
<font face="Arial, Helvetica, sans-serif" color="#ffffff" size="1"><%5%></font>
</td>
</tr>
<tr align="center">
<td valign="middle" align="right" width="24">
<font face="Verdana, Arial, Helvetica, sans-serif" color="#0066ff" size="1">Rating&nbsp;</font>
</td>
<td valign="middle" align="center" width="30" bgcolor="#cccccc" height="15">1</td>
<td valign="middle" align="center" width="30" bgcolor="#e5e5e5" height="15">2</td>
<td valign="middle" align="center" width="30" bgcolor="#cccccc" height="15">3</td>
<td valign="middle" align="center" width="30" bgcolor="#e5e5e5" height="15">4</td>
<td valign="middle" align="center" width="30" bgcolor="#cccccc" height="15">5</td>
</tr>
</table>

</div>

works with the globals above and the graph inclued on the review_search_results.html

[EDIT]
I buggered it up badly ... :/
[EDIT]

TIA

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================

Last edited by:

HyperTherm: Apr 2, 2005, 3:16 PM