Adds a shortcode tag [xrr rating=4/5] that displays a rating in one of several formats. Intended for
sites doing reviews.
|Author:||Jonathan 'Xavin' Spence (profile at wordpress.org)|
|WordPress version required:||2.5.1|
|WordPress version tested:||3.0.5|
|Added to WordPress repository:||30-09-2008|
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|Total downloads:||25 010|
Click to start download
This plugin adds a shortcode tag that will display a rating in one of several formats. Here is a feature breakdown:
- Input ratings as a fraction (4/5) or a percentage (80%).
- Use any amount of stars from 2 to 100.
- Set the minimal star fraction allowed, whole, half or quarter.
- Split multiple ratings in one post/page into groups, and have a separate overall rating calculated for each.
- Display the rating as image stars, text stars, a percentage, a fraction, or any combination.
- Multiple star image sets included, others can be easily added.
- Fully templatized output, use whatever tags you want.
- Optionally group ratings in a table or other structure.
- Settings page for global settings and tag defaults.
The only required parameter is rating, the rest are optional. Here is a basic example. [xrr rating=4/5]
This will convert the 60% into a fraction and display it as text stars: [xrr rating=60% display_as=textstars]
This will display 10 stars from the tiny_star image set and label the rating 'Movie Rating:': [xrr rating=7.25/10 imageset=tiny_star label="Movie Rating:"]
Check the Tag Options section for complete options.
The global settings on the settings page are documented there.
How do I add custom image sets?
Upload a directory containing the five star images in png, jpg, or gif format into your wp-content/uploads/xavins-review-ratings
directory. If you put the correct files in the right place, the plugin will detect it and show them on the settings screen. You
can look in the plugin directory to find the correct file names. The imageset directory name can be whatever you want, as long as
it doesn’t conflict with another imageset. You also only need the star images you plan on using, if you are only going to be
showing whole or blank stars, you only need those two images.
Sometimes the shortcodes don’t get processed, what’s going on?
In WordPress 2.8-3.0 there is a bug where shortcodes sometimes don’t get processed
if they are directly next to each other. Until this gets fixed the solution is to make sure there is a space between shortcodes if
you get rendering problems. It only happened to me a few times out of my many examples, so you shouldn’t worry about unless you
have an issue.
- Added the ability to set attributes in the
[xrrgroup]tag that will be used in the contained tags.
- Fixed a harmless error message that could sometimes appear on the settings page.
- Added the ability to always show the decimal place on a fraction.
This is mainly an update to the admin side, although I added a few more imagesets.
- Plugin now searches for locations of imagesets in the plugin directory and in the uploads/xavins-review-ratings directory.
- Image extension is also auto-detected now.
- Removed the Image Path setting since it is now redunant.
- Removed the Image Extension setting since it is now redundant.
- Templatized the
<img>tag, all html is now templatized
- Added documentation of the settings page for the templates.
- Added reset to defaults button.
- Detected imagesets now appear on the settings page.
- Added three new imagesets.
- First Public Release