Theme Fruity, In Config I have it set to show image Title and number of views below the thumbail inside albums.
Is there a mod (easy hopefully) to add the rating that photo has? Either the graphic depiction of 1-5 stars, or the 5/5 ratio or something?
The only way to see ratings now is to click on the thumb and view the image full-size, or use "show top rated". It would be nice to be able to open an album and quicklyy see what's been rated without having to click on each thumb to check.
Thanks,
C
include/functions.inc.php, search for
// Set picture caption
if ($set_caption) build_caption($rowset);
and change it to
// Set picture caption
if ($set_caption) build_caption($rowset, array('pic_rating'));
Also, change
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';
to
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name, votes, pic_rating';
To hide pics with no ratings, change
$caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']).'</span>';
to
if ($row['votes']) $caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']).'</span>';
Great! That looks like a real easy change. Can you tell me what it'll add? The star graphic like displayed on the "top rated" page?
Thanks,
C
OK I just went ahead and changed it. It displays the star graphic and the number of votes below that. Nice.
Would there happen to be a line of code that can be added/changed to make it show only for pics that actually have votes?
C
Hmmm. I should have looked closer at the change it made. It shows 5 empty stars for everything instead of showing them appropriately colored in red according to the rating the image has. I un-did the change and think I'll just leave it as it unless you have another suggestion to try. Thanks,
C
See updated instructions.
OK, I'll try it again. I need to change all three lines of code right, not just the latest one?
Thanks,
C