b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Releases
  • Skins
  • Plugins
  • Locales
 
  • « ShareThisWidget Plugin
  • Textile Plugin »

Star Rating Plugin

Categories: 1.8+, Skin feature, Downloadable Plugin, No longer needed
This plugin or hack is no longer needed as the functionality it provides has been integrated directly into the b2evolution core or into another (bundled) plugin.

This plugin is no longer necessary for most users because similar functionality has been integrated into b2evolution's core. For more information, please see: Voting Options

This plugin allows your visitors to rate your posts using star ratings. By default they can rate the posts out of five stars, but it's easy to change that value in the backoffice plugin settings. Users with JavaScript enabled can vote without reloading the page using an AJAX call. The plugin works when JavaScript is disabled by the reader, too. By default, each vote is checked against a list of IP addresses to make sure that it's not a duplicate, but this can be disabled in the backoffice.

AuthorDanny Ferguson
Last tested in version
Official page: http://b2evolution.net/man/starrating-plugin
Star Rating Plugin
This screencap shows the Star Rating Plugin with a pop up notice.

Installation

  1. Download the plugin, and unzip it.
  2. Copy the starrating_plugin folder into the "plugins" folder of your b2evolution installation.
  3. Login to the administrative interface for your blog.
  4. Install the Star Rating plugin from the Global settings->Plugins install->Install new->Available plugins table using the [Install] link.
  5. You should add the following code to the index.main.php file for any skin where you want the star ratings to be used.

Put this one in the post loop inside the bSmallPrint div or just below the post title:

<!-- codeblock lang=php line=1 --><pre class="codeblock"><code><?php $Plugins->call_by_code( 'starrating', array('id' => $Item->ID ) ); ?> </code></pre><!-- /codeblock -->

(Optional) If you want to show the top rated posts add the Star rating widget from Blog settings > Widgets. By default, it shows links to the top five posts, but you can change the 'limit' param to get different results. You can also edit the minvote setting so that a certain number of votes are required before an item can make it into the top rated list.

Usage

Once you have the plugin installed and the settings the way you want them, then go the write tab and create a post. If you want the post to have the rating system, then make sure that there's a check in the box next to 'Star Rating' in the 'Text renderers' section in the lower right.

Now the stars should appear next to your post. To vote, click on the star you're voting for. If JavaScript is enabled, it will say 'Loading . . .', then display the new rating and thank you for your vote. If JavaScript is disabled, then the page will reload and the new rating will be shown.

Settings

Out of

Choose the number of stars possible. The default is five. It's best to only change this value right after installing the plugin. If there are already votes cast using another max value, then your results will be skewed if you change this value. Uninstall the plugin, then reinstall it to clear any old votes, then change the value.

Check IP

By default, each vote is checked against a list of IP addresses to make sure it's not a duplicate. You can disable the check using this setting.

Pop-up info

This option, which is enabled by default, displays details about a rating and notices (after you vote) in a JavaScript popup that fades in and then back out after 4 seconds. If you use this feature, be sure to place the additional skin tag (notice) just after your opening body tag (see above). This option requires a little more work to set up and requires that the user have JavaScript enabled, but it is more attractive and does not disrupt your site layout when someone votes.

Inline info

If you check this box, details about a rating and notices (after a vote) are placed just below the stars. This does not require the notice skin tag or JavaScript, but it may disrupt your site layout when someone votes. It is possible to use both of the info options at the same time, but it could be considered a bit redundant.

Apply rendering

This plugin doesn't really use a renderer, but it uses the renderer checkbox setting to know which posts should have the star rating available. Edit this plugin setting to set whether the checkbox is checked by default. For example, if you only want a few of your posts to have the rating system, then set 'Apply rendering' to 'opt-in'. Then, posts won't have the stars unless you check the box when you're writing a post. If you want all or almost all of the posts to have the rating system, then set the 'Apply rendering' in the plugin settings to 'opt-out'. Then, all posts will have the stars unless you uncheck the box in the write tab.

Customization

Change star image

It's not hard to change the star image. First, download the default image and look at it. It's three stars stacked on top of each other. The top star is the empty version, the middle star is the hover version, and the bottom star is the normal one that shows the average rating. Create your new image to match this template, then upload it to the /starrating_plugin/ folder. Then, edit the stars.css file to match your new file name. If your image has a width that's different than 20px, then you'll need to edit the two lines toward the top of stars.css that set the width. Then edit _starrating.plugin.php and find "var $width = 20;" and edit the value

Known issues

This plugin uses the prototype + scriptaculous library, but b2evolution is supposed to use jquery. This could cause an incompatibility. The next major version of this plugin will be built with jquery.

Tags: download file available

32 comments

Comment from: Arturo Visitor

Arturo

Hi,

Great plugin, I was looking it for a long time.

By the way after install, the vote system works fine but not the AJAX effects, like info or vote confirmation. Any tip

You can check it on http://www.lacuchara.es

Thanks in advance.

2006-10-06 @ 02:33

Comment from: Arturo Visitor

Arturo

Forget my last comment, it was my fault, so just to say GREAT PLUGIN!

Thanks

2006-10-06 @ 03:04

Comment from: arturo Visitor

arturo

Hi again,

On IE before cast a vote the info icon appears broken and after vote it looks good.

2006-10-07 @ 13:25

Comment from: Nelson Guirado Visitor

Nelson Guirado

Great work. Perfect!

www.nelsonguirado.com

2006-10-22 @ 21:19

Comment from: Charles Visitor

Charles

Hi,

Great plugin !

I still have problems with IE but
I had to miss something.

Keep suporting,
Thanks

2006-12-06 @ 02:44

Comment from: Darryl Visitor

Darryl

It would be a better plugin if it worked on blog 1 (bloag all), what do you think?

2007-01-10 @ 22:31

Comment from: paul Visitor

paul

the plugin seems to work great except the “top posts” sidebar dosent seem to work.

Can someone suggest how to fix this please?

Thanks!

2007-03-14 @ 23:14

Comment from: E. I. Sanchez Visitor

E. I. Sanchez

I’d like to make the stars smaller and to center them. Is this possible?

EI

2007-07-20 @ 08:10

Comment from: balupton Visitor

balupton

Would be great if this plugin would change a user who has already rated’s rating, instead of just showing a “you have already rated” dialogue.

2007-08-10 @ 02:57

Comment from: Jürgen Visitor

Jürgen

So etwas hab ich tagelang gesucht. Das Blog und die Plugins sind einfach ein traum. Danke Jungs für die tolle arbeit.
Man muss zum Glück das Rad nicht immer neu erfinden.

2007-08-13 @ 13:38

Comment from: elisa Visitor

elisa

I use this for check the important impression of my article, very nice.

2007-08-13 @ 20:02

Comment from: Timb Visitor

Timb

Great plug-in, I’m already using it. Thanks.

I have one question. Right now, the titles of the top rated posts are “stacking” on top of each other.

Is there a code or setting that will truncate the titles or space the top-rated posts based on title length?

Thanks again.

2007-08-22 @ 05:02

Comment from: Nicole Pereira Visitor

Nicole Pereira

I don’t think this works with 2.0 :(

2007-09-10 @ 12:50

Comment from: Guitar Guy Visitor

Guitar Guy

This is hot! Thank you for the great plugin. Any way to move the popup to the left, it comes over the sidebar. Thanks Again.

2007-09-15 @ 02:55

Comment from: zerv Visitor

zerv

i got it to work on 2.0 alpha 1, just got to modify the items.main.php at the post section and the widget works fine.

Didnt get it to work on the sidebar yet…

2007-09-19 @ 02:45

Comment from: Nicole Pereira Visitor

Nicole Pereira

yeah the sidebar totals is what I want. I got it to show in the posts though

2007-09-19 @ 12:36

Comment from: emin ozlem Visitor

emin ozlem

i DO need this plugin… when will an update be available for 2.1 las vegas latest ?? anyone can adopt it to 2.1 ??

2007-11-17 @ 07:49

Comment from: Vin Visitor

Vin

After voting, shouldn’t the image change to reflect the rating average? It always shows no stars.

2007-12-22 @ 19:58

Comment from: Bart Visitor

Bart

I tried to get this going in the 2.3 version, but no luck at all.

2008-01-31 @ 02:48

Comment from: compakia Visitor

compakia

I dont know where _main.php located? plase help me to install this plugin.

2008-02-19 @ 11:31

Comment from: emin ozlem Visitor

emin ozlem

guys, all those ’stackings’ ‘no image’ etc etc, issues are because of ‘your skin’s ‘li’ properties, and the plugin works even with the latest version (2.4.2) cheers

2008-05-17 @ 12:46

Comment from: thomas Visitor

thomas

I had no luck following the instructions where it says “Put this one in the post loop inside the bSmallPrint div or just below the post title:”

Using evoCamp, there is no bSmallPrint. I put it in on line 70, but it doesn’t work, can anyboldy help me?

2008-08-10 @ 21:39

Comment from: lorenza Visitor

lorenza

I want use this in my corporate blog next week.

2009-02-18 @ 19:33

Comment from: BisouNourS Visitor

BisouNourS

this is a very cool one
thanks!

2010-02-23 @ 23:13

Comment from: Alex Visitor

Alex

I noticed a lot of votes coming from bots crawling our site. It may be worth adding rel="nofollow” to the anchors rendered for each star link.

Great plugin!

2010-04-23 @ 19:27

Comment from: Alex Visitor

Alex

d’oh looks like I didn’t fully understand nofollow, disregard previous comment. When I dug in I did see your comment as well, going to see what it takes to implement that.

2010-04-23 @ 20:18

Comment from: Sergio Visitor

Sergio

With evopress you shoud edit posts.main.php and add the line there (it was hard at the beginning).

2010-04-29 @ 15:16

Comment from: Mirko Visitor

Mirko

Very Nice Plugin, i love IT!!!

2011-10-04 @ 12:23

Comment from: Marco Visitor

Marco

One of my favourite plugin.
Great !

2011-10-21 @ 17:17

Comment from: Luigi Visitor

Luigi

Very Nice Plugin, i love IT!!!

2011-12-08 @ 13:10

Comment from: Carlo Visitor

Carlo

Thank You, i like the plug in,
but we must hope that those who vote our blog will give us full stars, otherwise it would be counterproductive but it can be an incentive to write good post :)

2011-12-28 @ 04:14

Comment from: Karin Zick Visitor

Karin Zick

Hi Danny,

in a further blog I have used your starrating-plugin. Now I wanted to download it again, clicked on the name of your plugin and came to a website with explanations about installing and other helpful instructions. The download-link there brought me to www.sourceforge, but the title of the zip-file there was “capture 1.8.."??? Is this really the correct file? Sorry for my bad Englisch (am a German girl, Bavaria)…

Many thanks for your answer and help!

Yours, Karin

2011-12-29 @ 01:40


Form is loading...

Plugin Repository

Plugins are little PHP scripts that allow you to add features that are not (yet) built into the b2evolution core.

How to...

  • Introduction to Plugins
  • How to install a plugin (after downloading it)
  • How to make a new plugin
 Upload a plugin!
Submit your own plugin

User log in

Lost your password?
Register »

Search by keyword

Filtering options

Retain only results that match:

XML Feeds

  • RSS 2.0: Posts, Comments
  • Atom: Posts, Comments
What is RSS?

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque