Hey, do you remember that Votio voting thing I was going to write? Yeah...

It lets you add little voting boxes to every post in a list of categories you specify.

This is probably my worst plugin so far for having to tweak actual code. Call me lazy. You'll need to add a custom template tag (<?php votio_ballot_box();?>) inside The Loop wherever you want your box to appear. Depending on your theme, this could be on more than one page. You'll also need to modify your CSS if you want your voting box to look anywhere near as snazzy as the one here.

The worst part is that you're going to need to edit the plugin file to set the categories that you want the voting boxes to appear on. Just look for the $vote_cats variable near the top fo the file, and set that to a comma-separated list of categories (no extra space!) that you want to add voting boxes to.

I can't say that the code is foolproof, but it seems to be working ok so far. Feel free to report problems here.

I'm going to try using it for Free For All Friday tomorrow, so if you check out old posts in "FFAF", you should be able to rate them.

Check the wp-hacks page for downloads.

Comments

Comment by Jens on .
Jens
hi owen, sorry that i post here although my question doesn't really have to do with this plugin & post. i already use some of your work on my blog and just found a great feature here that i would like to include on my site as well: how do you manage to get the statistics on a single page like you have here?! Posted: Thursday, March 24th, 2005 Categories: WordPress Comment Feeds: RSS 2.0 Comments: Open Pings: Open Related: Limit Categories EzStatic Upgrade FFAF Logistics and WordPress MicroWiki 1.3 Update Redirectify Plugin Previous: CLR Power Plumber would be great if you can help me! thanx a lot, jens
Comment by jcraveiro on .
jcraveiro
"It would be nice to have some kind of admin interface to see the top rated posts, their scores, etc." --> well, I guess it would be somewhat easy to create a <?php votio_highest_posts($number_of_posts) ?> tag that would return the number_of_posts most highly rated posts. Basically: - SELECT from the meta data table, ORDER BY value DESC, LIMIT number_of_posts - for each record returned by the query, retrieve the respective post's title and permalink, and build the adequate <li> - wrap in <ul> and return. ;)
Comment by Owen on .
Owen
That's the plan for the next point release. It will also allow you to select a date range like "last 30 days", which will be good for the FFAF ratings. I don't see why it wouldn't work on pages too, as long as you put the prerequisite tag in your page template file, inside The Loop just like in the posts file.
Comment by sekhu on .
sekhu
Hi, I've just been pointed in this direction for this plugin - what I'd like to do is customise the plugin so it displays different images depending on the category - I have different templates and css for each one so that shouldn't be a problem. Mainly I want to use the ratings system for both author and user so that there is an authors rating and, additionally, an average of the user rating for a specific post which is displayed in brackets like so: My rating: 4 out 5 (Average User rating 2/5) Is this possible? Am I looking for something beyond the current plugin?
Comment by Owen on .
Owen
sekhu: Yeah, this is a little beyond Votio, but Votio could provide you a decent base to start with a plugin of your own that does what you want. kektex: You should put all of the files into a "votio" directory in the plugins directory, just like they are arranged in the zip file. self: Where are all these crazy handles coming from?
Comment by Owen on .
Owen
You need to set the WordPres category(ies) that Votio will add votes to. In the votio.php file near the top, locate the line that says $vote_cats = ''; and inside the quotes, put the names of categories (matching exactly) that you want the Votio box to appear on. There are some other settings in the file that might interest you, including the number of days that visitors are allowed to vote on a post, and the image tags that produce the star images.
Comment by madeup on .
madeup
OK, nobody seems to give any instructions of setting things up for the beginners. Here is the list: (I'm not a beginner nor a pro) 1. Download "Votio" here. Unzip the file. 2. Open the votio.php file with Notepad (or such) and modify the appropriate line of code like this: $vote_cats = 'A category,Another category,and so on'; Category names are the ones you want votio boxes to appear on. 3. Upload the votio folder to your plugins folder. Votio folder should include the images and the votio.php file. 4. Go to your Wordpress admin area and find votio on your plugins list. Activate it, simply by clicking a link. 5. Enter the following code (after appropriately modifying it) into every php file on your theme, where there is a tag, inside the head tags. (category.php, comments-popup.php, date.php, index.php, search.php, single.php): 6. Write the following code where you want the votio box to appear (Preferably, only in the post.php file): 7. Upload all modified theme files to your "themes/themename" folder. Great tool. Thanks. I wonder what is needed for using it on a web page other than the ones in the Wordpress folder. Permissions etc? Any tips? I'll be waiting for the votio admin interface. I hope we can see past votes on the interface also.