Extension:VoteNY

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
VoteNY

Release status: stable

VoteNY.png
Implementation Parser extension
Description JavaScript-based voting with the <vote> tag
Author(s) Aaron Wright
David Pean
Jack Phoenix
Latest version 2.6.1 (2014-09-21)
MediaWiki 1.23+
Database changes Yes
License GNU General Public License 2.0 or later
Download
Parameters

$wgVoteDirectory

Added rights

voteny

Hooks used
ParserFirstCallInit

RenameUserSQL
LoadExtensionSchemaUpdates
ParserGetVariableValueSwitch
MagicWordwgVariableIDs

Translate the VoteNY extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

Issues:

Open tasks · Report a bug

The VoteNY a.k.a Vote extension adds the <vote> parser hook tag to allow voting on articles where the tag is present.

The magic word {{NUMBEROFVOTES}} can be used to display the number of votes in the database; this number is cached (in memcached) for 24 hours, so it's not totally up-to-date.

The special page Special:TopRatings displays the highest rated pages on the wiki. It supports filtering by category and namespace and its output can be embedded on wiki pages, so {{Special:TopRatings/Adventure Games/0/10}} will show 10 ratings where the pages are in the "Adventure Games" category and the pages are in the main (0) namespace.

Installation[edit | edit source]

vagrant>Vagrant</>, install with <tvar

  • <translate>

1>download-link</> and place the file(s) in a directory called <tvar|name>VoteNY</> in your <tvar|ext>extensions/</> folder.</translate>

  • <translate>

Add the following code at the bottom of your LocalSettings.php:</translate>

require_once "$IP/extensions/VoteNY/VoteNY.php";
  • <translate>

Run the [[<tvar|update>Special:MyLanguage/Manual:Update.php</>|update script]] which will automatically create the necessary database tables that this extension needs.</translate>

  • YesY Done <translate>

Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.</translate>

Parameters[edit | edit source]

  • $wgVoteDirectory — path to the extension's files. Defaults to $IP/extensions/VoteNY.

User rights[edit | edit source]

This extension adds one new user right, voteny, which is required in order to vote. By default, anonymous users do not have this right and thus they cannot vote but registered users can.

Dependencies[edit | edit source]

  • New database table, Vote

Usage[edit | edit source]

<vote> outputs a green square voting box

<vote type=1 /> outputs five voting stars.

Magic Words[edit | edit source]

  • {{NUMBEROFVOTES}}: Returns the entire number of votes on the wiki.
  • {{NUMBEROFVOTESPAGE}}: Returns the vote score on the current page.
  • {{NUMBEROFVOTESPAGE:<page>}}: Returns the vote score on the given page.

Internationalization[edit | edit source]

Message English Description
vote-link Vote
vote-unvote-link unvote Displayed to the user after their vote has been successfully added.
vote-community-score community score: $1 "community score" is the average score of the page in question
vote-ratings {{PLURAL:$1|one rating|$1 ratings}} $1 is the number of ratings, if said number is greater than 1.
vote-remove remove
vote-gave-this you gave this a $1 $1 is the score you gave to the page, for example 5 or 3.50.
vote-votes {{PLURAL:$1|one vote|$1 votes}} $1 is the number of votes.
topratings Top Ratings Title of Special:TopRatings, will be shown on the listing of special pages at Special:SpecialPages and on Special:TopRating itself.
topratings-no-pages No top rated pages. Shown on Special:TopRatings if there are absolutely no pages that have been rated yet (as is the case usually right after installing the extension).
right-vote Vote pages Displayed on Special:ListGroupRights.

To-do list[edit | edit source]

  • If user doesn't have 'vote' right or the DB is locked the extension should say that, not just fail silently or require the user to log in

Version history[edit | edit source]

Version SVN revision Release date Comments
2.4 r108076 4 January 2012 Compatible with ResourceLoader; requires MediaWiki 1.18 or greater
2.3.3 r97068 14 September 2011 Initial public release
2.0 N/A N/A Less external dependencies, RSS & Publish stuff removed
1.0 N/A N/A Initial cleaned-up version of extensions/wikia/Vote/ by Jack Phoenix


Social tools
SocialProfile OverviewRoadmapDeveloper infoScreenshotsHistoryExtension:SocialProfile/UserStatus (GSoC 2011 project)
Other social extensions Automatic Board WelcomeBlogPageChallengeFanBoxesMiniInviteNewUsersListPictureGamePollNYQuizGameRandomFeaturedUserRandomGameUnitRandomUsersWithAvatarsSiteMetricsSiteScoutSportsTeamsUserStatusUserWelcome
Semanticness Semantic Social Profile
Other related extensions
(which do not depend on SocialProfile)
AnswersCommentsLinkFilterMediaWikiChatNewSignupPageVideoVoteNYWikiForumWikiTextLoggedInOut