rating-system

Django star rating system and AJAX

人走茶凉 提交于 2019-12-03 04:38:50
问题 I am trying to implement a star rating system on a Django site. Storing the ratings in my models is sorted, as is displaying the score on the page. But I want the user's to be able to rate a page (from 1 to 5 essentially) without a refresh or change of page. I have found the following, and like the style of the stars here: http://jvance.com/blog/2008/09/22/JQueryRaterPluginNew.xhtml Currently have a limited understanding of javascript and AJAX. Does anyone know how to use the stars in the

algorithm used to calculate 5 star ratings

浪子不回头ぞ 提交于 2019-12-03 01:33:57
问题 I need to calculate 5-star ratings like the one on Amazon website. I have done enough search to find what is the best algorithm, but I am not able to get a proper answer. For example, if these are the ratings 5 star - 252 4 star - 124 3 star - 40 2 star - 29 1 star - 33 totally 478 reviews Amazon has calculated this to be "4.1 out of 5 stars". Can anyone tell me how this figure is arrived at? I am not able to get this just by doing average. 回答1: That's a weighted average, where you weigh each

Django star rating system and AJAX

无人久伴 提交于 2019-12-02 17:47:48
I am trying to implement a star rating system on a Django site. Storing the ratings in my models is sorted, as is displaying the score on the page. But I want the user's to be able to rate a page (from 1 to 5 essentially) without a refresh or change of page. I have found the following, and like the style of the stars here: http://jvance.com/blog/2008/09/22/JQueryRaterPluginNew.xhtml Currently have a limited understanding of javascript and AJAX. Does anyone know how to use the stars in the above example combined with AJAX and Django, so you are able to update the database (models) without a

How can I decrease the size of Ratingbar?

孤街醉人 提交于 2019-12-02 16:02:07
In my activity I have some Rating bars. But the size of this bar is so big! How can I make it smaller? Edit Thanks to Gabriel Negut, I did it with the following style: <RatingBar style = "?android:attr/ratingBarStyleSmall" android:numStars = "5" android:rating = "4" /> Now, the size is reduced but number of stars and rating do not take effect!!! Why? I have 7 stars that 6 of them is selected. The original link I posted is now broken (there's a good reason why posting links only is not the best way to go). You have to style the RatingBar with either ratingBarStyleSmall or a custom style

How to build simple reviewing and 5-star rating system? [closed]

天涯浪子 提交于 2019-12-02 14:43:17
I'm very new to web technologies and this is basically for a term project that my team is working on. We are working on a food review site. As of now, I'm not quite sure how to implement a simple 5-star rating system. Am I supposed to use a server-side language like PHP or a client-side one like Javascript (w/ JQuery). Looking around it seems that JQuery is more suitable for this? Or would it be a combination of both? What I'm looking for as far as functionality goes is: Stars light up when mouse hovers Page doesn't have to be reloaded when a star is clicked (not really needed) Some sort of

algorithm used to calculate 5 star ratings

北慕城南 提交于 2019-12-02 13:52:12
I need to calculate 5-star ratings like the one on Amazon website. I have done enough search to find what is the best algorithm, but I am not able to get a proper answer. For example, if these are the ratings 5 star - 252 4 star - 124 3 star - 40 2 star - 29 1 star - 33 totally 478 reviews Amazon has calculated this to be "4.1 out of 5 stars". Can anyone tell me how this figure is arrived at? I am not able to get this just by doing average. That's a weighted average, where you weigh each rating with the number of votes it got: (5*252 + 4*124 + 3*40 + 2*29 + 1*33) / (252+124+40+29+33) = 4.11

how to allow only one vote for a rating system

会有一股神秘感。 提交于 2019-12-01 14:37:01
guys i have made a jquery and css based star rating system. now i cant really think of way as how to save the user vote to database. and most importantly how to limit one user only to one vote. since the number of visitors in the site is huge, i cant afford saving each user's ip to the database. and moreover i don't think it works good because even my ip address itself is dynamic. every time i disconnect and reconnect my internet my ip changes and i am able to vote again. so i don't think this will work. this is what i have thought about saving the votes to the database: ill just save the

how to allow only one vote for a rating system

孤街醉人 提交于 2019-12-01 12:20:42
问题 guys i have made a jquery and css based star rating system. now i cant really think of way as how to save the user vote to database. and most importantly how to limit one user only to one vote. since the number of visitors in the site is huge, i cant afford saving each user's ip to the database. and moreover i don't think it works good because even my ip address itself is dynamic. every time i disconnect and reconnect my internet my ip changes and i am able to vote again. so i don't think

How do I edit the CSS of one blog post but not others to have a 5 Star Rating System?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 11:52:24
I recently created my own blog using Google's Blogger. When I have completed reading a particular book, I have a Book's I Read Section where I would like to have a static 5 Star Rating System in place of some kind. Perhaps with CSS , I can target each book so I will be able to display from 1 to 5 Stars for the visitor to see. I'm not sure how to edit the CSS of individual blog posts so I can target these specific read books, if that's the best method, and would like any tips in creating an image which I could specify how much of the 5 stars should be displayed (like 100% for 5 Stars, 80% for 4

Converting numbers to visual rating (stars)? [closed]

自作多情 提交于 2019-11-29 09:26:38
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . in my database ı have numbers 1 , 2 , 2.5 , 3 , 3.5 , 4 , 4.5 and 5 I want to convert these numbers to stars. I have a full star and a half star. How ı can do that after getting information from database? I have