=== Vote It Up ===
Contributors: multippt
Tags: post, voting, popularity, feedback, ajax
Requires at least: 1.5
Tested up to: 2.3
Stable tag: 1.0.2
Donate link: http://www.tevine.com/donate.php
The Vote It Up enables visitors to vote for and against posts. Votes can be displayed as a bar which fills up with more positive votes, or as a ticker.
== Description ==
This plugin adds voting functionality for posts. This function is similar to Reddit or Digg, in that visitors can vote for and against.
Votes for the post will fill up the bar (in blue), while votes against the post will empty the bar.
By default, it takes 40 votes to fill the bar completely.
Guests can also vote for posts. This functionality can be disabled as well.
Members voting for posts will have their posts recorded, and the list of votes can be retrieved using the `GetUserVotes()` function.
== Installation ==
By installing the plugin, you agree to [Tevine's policies](http://www.tevine.com/policies.php "Tevine's Policies").
1. Upload the "voteitup" folder into the "/wp-content/plugins/" directory. The folder should consist of several files:
* readme.txt
* voteinterface.php
* voteitup.php
* voteoptions.php
* voterajax.php
* votingfunctions.php
2. Login to your Wordpress Administration Panel
3. Go to the plugins tab, and activate the "Vote It Up" plug-in.
The plug-in will install some things to the database on its first run.
If there are no error messages, the plugin is properly installed.
4. You can choose which of the following ways you want to represent the votes as. You will need to insert the relevant code into [the WordPress loop](http://codex.wordpress.org/The_Loop "The Loop").
Bar: ``
Ticker: ``
5. You can customize these options by editing options in the Wordpress Administration area (`Options > Vote It Up`).
Feel free to poke around the internals of the plug-in.
== Requirements ==
1. A working Wordpress install
2. Your WordPress theme must contain a call to the `get_header()` function
3. Your WordPress theme must contain the Wordpress loop
Most Wordpress installs have these, so you need not worry about these.
In addition, to be able to vote, one must have JavaScript enabled in the browser.
== Frequently Asked Questions ==
= What's the difference between the ticker style and the bar version? =
Aside from appearence, they differ in that visitors can only vote for posts when using the ticker style (so there are only positive votes), whereelse the bar version allows visitors to vote for and against.
= This plugin doesn't seem installed properly =
If the plugin cannot write to the database, you can try manually executing the below SQL queries (you can use phpMyAdmin to do this):
CREATE TABLE `wp_votes` (
`ID` int(11) NOT NULL auto_increment,
`post` int(11) NOT NULL,
`votes` text NOT NULL,
`guests` text NOT NULL,
`usersinks` text NOT NULL,
`guestsinks` text NOT NULL,
PRIMARY KEY (`ID`)
);
CREATE TABLE `wp_votes_users` (
`ID` int(11) NOT NULL auto_increment,
`user` int(11) NOT NULL,
`votes` text NOT NULL,
`sinks` text NOT NULL,
PRIMARY KEY (`ID`)
);
CREATE TABLE `wp_votes_comments` (
`ID` int(11) NOT NULL auto_increment,
`comments` int(11) NOT NULL,
`votes` text NOT NULL,
`guests` text NOT NULL,
`usersinks` text NOT NULL,
`guestsinks` text NOT NULL,
PRIMARY KEY (ID)
);
For other problems, you may want to ensure that there are no missing files, and that you have followed instructions in this Read Me file
= I want a totally customizeable version =
If you want to customize the bar completely, you can treat the bar as two different parts.
The vote count:
The vote link:
Vote
From there, you can customize it. These two parts need to be placed in the Wordpress loop.
= Is there any limit to the number of votes? =
There is no limit as to how many votes for each post can take. The vote count can also go into the negatives as well.
== Screenshots ==
Here are some screenshots of the plug-in at work:
1. [Image of some possible voting forms](http://www.tevine.com/projects/voteitup/voteituppreview.png "Preview 1")
2. [A screenshot of the plug-in in action](http://www.tevine.com/projects/voteitup/voteituppreview1.png "Screenshot")
== Customizing ==
Within `votingfunctions.php`, there are several functions that can shows other information.
**`GetVotes($post_ID)`**
Returns the number of votes associated with the post.
**`UserVoted($post_ID, $user_ID)`**
Returns TRUE if the user already voted for the post, FALSE if the user hasn't voted for the post
**`GetPostVotes($post_ID)`**
Returns an array of user IDs that have voted *for* the post.
**`GetPostSinks($post_ID)`**
Returns an array of user IDs that have voted *against* the post.
== Changelog ==
* 1.0.2 - Fixed Guest Voting
* 1.0.0 - Initial