subscribe: Posts | Comments | Email | Twitter     external: Forum | Issue Tracker

How To: Set and use multi ratings

46 comments
How To: Set and use multi ratings

Setting and using multi ratings system is much different than standard ratings used for posts, pages or comments. And since this feature is new, here is the step by step tutorial on how to start using it.

There are still some things missing from current multi rating implementation that will help you in using it.

Enable Multi Ratings

Enable Multi Ratings

1. Enable Multi Ratings

First thing you need to do is to make sure that multi ratings feature is active. Go to the plugin settings panel, and on the general tab find plugin features section. There you need to check Multi Ratings checkbox, and click save settings button. This will enable the multi ratings, and all the panels and settings tab for them will be visible.

Also, on the general page there are adnimistation settings at the top with 3 display checkbox that you need to enable if you want to set custom CSS classes for multi rating block.

Settings

Settings

2. Multi Ratings Settings

Since we are on settings panel, we might wanna check out the settings multi ratings use. You can choose rating stars and their size for rating blocks for starters. After that you have rating text that will be rendered above rating block with stars. You can use HTML formating for the rating text. Don’t be fulled by the size of the field, there is no limit on the content you can insert here. Bu don’t go to far either.

After that you can add 4 CSS classes that will be applied to different rating block elements.  Main class is the one added to whole rating block. Inside that block there is a HTML table with all rating elements, and one CSS class is applied there. Rating text can also have custom CSS and the rating submit button another class. You can add more than one class per field, you just sepparate them with empty space.

Vote message is pretty much self explanatory, and also displays the preview of what you have choosen.

New Set

New Set

3. Creating Multi Ratings Set

Now go to the Multi Sets panel, it’s time to create your first set. Click on the Add New Multi Rating Set button, and an empty form will appear. Give your set a name, write a shor description and than set the number of stars you want for the ratings. Now you need to add elements to the set. You can see that each element has a name and weight. Weight is used to calculate average rating for the set as a whole and different weights mean that element will have different impact on that calculated rating.

Most important thing about this step is that once the set is created you can’t change number of stars or number of elements one set has. It will be way to complicated to change saved info once the ratings are logged in the database. So think about what you need in the set before creating it.

After the set is saved, if everything is ok, it should appear on the multi sets lists with all the valid elements listed. Each set will get unique ID that you can use later if you want to insert the shortcode manually or to call function for insertion.

Inserting shortcode

Inserting shortcode

4. Inserting multi ratings block into the post

Finally, you can add rating to a post or page. Right now there is no means for autoinsertion, so you need to add it yourself. There are two methods for this, one using shortcode and the other by php function call.

Shortcode

This is easier to do, and you can even use rich tinyMCE3 editor on the post edit page to do it. Editor plugin has a black/yellow star icon. When you click on it you will get popup dialog like one on the right. Select multi shortcode from the list, and a Multi Rating tab will appear. There you can select your rating set, and click insert. Popup will close, and a shortcode will be inserted in the post. Shortcode has only one parameter right now and that parameter is set ID. Inserted code will look like this (without spaces after [ and before ] signs):

[ starratingmulti id="1" ]

You can add shortcode anywhere in the post. Further more you can add 2 or more different sets in the same post.

PHP Function

If you want to integrate multi rating block call directly into the theme. Important thing is that this must be done within the WordPress post loop so that plugin can identify the post. This function is very simple, and requiers multi set id as a parameter:

wp_gdsr_render_multi(1)

By default this function will echo the rating block into the HTML. But this function has a second parameter that can change this and return rendered block as a string instead of echoing it. Just add second parameter as false if you want to get rendered string.

5. Conclusion

If everything is set right, and you didn;t missed something, you should be able to see working rating block in the post.

GD Star Rating
loading...
How To: Set and use multi ratings7.610192


  1. Hi Millan,

    I thank you for this nice tutorial. Why wouldn’t you add, when you can spare some time, a 5th chapter with “Inserting multi ratings block into the comments”. Even if it’s a more specifical matter, i’m sure many people would be interested. See you !

    GD Star Rating
    loading...
  2. Thank you for this awesome plugin!
    Will you implement a similar multirating-system, but for reviewing purposes instead? For example so one could split up the overall rating of a game into several like graphics, sound and so on?

    GD Star Rating
    loading...
  3. Hi Milan,

    I know I’ve stated this already, but I don’t know if you saw it or not. Please consider, if at all possible, adding the option of having stars instead of (or above) the text “Rating: 8.0/10 (21 votes cast)”. I’m talking about the overall rating in the multi rating blocks, that is calculated after clicking the “Submit” button.

    And the news about the multi ratings in comments and the multireview is awesome! And so soon! Thank you a million times for the best and most configurable Wordpress Plugin!

    GD Star Rating
    loading...
    • I am affraid that additional block will be overkill at this point, but anyway I will add that as an option.

      I can’t promise you exactly when, but I am working on redesign for whole templates system, and that will include more options in this part, and than there will be another template element for rendered rating stars image.

      GD Star Rating
      loading...
  4. Thanks Milan!

    The overall result stars would be a little bigger than the other elements, this way it won’t seem cluttered.

    I just thought that meanwhile, I could include a starreview right beneath the soon to be available multireview. It needs some experimenting.

    GD Star Rating
    loading...
  5. Hi MillaN,

    Fantastic application. Easy to install and manage. Thanks.

    I wonder if it would be possible to call the overall rating seperately to the multirating block. E.G. I could call the full multiratings into the full post, but only call the overall summary stars into the excerpt.

    One otherthing… is there a way of deleting a rating? For example if a user clicked in error? It would be great if there was an option to let the author change their mind. (it’s only because it is already so useful that more ideas come to mind!!).

    I’m looking forward to the next update.

    Many thanks again

    Nathan

    GD Star Rating
    loading...
    • There will be summary rating call for multi ratings soon.

      Deleting of ratings can be done only from admin panel. And for multi ratings it can’t be deleted yet, I am working on multi panels. There will be possible to change vote at one point, but this is planned for 1.3 version.

      And new version will be released tonight.

      GD Star Rating
      loading...
      • That’s great – I’ll be amongst the first to get it. Loving this plugin!!

        …one other thought… I thought that it would be great if posts could be ordered according to rating (e.g. highest rating appears on first page etc regardless of publish date). Is this possible now?

        Many thanks again

        GD Star Rating
        loading...
        • This is also planned, but it’s not that easy to do. I am not sure when this will be available at this point.

          GD Star Rating
          loading...
  6. Hello,
    I have some difficulties to install the multi star rating. Your instruction are easy to follow but I don’t understand this part:

    “Editor plugin has a black/yellow star icon. When you click on it you will get popup dialog like one on the right.”

    Where is that black/yellow star icon? I tried to paste the [ starratingmulti id="1" ] right in my post but nothing happen.

    Thank you for your help!

    GD Star Rating
    loading...
  7. Hi! ok, I found the problem. My screen is a 15 inch so the star was under the menu at the right. I simply had to make my screen bigger. Also, I noticed that the star does not show if you are in html mode.

    Thanks for that awesome script!

    GD Star Rating
    loading...
    • In html mode editor doesn’t use rich editor plugins. But I am planning to add another plugin for html editor, but I am not sure whan that will happen.

      GD Star Rating
      loading...
  8. Hi,

    if I understand it right, you are planning to make the multirating part of the “standard” system? So it can go into every post, without the need for any “manual” coding? Would be nice, as it can be used to rate several dimensions of something, e.g. a photograph… composition, colors etc. Looking forward to the next release(s) :-)

    GD Star Rating
    loading...
    • Yes, that’s the plan. But unlike standard rating, multi rating can have more than one set, so I need to create a system that will allow you to choose which set will be autoinserted.

      Also, the autoinsert mechanism will be modified to allow adding rating code not only at the bottom, but at the top of the post also.

      GD Star Rating
      loading...
  9. MillaN, you’re genius! Awesome plugin. Even it didnt 100% fit my needs (yet, hope for updates), I pay your great respect! Thank you.

    I only wish it have a post sorting options based on average ratings and number of votes (be it article review, comment rating or multi-rating). This will give plugin much more power and usage patterns. Hope you can implement it in future updates.

    And i agree with other commentators – multi-ratings should be a vital part of plugin.

    GD Star Rating
    loading...
  10. Thanks, will wait for it.
    And is there a way to just show average rating of multi-rating block? For example in posts list i want to show average ratings for all multi-ratings bind to post.

    GD Star Rating
    loading...
  11. Is anyone else having trouble creating sets? When I fill in the name and the elements and click save, i don’t see the entry being created. Has anyone else had this issue?

    GD Star Rating
    loading...
    • There are 2-3 reported cases so far. The problem is most likely incomplete update of the database. In GDSR_MULTIS table, first colum MULTI_ID should be autoincrement. Check that first. I will add database fix with next version if that was the problem.

      GD Star Rating
      loading...
  12. I figured out what the issue was, the whole gdsr_multis table wasn’t even created. Looks like the limitation was in the size of the description field, which was varchar(512), which I then changed to type blob and after that it worked!

    GD Star Rating
    loading...
  13. I’m having the same problem. I’m going to try to reinstall to see if that solves the problem.
    BTW, thank you for the this plugin. It’s incredible!

    GD Star Rating
    loading...
  14. Yep…reinstalling did the trick. You ROCk!

    GD Star Rating
    loading...
  15. Hi , great work!

    I’m also waiting for a being able to inserting multi ratings block into the comments.

    When that is done will the multi rating in the comments be able to update the overall multi page rating?

    If so, donation incoming to you :) cheers.

    GD Star Rating
    loading...
  16. Sweet.

    Just one more question as I try to address the future. Does GD replace a lot of the default wordpress comment code and make other comments plug-in or hacks hard to use?

    I ask this because I was planning on using other mods to my comments such as the the user vote plug-in and also custom fields ( plug-in or hack).
    So I wonder if I should just wait for 1.1.7 and work around it.

    cheers.

    GD Star Rating
    loading...
    • It doesn’t raplace anything. And as far as I know all the other comment plugins work fine with rating plugin. I am not sure exactly what you need to do, if you can explain better.

      GD Star Rating
      loading...
  17. Well I just trying to make the wordpress comments more feature rich for users.

    Besides your plug-in I will be using fun-with-in-text-comments found here ( http://www.wp-fun.co.uk/fun-with-in-context-comments/ ) as well as some more popular ones such as ravatar and subscribe to comments.
    I also see that the wordpress guys are dev a neat comment service at http://intensedebate.com/ though not sure if im using it.

    I was just wondering if using other comment plug-ins and hack would effect GD star rating.

    Cheers.

    GD Star Rating
    loading...
    • GD Star Rating adds rating to the comment text, and nothing should affest that. Also, I am planning to add thumbs up/donw or rate up/down feature, most likely in 1.3.0 release.

      GD Star Rating
      loading...
  18. Hi Millan,

    I have a website where I review products, I would like to set my star rating for a product and allow users to leave a comment with their individual rating for the product I have reviewed (rather than users rating other peoples comments)

    Is this possible?

    Thanks for your time and support

    Cheers

    M

    GD Star Rating
    loading...
    • This can be done already using comments review rating. It requires changes to the theme to modify the comments form (no other way to do this), and more details you can find in user guide. Also, I am working on similar feature with multi ratings, and after that I will add a tutorial (most likely end of the next week).

      GD Star Rating
      loading...
  19. Thank you very much, for the quick reply, i’m going to go through the user guide now and hack up my theme :)

    GD Star Rating
    loading...
  20. Hi, I tried to leave this question on your forums, but got an error when I tried to register.
    I’ve installed the latest version of the plugin on WP 2.7.1 and have then created a multiset and used the shortcode to insert into a post here:
    http://www.realsurf.com/2009/03/08/testing-stuff-on-sunday-arvo/
    The selection process seems to go well until I click the submit button. At that point the daisy progress indicator appears and nothing else happens. It just sits there.
    I’ve looked through the pdf, checked the topics on the forum that address the version of the plugin I’m using and have confirmed with Firebug that there are no javascript errors related to the plug in.
    So, I’ve run out of ideas… and I am very keen to try this plugin out as it looks pretty close to what I want.
    Thank you in advance and may I join the many others who have expressed admiration for your impressive plug in and very extensive support materials.
    Don

    GD Star Rating
    loading...
    • Forum should be ok, try registering now. As for your problem, response recevied when I tried to vote is error 500: internal server error, error establishing database connection. Also, I needed to refresh page 5-6 times before the page even loaded fully. Something is definitly wrong with the setup of the website, becuase takes forever to load. Database error is generated by WordPress, becasue for saving votes WordPress engine is used. Beyond that I can’t help you.

      GD Star Rating
      loading...
      • Thank you for the very prompt reply. Should I move this topic to the forum? (I will look into the error 500 issue as I didn’t see it, nor do I have to refresh pages.)
        Many thanks,
        Don

        GD Star Rating
        loading...
  21. Hi again,
    I’m sorry but I don’t know too much about error detecting with Firebug. But apparently the server was having problems when you tried to visit the page. Page loading times are around the 10-12s mark here in Australia where the server is located.

    I tried deactivating a custom plugin that I thought might be causing a problem, but it made no difference.

    I created a new sample post and inserted two different multisets. But I still get the same behaviour. The odd thing is that the GDstar post rating on the same post does work as expected.

    Thank you again in advance for any advice you may be able to offer me as to how I might track down the problem.

    GD Star Rating
    loading...
    • All ratings use the same file to send the votes, and the voting procedure is the same in every way. I have never seen behavior like this, but something is definitly slowing donw the response. Maybe your mysql server is set with short time out and the delays caused by the website or some plugin in wordpress are the real problem. I don’t know much about setting the servers, so I can’t offer you some proctical solution for this.

      GD Star Rating
      loading...
      • My server admin sent this along: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ ‘rvw’, 1)’ at line 1 for query INSERT IN
        TO wp_aw5uzk_gdsr_multis_values (id, source, item_id) VALUES (, ‘rvw’, 1) made by include, do_meta_boxes, call_user_func, GDStarRa
        ting->editbox_post_mur, GDStarRating->blog_multi_review_editor, GDSRDBMulti->add_empty_review_values,

        Does this suggest anything to you? I will ask about the mysql timeout setting.

        GD Star Rating
        loading...
        • Yes, something is wrong with the multi ratings tables. Missing id for this query suggests that tables are not created properly. This suggest problem with gdsr_multis_data table: either is missing or invalid. What mySQL you are using?

          GD Star Rating
          loading...