summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-27 01:31:18 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-27 01:31:18 +0000
commit534f9da3d2b2644c2700050c76657d003878ed58 (patch)
tree87d0a6aa736ed0d6b2d398d0d9d3534ca7fecc9f /templates
parent6b0b77f12b6873204bfd73a250621115b1f539a0 (diff)
downloadampache-534f9da3d2b2644c2700050c76657d003878ed58.tar.gz
ampache-534f9da3d2b2644c2700050c76657d003878ed58.tar.bz2
ampache-534f9da3d2b2644c2700050c76657d003878ed58.zip
fixed rating system if using non-flash
Diffstat (limited to 'templates')
-rw-r--r--templates/header.inc2
-rw-r--r--templates/show_object_rating.inc.php17
2 files changed, 12 insertions, 7 deletions
diff --git a/templates/header.inc b/templates/header.inc
index 635330d8..d69cee63 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -45,7 +45,7 @@ $location = get_location();
</div>
<div id="topbarright">
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br />
- <b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->username; ?></b>
+ <b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->fullname; ?></b>
<br />
<?php echo _("Browse"); ?>:
<form method="post" action="<?php echo conf('web_path'); ?>/browse.php" enctype="multipart/form-data" style="Display:inline;">
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php
index 5b95868b..91df1f15 100644
--- a/templates/show_object_rating.inc.php
+++ b/templates/show_object_rating.inc.php
@@ -29,19 +29,24 @@ if ($type != 'song') {
$base_url = conf('web_path') . '/ratings.php?action=set_rating&mode=' . conf('flash') . '&rating_type=' . $rating->type . '&object_id=' . $rating->id . '&username=' . $GLOBALS['user']->username;
$score = '0';
+
/* count up to 6 */
while ($score < 6) {
/* Handle the "Not rated" possibility */
- if ($score == '0' AND $score === $rating->rating) {
+ if ($score == '0' AND $rating->rating == '-1') {
echo "<img src=\"" . conf('web_path') . "/images/ratings/x.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n";
+ $found_on = true;
}
- elseif ($score == '0') {
- echo "<a href=\"" . $base_url . "&rating=$score\">\n";
- echo "\t<img src=\"" . conf('web_path') . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n";
- echo "</a>";
+ elseif ($score == '0' AND $rating->rating == '0') {
+ echo "<img src=\"" . conf('web_path') . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n";
+ $found_on = true;
}
- elseif ($score === $rating->rating) {
+ elseif ($score == $rating->rating) {
echo "<img src=\"" . conf('web_path') . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n";
+ $found_on = true;
+ }
+ elseif (!$found_on) {
+ echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . conf('web_path') . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n</a>\n";
}
else {
echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . conf('web_path') . "/images/ratings/star_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\">\n</a>\n";