View Single Post
Old 05-28-2021, 09:32 PM   #2254
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Phil_C View Post
I'm fiddling with this function in my plugboard, but can't get it to show half stars. It uses a column for Goodreads ratings in the format x.xx.

Tried:

rating_to_stars(value,use_half_stars)
rating_to_stars(value,1)
rating_to_stars(value,use_half_stars=1)

...and more, but I guess I don't understand what to do. I get only whole stars.

How do I get half stars to work?
The way to use it is:

Code:
rating_to_stars(value,1)
But, the value is a number between 0 and 5. And it rounds the number to the half star. So, 1.5, 1.8 and 1.99999 will all be one and a half stars. It seems to work here.

If you are still having problems, I would suggest asking in the Library Management sub-forum. That will get the attention of @chaley who has been working on the template functions.
davidfor is offline