Lucky you, I just developed an extension of my Ajax Star Rating Mod, so you can use it on the categories page as well. Maybe, if I have the time I will post the modifications tomorrow, but I can't promise that.
So stay tuned
Regards,
Bash-T
//EDIT:Here is a brief description what you have to change, if you have the Version 1.0 of my Ajax Star Rating Mod (
http://www.4homepages.de/forum/index.php?topic=25551.0 ) installed.
You can see the results on my demopage:
http://www.pawlikonline.de/temp/4images/categories.php?cat_id=1I know the css style isn't perfect, the labels will jump around, but I guess it will still fit your needs
I will release a Version 1.1 with this enhancement included soon, but until then please stick to this description:
1. Open details.phpLocate and delete:
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START------------------------------------------------
$site_template->register_vars(array(
"ajax_rating_labels_0" => $lang['ajax_rating_labels'][0],
"ajax_rating_labels_1" => $lang['ajax_rating_labels'][1],
"ajax_rating_labels_2" => $lang['ajax_rating_labels'][2],
"ajax_rating_labels_3" => $lang['ajax_rating_labels'][3],
"ajax_rating_labels_4" => $lang['ajax_rating_labels'][4],
"ajax_rating_labels_5" => $lang['ajax_rating_labels'][5],
"ajax_rating_messages_0" => $lang['ajax_rating_messages'][0],
"ajax_rating_messages_1" => $lang['ajax_rating_messages'][1],
"ajax_rating_messages_2" => $lang['ajax_rating_messages'][2],
"ajax_rating_messages_3" => $lang['ajax_rating_messages'][3],
"ajax_rating_points" => $lang['ajax_rating_points']
));
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//--------------------------------------------------END2. Open includes/page_header.phpLocate:
?>Insert
above:
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START------------------------------------------------
$site_template->register_vars(array(
"ajax_rating_labels_0" => $lang['ajax_rating_labels'][0],
"ajax_rating_labels_1" => $lang['ajax_rating_labels'][1],
"ajax_rating_labels_2" => $lang['ajax_rating_labels'][2],
"ajax_rating_labels_3" => $lang['ajax_rating_labels'][3],
"ajax_rating_labels_4" => $lang['ajax_rating_labels'][4],
"ajax_rating_labels_5" => $lang['ajax_rating_labels'][5],
"ajax_rating_messages_0" => $lang['ajax_rating_messages'][0],
"ajax_rating_messages_1" => $lang['ajax_rating_messages'][1],
"ajax_rating_messages_2" => $lang['ajax_rating_messages'][2],
"ajax_rating_messages_3" => $lang['ajax_rating_messages'][3],
"ajax_rating_points" => $lang['ajax_rating_points']
));
//-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//--------------------------------------------------END3. Open (your_template)/details.htmlLocate and delete:
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START----------------------------------------------->
<script type="text/javascript">
YAHOO.namespace('rating');
YAHOO.rating.star={
display_percentage : false, //set to true if a percentaged value shall be shown beneath the stars.
display_lables: true, //set to true if a ranking label shall be displayed beneath the stars at mouseover.
//do not modify the properties below!
num : 0,
successfully_voted : false,
labels : [ '{ajax_rating_labels_0}' , '{ajax_rating_labels_1}', '{ajax_rating_labels_2}', '{ajax_rating_labels_3}', '{ajax_rating_labels_4}', '{ajax_rating_labels_5}'],
msgs : [ '{ajax_rating_messages_0}' , '{ajax_rating_messages_1}', '{ajax_rating_messages_2}']
};
</script>
<script type="text/javascript" src="scripts/ajaxrating.js"></script>
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//-----------------------------------------------END-->
4. Open (your_template)/header.html Locate:
{if has_rss}
Insert
above:
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//START----------------------------------------------->
<script type="text/javascript">
YAHOO.namespace('rating');
YAHOO.rating.star={
display_percentage : false, //set to true if a percentaged value shall be shown beneath the stars.
display_lables: true, //set to true if a ranking label shall be displayed beneath the stars at mouseover.
//do not modify the properties below!
num : {image_id},
successfully_voted : false,
labels : [ '{ajax_rating_labels_0}' , '{ajax_rating_labels_1}', '{ajax_rating_labels_2}', '{ajax_rating_labels_3}', '{ajax_rating_labels_4}', '{ajax_rating_labels_5}'],
msgs : [ '{ajax_rating_messages_0}' , '{ajax_rating_messages_1}', '{ajax_rating_messages_2}']
};
</script>
<script type="text/javascript" src="scripts/ajaxrating.js"></script>
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating --------------by Bash-T---
//-----------------------------------------------END-->
5. Open (youre_template)/rate_form.htmlLocate:
<form method="post" id="ajax_rate_form" name="ajax_rate_form">
<div id="star"><br style="clear: both;" />
<ul id="star0" class="star" onMouseDown="YAHOO.rating.star.update(event,this)" onMouseMove="YAHOO.rating.star.mouse(event,this)">
<li id="starCur0" class="curr" title="{image_rating}" style="width: 0px;"></li>
</ul>
<div style="color: rgb(136, 136, 136);" id="starUser0" class="user" percent="0"></div>
<div id="star_rating_label" class="user"></div>
<div id="star_rating_msg" class="user"></div>
</div>
<input type="hidden" name="rating" value="0" />
<input type="hidden" name="action" value="rateimage" />
<input type="hidden" name="id" value="{image_id}" />
</form>
replace with:
<form method="post" id="ajax_rate_form{image_id}" name="ajax_rate_form">
<div id="star"><br style="clear: both;" />
<ul id="star{image_id}" class="star" onMouseDown="YAHOO.rating.star.update(event,this)" onMouseMove="YAHOO.rating.star.mouse(event,this)">
<li id="starCur{image_id}" class="curr" title="{image_rating}" style="width: 0px;"></li>
</ul>
<div style="color: rgb(136, 136, 136);" id="starUser{image_id}" class="user" percent="0"></div>
<div id="star_rating_label{image_id}" class="user"></div>
<div id="star_rating_msg{image_id}" class="user"></div>
</div>
<input type="hidden" name="rating" value="0" />
<input type="hidden" name="action" value="rateimage" />
<input type="hidden" name="id" value="{image_id}" />
</form>
6. Open (your_template)/thumbnail_bit.html Insert at this place, where you want the rating element beeing shown:
<div align="center">{rate_form}</div>
<span id="ajax_rating_count{image_id}">{image_votes}</span> {lang_votes} | <span id="ajax_rating_rate{image_id}">{image_rating}</span> {ajax_rating_points}
7. Download attached ajaxrating_v1.1.zip and extract it into the /scripts/ folder (overwrite the old one)Tweaks:- You can tweak the settings for the starRating Elements on each page (details.html, categories.html, index.html) by adding the following lines, directly below the {header}
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating -TWEAK-----(c)-by Bash-T--
//START----------------------------------------------->
<script language="javascript">
YAHOO.rating.star.display_percentage = false; //if true: percentages will be shown for each star element on this page
YAHOO.rating.star.display_lables = false; //if true: labels will be shown for each star element on this page
</script>
<!-----------------------------------------------------
//--- [MOD] Ajax Star Rating -TWEAK------(c)-by Bash-T-
//-----------------------------------------------END-->
Anyway, you do not have to insert this code on each page. If nothing is specified, then the default settings from the header.html will be taken.
[/li]
Hope this enhancement of my mod will now fit you needs
Regards,
Bash-T