Git Product home page Git Product logo

updownupdown's Introduction

UpDownUpDown

Simple WordPress plugin for up/down voting on posts and comments.

Description

UpDownUpDown provides two template tags for adding up/down voting for any post or comment. Anonymous guest visitors can either be allowed to vote (tracked by ip address) or be denied voting and shown a view-only vote count badge. Votes are registered on the server without refreshing the page.

This plugin was initially developed as a project of Wharton Research Data Services.

Installation

  1. Upload the folder containing the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Place the following function calls in your templates, somewhere inside the post or comment loop:
  4. <?php if(function_exists('up_down_post_votes')) { up_down_post_votes( get_the_ID() ); } ?>
  5. <?php if(function_exists('up_down_comment_votes')) { up_down_comment_votes( get_comment_ID() ); } ?>
  6. Display vote badge display only with no voting by setting the second parameter to false:
  7. <?php if(function_exists('up_down_post_votes')) { up_down_post_votes( get_the_ID(), false ); } ?>
  8. <?php if(function_exists('up_down_comment_votes')) { up_down_comment_votes( get_comment_ID(), false ); } ?>
  9. Visit the plugin settings page to customize it.

Screenshots

  1. This shows a badge in a post with no votes yet.
  2. This shows a badge in a post with a vote set.
  3. This shows a view-only badge if voting is disabled via theme function flag or guest voting is disabled in the admin settings.
  4. This shows a badge using the alternate simple style.
  5. Admin settings page for the plugin.

Changelog

1.1

  • Release includes major contributions by Martin Scharm
  • Added admin page
  • Added option to allow guest-votes
  • Added option to select from multiple styles, added simple styling
  • Choose between up/down counts or a total count
  • Fixed some XHTML errors

1.0.1

  • Replaced JavaScript JSON.parse reference with jQuery.parseJSON to accommodate browsers without native JSON support. In IE7 votes were registering on the server but not updating in the browser without a refresh. Now it's fixed in IE7.

1.0

  • Initial release.

updownupdown's People

Contributors

davekonopka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.