Voting Record

Voting Record will allow recording of votes cast for display and reference purposes. Elected officials can record and display their votes and citizens can track and display the votes of an elected official they follow.

Latest Version: 2.0 (March 16, 2009)

Display templates are introduced here giving you total flexibility in deciding what to display. There is one set of template settings for recent votes and another for search results. Each template is made up of a header, a footer, and an item template. Template tags are used to display the variables specific to each recorded vote such as the vote cast or the vote description. There is also a setting for what to display when no votes are returned in the recent votes and another setting for when no votes are returned in a search.

Votes are entered on a dashboard widget:

Vote Record Dashboard Widget

A vote management page is available from the posts menu:

Manage Recorded Votes

Recent votes are shown by adding <?php recent_votes(); ?> in your theme templates. You can show a search votes form by using the shortcode [ SEARCH-VOTES ] on a page or post. Options for Voting Record include:

  • The option to specify a primary voter (if most or all of the votes being tracked are from one person).
  • The option to specify header text/code for the recent vote list.
  • How many recent votes to show – limited by number of votes or number of days.
  • What to show before a list of recent votes and what to show before a list of search results.
  • What to display at the end of a list of recent votes and what to display at the end of a list of search results.
  • The format for displaying your recent votes or search results lists, including which pieces of information to show.
  • What to display when no recent votes are returned or when a search comes up empty.

To install it simply unzip the file linked above and save it in your plugins directory under wp-content. In the plugin manager activate the plugin. Settings for the plugin may be altered under the Voting Record page of the Options menu (version 2.3) or Settings menu (version 2.5 or later).

About David

David is the father of 8 extremely organized children (4 girls / 4 boys) who is constantly seeking answers to tough questions related to parenting, education and politics while moonlighting for 40 hours each week as a technology professional. He also enjoys cooking, gardening, and sports.
This entry was posted in life, pictures, politics, technology and tagged , , . Bookmark the permalink.

12 Responses to Voting Record

  1. Pingback: All is Well » Pursuit of Liberty

  2. Pingback: Track Voting Records » Pursuit of Liberty

  3. baron says:

    hi. Thanks for plugin



  4. Juan says:

    I like very much the concept of your plugin, but I cannot find how to record votes. Is it there a widget? After installing the plugin I do not see any new widget on my widget list.

    Help is appreciated!

    • David says:

      The form to record votes is in your WordPress Admin panel.

      • Juan says:

        Thanks David for such a quick reply. When I go there it says “Manage Recorded Votes” and the rest is empty. I use the Atahualpa 3.3.3 theme. Isn’t there also a widget where visitors can record votes?

        Thanks again!

  5. Tyler says:

    I too think this is a great Plugin. It works fine for me, my only problem is I needed to make manual changes to the titles. “Nay” to “Voted Against” and “Yea” to “Voted in Favour”, etc…

    The problem I am having is getting it to display more then “Voted in F”… it cuts of “Favour”. I tried searching the php document to see if there were size restrictions and couldn’t find any.

    Any advice?

    • David says:

      The problem is in the database structure – I limited that field to 10 characters (never considered “Voted in Favor” or “Voted Against”). The solution is to change the “create table” statement in the “install_vr” function. Just change the size of the varchar on the vote column to whatever size you need. You will also have to comment out two lines (they normally prevent the function from running if the table already exists) One is “if($wpdb->get_var(“show tables like ‘$table_name'”) != $table_name) {” and the other closes that if statement (it’s a “}” on the line after “add_option(“vr_db_version”, $vr_db_version);”). (If this is not clear enough just let me know and I will email you “before” and “after” screen shots.)

      Thanks for using the plugin and making it better.

  6. Tyler says:

    PERFECT Thanks!

    I wanted to change the language a bit because the site I run is for a school board trustee and they don’t use terms like “bill” or “yea”/”nay”. So I changed “Bill” to “Motion”, “yea” to “Voted in Favour”, “nay” to “Voted Against”, I added “Abstained” and “Absent” because on occasion the trustee will do either of those. Finally, I changed “pass” and “fail” to passed tense (“passed” and “failed” so it made a bit more sense.

    I LOVE this plugin and think its great you created it, it is the only one I’ve seen out there. And I also like the flexibility of the display output.

    One last question I had is, I am trying to put the search on the same page as the static info (if that makes sense) but when I do that the search doesn’t work. Well actually I’ not sure the search is working at all… can you please help?

    • David says:

      Interestingly some of the changes that you made (like adding abstained and absent) were things I had considered doing myself. As for helping with the search issue – I’m happy to help, but I think I need more information – if I had a URL to see what you were talking about it would help.

Leave a Reply

Your email address will not be published. Required fields are marked *