Extension:VoteNY/zh

This page is a translated version of the page Extension:VoteNY and the translation is 0% complete.
MediaWiki擴充功能手冊
OOjs UI icon advanced-invert.svg
VoteNY
发布状态: 稳定版
VoteNY.png
实现 解析器扩展 , 钩子 , 标签
描述 JavaScript-based voting with the ‎<vote> tag
作者
最新版本 2.9.4 (2018-06-27)
兼容性方针 Master maintains backward compatibility.
MediaWiki 1.25+
数据庫更改
Vote
许可协议 GNU通用公眾授權條款2.0或更新版本
下载
  • voteny
翻譯VoteNY擴充功能如在translatewiki.net可用

检查使用和版本矩阵。

问题 尚未完成的工作 · 回報錯誤

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

  • 下载文件,并将其放置在您extensions/文件夹中的VoteNY目录内。
  • 将下列代码放置在您的LocalSettings.php的底部:
    wfLoadExtension( 'VoteNY' );
    
  • 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。

致使用MediaWiki 1.27或更早版本的用户:

上面的说明介绍的是安装此扩展的新方法,它使用wfLoadExtension()。 如果您需要在早期版本(MediaWiki 1.27和更早版本)中安装此扩展,而不是wfLoadExtension( 'VoteNY' );,您需要使用:

require_once "$IP/extensions/VoteNY/VoteNY.php";

Configuration

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. To allow anonymous users to vote, add the following to your LocalSettings.php:

$wgGroupPermissions['*']['voteny'] = true;

Usage

Tags

‎<vote /> outputs a green square voting box.

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

Magic words

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

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.

Special page

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.

Internationalization

Message 英语 Description
voteny-link Vote
voteny-unvote-link unvote Displayed to the user after their vote has been successfully added.
voteny-community-score community score: $1 "community score" is the average score of the page in question
voteny-ratings {{PLURAL:$1|one rating|$1 ratings}} $1 is the number of ratings, if said number is greater than 1.
voteny-remove remove
voteny-gave-this you gave this a $1 $1 is the score you gave to the page, for example 5 or 3.50.
voteny-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-voteny Vote pages Displayed on Special:ListGroupRights.

See also

  • RatePage - Allows for voting and voting contests