{"id":3788,"date":"2008-09-30T19:28:22","date_gmt":"2008-09-30T19:28:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/xavins-review-ratings\/"},"modified":"2010-04-11T06:09:07","modified_gmt":"2010-04-11T06:09:07","slug":"xavins-review-ratings","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/xavins-review-ratings\/","author":861864,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.4.0","stable_tag":"1.4","tested":"3.0.5","requires":"2.5.1","requires_php":"","requires_plugins":"","header_name":"Xavin's Review Ratings","header_author":"Jonathan 'Xavin' Spence","header_description":"","assets_banners_color":"","last_updated":"2010-04-11 06:09:07","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/jonathanspence.com\/software\/wordpress-plugins\/xavins-review-ratings\/","header_plugin_uri":"http:\/\/jonathanspence.com\/software\/wordpress-plugins\/xavins-review-ratings\/","header_author_uri":"http:\/\/jonathanspence.com\/","rating":1,"author_block_rating":0,"active_installs":100,"downloads":27453,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2","1.3","1.3.1","1.4"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566847","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566847","resolution":"1","location":"plugin"}},"screenshots":{"1":"Some example ratings.","2":"The Image Sets that come with the plugin."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1975,170,243,86,80],"plugin_category":[43,46,53],"plugin_contributors":[82542],"plugin_business_model":[],"class_list":["post-3788","plugin","type-plugin","status-closed","hentry","plugin_tags-formatting","plugin_tags-page","plugin_tags-pages","plugin_tags-post","plugin_tags-shortcode","plugin_category-customization","plugin_category-editor-and-writing","plugin_category-ratings-and-reviews","plugin_contributors-xavinnydek","plugin_committers-xavinnydek"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/xavins-review-ratings.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/xavins-review-ratings\/trunk\/screenshot-1.png?rev=1566847","caption":"Some example ratings."},{"src":"https:\/\/ps.w.org\/xavins-review-ratings\/trunk\/screenshot-2.png?rev=1566847","caption":"The Image Sets that come with the plugin."}],"raw_content":"<!--section=description-->\n<p>This plugin adds a shortcode tag that will display a rating in one of several formats. Here is a \nfeature breakdown:<\/p>\n\n<ul>\n<li>Input ratings as a fraction (4\/5) or a percentage (80%).<\/li>\n<li>Use any amount of stars from 2 to 100.<\/li>\n<li>Set the minimal star fraction allowed, whole, half or quarter.<\/li>\n<li>Split multiple ratings in one post\/page into groups, and have a separate overall rating\ncalculated for each.<\/li>\n<li>Display the rating as image stars, text stars, a percentage, a fraction, or any combination.<\/li>\n<li>Multiple star image sets included, others can be easily added.<\/li>\n<li>Fully templatized output, use whatever tags you want.<\/li>\n<li>Optionally group ratings in a table or other structure.<\/li>\n<li>Settings page for global settings and tag defaults.<\/li>\n<\/ul>\n\n<p>The only required parameter is rating, the rest are optional. Here is a basic example.\n    [xrr rating=4\/5]<\/p>\n\n<p>This will convert the 60% into a fraction and display it as text stars:\n    [xrr rating=60% display_as=textstars]<\/p>\n\n<p>This will display 10 stars from the tiny_star image set and label the rating 'Movie Rating:':\n    [xrr rating=7.25\/10 imageset=tiny_star label=\"Movie Rating:\"]<\/p>\n\n<p>Check the Tag Options section for complete options.<\/p>\n\n<p>The global settings on the settings page are documented there.<\/p>\n\n<h3>Tag Options<\/h3>\n\n<p>Each of these can have their defaults changed on the settings page, or be changed in each tag. You can mix and match \ndisplay styles and options in the same post\/page.<\/p>\n\n<p><strong>rating<\/strong><\/p>\n\n<p>The <code>rating<\/code> attribute is required in every xrr tag unless there is an <code>overall<\/code> attribute. Both fractions and percentages are valid inputs.\nAny fraction is acceptable, the rating is converted to an intermediate format and then to the specified output format. Unless explicitly\noverridden with the <code>max_stars<\/code> attribute, the plugin assumes you want to use the denominator of the fraction as the number of \nstars, so 4\/5 would display 5 stars, and 3\/10 would display ten stars.<\/p>\n\n<p><strong>max_stars<\/strong><\/p>\n\n<p>The <code>max_stars<\/code> attribute sets the maximum number of stars the rating will be displayed with. You can set it implicitly by using <code>rating<\/code>\nwith a fraction, or explicitly with the <code>max_stars<\/code> attribute.<\/p>\n\n<p>For exaple, the following tag will display as seven stars even though the fraction used is out of 5:\n    [xrr rating=4\/5 max_stars=7]<\/p>\n\n<p><strong>display_as<\/strong><\/p>\n\n<p>The <code>display_as<\/code> attribute determines for the rating will be displayed. The four basic outputs are 'stars', 'percentage',\n'fraction', and 'textstars', and they are pretty self explanatory. The basic outputs can also be combined with an underscore\nto display two or more at once, for example this tag will display the fraction and then the image stars:\n    [xrr rating= 4.5\/5 display_as=fraction_stars]<\/p>\n\n<p><strong>label<\/strong><\/p>\n\n<p>The <code>label<\/code> attribute sets the label in front of the rating display. Make sure to surround the value with quotes if it contains a space.<\/p>\n\n<p><strong>group<\/strong><\/p>\n\n<p>The <code>group<\/code> attribute sets what named group the rating is in. By default all ratings are in an xrr group. The only use for the group\ncurrently is for <code>overall<\/code> calculations. Note: This is entirely independent of the <code>[xrrgroup]<\/code> tag.<\/p>\n\n<p><strong>overall<\/strong><\/p>\n\n<p>The <code>overall<\/code> attribute has one valid value, 'true'. If set it will ignore any <code>rating<\/code> attribute in the tag and instead calculate \nthe average of all the ratings on the post\/page that have the same <code>group<\/code>.<\/p>\n\n<p><strong>imageset<\/strong><\/p>\n\n<p>The <code>imageset<\/code> attribute determines what set of star images to use. The imagesets are auto-detected, either in the plugin directory\nfor the imagesets that come with the plugin, or in the wp-content\/uploads\/xavins-review-ratings\/ directory for imagesets you add.\nAll usable imagesets are detected and displayed on the settings page.<\/p>\n\n<p><strong>fraction_separator<\/strong><\/p>\n\n<p>The <code>fraction_separator<\/code> attribute determines the separator between the numerator and denominator when displaying ratings as a \nfraction. By default it is '\/', although another common option would be ' of '.<\/p>\n\n<p><strong>max_fraction<\/strong><\/p>\n\n<p>The <code>max_fraction<\/code> attribute sets how far stars can be broken up, there are three valid values, none=1 half=2 quarter=4. If you set it\nto 1, all ratings will be calculated out of whole stars, and if you set it to 4 they will be calculated to quarter stars, etc.<\/p>\n\n<h3>The [xrrgroup] Tag<\/h3>\n\n<p>The <code>[xrrgroup][\/xrrgroup]<\/code> tag is used to activate group rendering in the <code>[xrr]<\/code> tags it surrounds. Any attributes\nset in the <code>[xrrgroup]<\/code> will be used in the contained tags unless they have attributes of their own.\nBy default it renders all the contained <code>[xrr]<\/code> tags in a table, but this can be changed by modifying the templates on\nthe settings screen. Here is an example:<\/p>\n\n<pre><code>[xrrgroup][xrr rating=4\/5 label=\"DVD:\"][xrr rating=3\/5 label=\"Movie:\"][\/xrrgroup]\n<\/code><\/pre>\n\n<p>There are some things to keep in mind. Don't put line breaks inside the <code>[xrrgroup]<\/code> tags, since Wordpress doesn't properly recognize\nbeing inside a shortcode tag, and will insert <code>&lt;p&gt;<\/code> tags that will make your HTML invalid. Also, the <code>[xrrgroup]<\/code> tag is entirely independent\nof the <code>group<\/code> attribute in the <code>[xrr]<\/code> tag.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>xavins-review-ratings<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Place <code>[xrr rating=4\/5]<\/code> in your pages. Check the \n<a href=\"http:\/\/www.jonathanspence.com\/software\/wordpress-plugins\/xavins-review-ratings\/\">plugin homepage<\/a> \nfor complete documentation and inline examples.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I add custom image sets?<\/dt>\n<dd><p>Upload a directory containing the five star images in png, jpg, or gif format into your wp-content\/uploads\/xavins-review-ratings\ndirectory. If you put the correct files in the right place, the plugin will detect it and show them on the settings screen. You\ncan look in the plugin directory to find the correct file names. The imageset directory name can be whatever you want, as long as\nit doesn't conflict with another imageset. You also only need the star images you plan on using, if you are only going to be \nshowing whole or blank stars, you only need those two images.<\/p><\/dd>\n<dt>Sometimes the shortcodes don't get processed, what's going on?<\/dt>\n<dd><p>In Wordpress 2.8-3.0 there is a <a href=\"https:\/\/core.trac.wordpress.org\/ticket\/10082\">bug<\/a> where shortcodes sometimes don't get processed\nif they are directly next to each other. Until this gets fixed the solution is to make sure there is a space between shortcodes if\nyou get rendering problems. It only happened to me a few times out of my many examples, so you shouldn't worry about unless you\nhave an issue.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4<\/h4>\n\n<ul>\n<li>Added the ability to set attributes in the <code>[xrrgroup]<\/code> tag that will be used in the contained tags.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fixed a harmless error message that could sometimes appear on the settings page.<\/li>\n<li>Added the ability to always show the decimal place on a fraction.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<p>This is mainly an update to the admin side, although I added a few more imagesets.<\/p>\n\n<ul>\n<li>Plugin now searches for locations of imagesets in the plugin directory and in the uploads\/xavins-review-ratings directory.<\/li>\n<li>Image extension is also auto-detected now.<\/li>\n<li>Removed the Image Path setting since it is now redunant.<\/li>\n<li>Removed the Image Extension setting since it is now redundant.<\/li>\n<li>Templatized the <code>&lt;img&gt;<\/code> tag, all html is now templatized<\/li>\n<li>Added documentation of the settings page for the templates.<\/li>\n<li>Added reset to defaults button.<\/li>\n<li>Detected imagesets now appear on the settings page.<\/li>\n<li>Added three new imagesets.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>First Public Release<\/li>\n<\/ul>","raw_excerpt":"Adds a shortcode tag [xrr rating=4\/5] that displays a rating in one of several formats. Intended for sites doing reviews.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=3788"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/xavinnydek"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3788"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3788"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3788"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3788"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3788"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}