Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As we get further into building our site, we're giving our users more and more freedom to affect what's on it. There is one interactive feature that's become really popular over the last few years, as is evident from the number of like and +1 buttons you see everywhere-- that is, the ability to rate content. In Drupal Gardens that's done through a system called Fivestar. You have to turn it on first, and you do that by going up to Modules and then down to Fivestar. You get there more quickly by closing the CORE group. And then scroll a little, and there it is. Enable it, go to the bottom of the page, and Save configuration.
I want to show you a little quirk about Fivestar by going back to that Module. Scroll down a little bit and click the Permissions. This is a big page, so I will search for Fivestar, and there it is. By default, only the Administrator is allowed to rate content. I am going to leave it like that for now, but if you're setting up a social site, you'll probably want to let everybody rate content, or at least authenticated users. Anyway, let's go back to our modules and take a look at Fivestar again. There is something peculiar about it.
There is no configuration setting here. And if you go up to Configuration, you'll see as you scroll through the page, there is also no configuration setting here. That's because turning on the Fivestar system is actually only evident when you add fields to content types, as you saw how to do in the video "Creating and managing content types. To show you that, I'll go up to Structure, and Content types, and Forum, and manage fields. I am going to add a new field which I will call Rating.
The field type will be Fivestar Rating-- this is where it shows up--and you see that there are a few options there. I will accept the defaults and save. On the next page, there are quite a few choices, for example, the Number of stars, whether you want to make this Public or Private or so forth. But I'll just say Save settings for now. Very good! Now let's see what that looks like when you actually go in to look at content. To do that, I will close the Overlay, then I will go to my Forums by clicking on Forum, and General discussion.
Now, earlier we had created this topic here, This is a sample forum topic. I'll click it to see what it looks like. And that's where our rating system is. Let's say that I really liked this post. I'm going to give it four stars. As you do this, it makes an average based on everybody who has voted. This is really nice. And by the way, using Views, you can sort by the five-star rating so the most popular things float to the top. Now, the way we have this set up, you can only rate the post itself; you can't rate comments.
However, you can actually change that. I am going to open up a new tab and show you, by Command+Clicking or Ctrl+Clicking on Structure, then to Content types, back to Forum again, and manage fields. Once there, I can look at Comment Fields. And as before, if we wanted, we could add a rating so that the comments actually have ratings as well. You know, I've decided I don't really want to have Fivestar Ratings on my site, so I can get rid of them very easily, simply by turning off the Fivestar Module.
I go up to Modules, go back to my Fivestar check box, uncheck it, and scroll down to the bottom, and save. Now if we go back to that original Forum topic where we had the rating, if we reload the page, you see that it simply disappears. Very easy, very clean. So you might be asking, what good do those Fivestar Ratings do for you besides showing someone how good a particular story or comment was? Well, as I mentioned earlier in the video, "Creating complex information collections with views," you can combine views with Fivestar to do some really interesting things.
That's a great way to get your users to curate your site for you, which in the end delivers better quality to everyone.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.