Contents
Reddit-style voting on Trac resources
Description
This plugin adds a context-navigation entry, that lets users easily vote for a Trac resource, including Wiki pages, tickets, milestones, etc.
If a user has a valid session (created through the Preferences panel) and the VOTE_MODIFY permission, he/she will be able to vote.
Since tracvote-0.2 there are some WikiMacros available in addition to example TracReports on the votes db table.
Bugs/Feature Requests
Existing bugs and feature requests for VotePlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out VotePlugin from here using Subversion, or browse the source with Trac.
Installation
Note: Documentation has been updated to already reflect features of current trunk development branch, that is in preparation for next stable release tracvote-0.2. To get the best first-time experience you may wish to try the release candidate right now. But beware, that there is no down-grade support, while upgrading from previous plugin versions has been tested on different db back-ends and should work flawlessly.
Install the plugin:
easy_install http://trac-hacks.org/svn/voteplugin/tags/0.1.5
If you get "error: Unexpected HTML page found at http://trac-hacks.org/svn/voteplugin/tags/0.1.5", update setuptools:
sudo easy_install -U setuptools
Add the following to the [components] section of trac.ini:
[components] tracvote.* = enabled
Configure the list of URL paths to allow voting on in trac.ini. Globs are supported.
[vote] paths =
Grant users the VOTE_VIEW and VOTE_MODIFY permission where appropriate.
Note:
- VOTE_MODIFY inherits view permission since tracvote-0.1.5.
- Since tracvote-0.2 a default set of permissions is configured once after creating the Trac database table for this plugin.
Probably you'll need to run:
trac-admin /path/to/projenv upgrade
You will also need to restart your webserver for the plugin to be available, appear in the list of those installed, have the perms available, etc.
Example SQL statements for creating useful reports for tickets and wiki pages are included in SqlQueryForReport.txt in the plugin source.
Screenshot
Recent Changes
- [13094] by hasienda on 2013-05-13 00:59:50
-
VotePlugin: Make compact and top standard wiki macro arguments, refs #4546 and #7592.
List output for all three macros is limited to a maximum of 5 items, if not
explicitely specified by top=<n>, where in turn 'n=0' means unlimited.
The previous limit of 10 items (TopVoted only) looked like too much.
And rendering of resource links respects the compact argument too, what
yields significantly reduced output for milestones and tickets.
- [13093] by hasienda on 2013-05-13 00:37:50
-
VotePlugin: Re-enable voting on milestones, refs #4546, #7592 and #10942.
delete_vote obviously needed to not depend on a req object to work.
That went unnoticed, because it is called only by change listeners for now.
set_vote was not ready for unversioned resources, and a subtle insanity in
resource_from_path surfaced during early testing with milestones too.
Method name changes are done for clarity, that a single method call probably
deals with multiple vote entries.
- [13091] by hasienda on 2013-05-12 00:59:55
-
VotePlugin: Pipe usernames through Chrome.format_author to obfuscate email addresses, if required, refs #4546 and #7592.
Additionally I've spotted and fixed an UnicodeDecodeError due to a
not unicode-aware string replacement in [[LastVoted]] wiki macro.
Author/Contributors
Author: athomas
Maintainer: rjollos, hasienda
Contributors: k0s, PeterLawrence
Attachments (1)
- votes.png (72.6 KB) - added by athomas 5 years ago.
Download all attachments as: .zip


