Support > cpg1.5 themes (visuals)

Hide vote counting..

(1/3) > >>

mr.bena:
Hi, I want to hide the counted votes display inside the bracket just after Rate this file..which is like (No vote yet), (5/5 with 100 votes) etc. I do not want my visitors or users see the no. of votes. Is this possible to remove only for one album having album_id=30?

Αndré:
Copy the function theme_html_rating_box from the sample theme to your theme's theme.php file, if it doesn't exist. Then, find

--- Code: ---$votes = $CURRENT_PIC_DATA['votes'] ? sprintf($lang_rate_pic['rating'], round(($CURRENT_PIC_DATA['pic_rating'] / 2000) / (5/$rating_stars_amount), 1), $rating_stars_amount, $CURRENT_PIC_DATA['votes']) : $lang_rate_pic['no_votes'];
--- End code ---
and replace with

--- Code: ---$votes = $CURRENT_PIC_DATA['votes'] ? sprintf(($CURRENT_PIC_DATA['aid'] == 30 ? '(Current rating : %s / %s)' : $lang_rate_pic['rating']), round(($CURRENT_PIC_DATA['pic_rating'] / 2000) / (5/$rating_stars_amount), 1), $rating_stars_amount, $CURRENT_PIC_DATA['votes']) : $lang_rate_pic['no_votes'];
--- End code ---
if you just want to hide the number of votes, or remove that line completely if you want to remove the whole text.

mr.bena:
Thank you, Andre. It is solved now..

mr.bena:
I may be a little annoying, Andre. I think adjusting the mod we have discussed here would be better again. If that mod could be adjusted to show the Rating only for admin & the picture uploader, it seems better because the uploader will not have to click a link. The show details link we have discussed here would function the same anyway with the request adjustment.

Αndré:
Your links both points to this thread (after removing the pointless stuff from the URL)?

Am I right that you want to hide the actual voting for album ID 30, if the current user isn't the uploader or the admin?

Navigation

[0] Message Index

[#] Next page

Go to full version