This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Average Star Rating Feed
#1

I am using this programme to gain reviews for apartments listed on my site and would like the average star rating to appear on the individual apartments page and a page which lists all apartments.

Is there a bit of code which I can copy and paste for the average rating to show up on other (html) pages?

Many thanks.
Reply
#2


I'm giving you three guesses...
Reply
#3

Many thanks for the answer. I do not know too much PHP but will have a look and see if I can get it to work.

Thanks again for all the help. Great programme!
Reply
#4

Implementation (can be seen in action at www_kakteja_com) - everything is Google Rich Snippets ready:

1. part of html page, where php for stars data is called:
--------------------------------------------------------------------------------

<div class='zsm'>
<div class='hreview-aggregate'>
<span class='hidden_rating'>
<span class='item'>
<span class='fn'>
Šotori, tende, stojnice, bungalovi, paviljoni ... XX-XX zastopstvo in prodaja.
</span>
</span>
</span>
<table>
<tr>
<td valign='middle' class='blu'>
<a class='blo' title='Šotori, tende, stojnice ... E-Z UP! Ocene in komentarji.' href='/ocene-komentarji.php'> Komentarji in ocene </a>
</td>

<?php
$page_id = "1";
$mysql_table_prefix="" ;
$url_to_comments_folder="/slike/" ;
define ('IN_COMMENTICS', 'true');

$zvezd="vseb/zvezdje.php" ;
include $zvezd ;
?>

</tr>
</table>
</div>
</div>

2. css part
--------------------------------------------------------------------------------

.blu {
background-color: #5555ff;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 10px;
padding-right: 10px;
}

.dlu {
background-color: #000055;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 10px;
padding-right: 10px;
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
font-weight: 900;
text-decoration: none;
color: #ffffff;
}

.kbs {
padding-top: 0px;
padding-bottom: 0px;
padding-left: 5px;
padding-right: 5px;
}

.blo {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
font-weight: 900;
text-decoration: underline;
color: #ffffff;
}

.blo:visited {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
font-weight: 900;
text-decoration: underline;
color: #ffffff;
}

.blo:hover {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
font-weight: 900;
text-decoration: underline;
color: #ffffff;
}

.stv {
position: relative;
height: 18px;
vertical-align: text-bottom;
}

.arb {
position: relative;
padding-left: 4px;
border-width: 1px;
border-style: solid;
border-color: transparent;
}

.hidden_rating {
display: none;
}


3. send .html over php processor, add into .htaccess (if needed)
-----------------------------------------------------------------------------------------------

AddHandler application/x-httpd-php5 .html .htm


4. upload .php file to document root and edit mysql connect data
-----------------------------------------------------------------------------------------------


Attached Files
.php zvezdje.php Size: 6.53 KB  Downloads: 80
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 1 Guest(s)