Sterne (WP Plugin)

Here you can find the Sterne plugin for download. I tried it successfully on WordPress 1.5 and 2.0 RC3.

Version 1.1

[Update V1.1]: Improved coloring. Now colors should appear brighter and not too grey.
Bugs: Grey stars cannot currently be created.

New version:
Now it is possible to have an arbitrary number of rating stars in any color. (For an example, see this post).


  • gd with png support (should be available with most web hosters) and
  • Sterne subdirectory in the plugins directory must be writable (created colored stars are cached in this directory).


  • same as Version 0.1
  • Stern(points,totalpoints,red,green,blue). points must be less than totalpoints, which should be an even number. red, green andblue denotes the color which is used to 'tint' an grey source picture. For simplicity I use full color saturation so you might need to experiment a little.
    Stern(5,8,50,250,250) will look like this: SterneSterneSterneSterne

Note: the source images can be exchanged! So if you're not satisfied with the stars, e.g. you want to make them bigger feel free and replace those files. Source images must be transparent, indexed gifs. Colorless is preferable (but not required) to get consistent results. Color change does not work with grey colors.

If you want stars somewhere else than just in the postings, you will have to add additional hooks at the end of the script. For example, to have stars in the title of your postings, add the following pair of lines to the end of the file:

add_filter('the_title', 'CheckForStar');
add_filter('the_title', 'CheckForStarXL');

Download V1.1

Version 0.1

Installation: extract files to the plugin directory. If the stars don't show up, the problem is usually the image path. You can adjust the local variable $Sterne_imagepath = "wp-content/plugins/Sterne/"; within the function Star() to match your local settings. On WordPress 1.5 I had to use an absolute path.
Usage: S t e r n(4,g) (without the blanks between the letters) within the text of your post to give you two filled gold stars and three empty stars: SterneSterneSterneSterneSterne . Points are from 0-10. 0 = 5 empty stars, 10 = 5 filled stars. Colors available: s = silver/grey, r = red, g = gold, b = blue. Feel free to add more colors! Take a look at the script to see how to do it: You need to create three new image files (easy way is to simply adjust the HUE value within an image editor) and assign each an ending letter, then add appropriate code in the Star() function to map the letter to the files. Load the images to the "Sterne" subdirectory and you're all set.
Note: If the stars don't show up on the archive pages, use an absolute path.

Download V0.1

12 thoughts on “Sterne (WP Plugin)

  1. Pingback: Blogging Pro China » WordPress Plugin: Sterne

  2. Pingback: Sterne (WP Plugin) at WordPress Station

  3. Pingback: :: New plugins :: December :: 2005

  4. Pingback: Press At Moyii » Blog Archive » WordPress Plugin: Sterne

  5. Pingback: » Site description

  6. Mit welchem Code bekomme ich denn bei der neuen Version die Sterne so schön golden wie mit g bei der alten? Ich bekomme es irgendwie nicht hin. :( Sie sehen immer gräulich aus.

  7. Pingback: Testing Readers: Survey, Polling, Rating, Testing, and Reviewing WordPress Plugins « Lorelle on WordPress

  8. Pingback: Interessant und nicht ganz so interessant.. « Puls200

  9. Pingback: Welcome to LKL v6 | London Korean Links

  10. Pingback: LKL's rating system for reviews | London Korean Links

  11. Pingback: My Best of WordPress Plugins – datenschrottplatz

Leave a Reply