Jump to content
MediaWiki

Extension:Yappin

From mediawiki.org
MediaWiki extensions manual
Yappin
Release status: beta
Implementation Special page , Page action
Description Allows users to leave comments on a page, which are displayed underneath the page content.
Author(s) Jayden Bailey
PetraMagna (PetraMagna talk )
Latest version 1.1
MediaWiki 1.45+
Database changes Yes
yappin-comment, yappin-manage, yappin-import
Licence GNU General Public License 3.0 or later
Download
README

The Yappin extension allows users to leave comments on a page, which are displayed underneath the page content.

This page documents a fork of Weird Gloop's Yappin extension. Compared to the original, the fork adds a wikitext editing mode (which makes VisualEditor optional), notifications for replies and mentions, nested replies through mentions, avatars from UserProfileV2, comment import/export, and per-page comment controls. The original deliberately minimizes its feature set to improve maintainability; this fork has considerably more features and is more likely to contain bugs.

Installation

[edit ]
  • Download and place the file(s) in a directory called Yappin in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Yappin' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

The Echo extension is required. VisualEditor and UserProfileV2 are optional.

If the wiki previously ran a the WeirdGloop version of this extension which used com_* tables, update.php detects them and renames the tables, columns, and indexes to yappin_* in place before applying the current schema. This is the only place where migration is automated. Configuration variable prefixes must be changed manually from $wgComments to $wgYappin.

Configuration

[edit ]
$wgYappinResultsPerPage
How many comments to load at a time by default. This value cannot be higher than 100 for performance reasons.
Default: 50
$wgYappinReadOnly
If enabled, new comments cannot be posted and existing comments cannot be edited anywhere on the wiki.
Default: false
$wgYappinUseAbuseFilter
If enabled, run comments through AbuseFilter.
Default: true
$wgYappinUseVisualEditor
If enabled, use VisualEditor to compose comments when it is installed. Otherwise, the wikitext editor is used.
Default: true
$wgYappinShowUPV2Avatars
If enabled, show profile pictures from UserProfileV2 next to comments.
Default: false
$wgYappinEnabledNamespaces
The namespaces that comments are enabled on, as an array of namespace ID to boolean. If a namespace is not enabled, comments are not visible on that namespace's pages, and new comments cannot be left on them. Every namespace in $wgContentNamespaces is enabled by default; set an entry to false to opt one out.
Default: $wgContentNamespaces

Comments are disabled on talk pages, special pages, and non-existent pages, regardless of whether the page's namespace is in $wgYappinEnabledNamespaces.

Notifications

[edit ]

Notifications are sent for three events:

Event Trigger
yappin-reply Someone replied to your comment.
yappin-mention You were mentioned in a comment via [[User:Name]] link. At most 10 mentions are notified per comment.
yappin-user-page A comment was left on your user page.

Moderation

[edit ]

Users with the yappin-manage right can delete other users' comments. Users can be blocked from commenting using the standard Special:Block form by a user that has the block right.

Commenting can also be turned off for individual pages through Special:CommentControl. A link to it is available in the tools menu.

AbuseFilter

[edit ]

If $wgYappinUseAbuseFilter is enabled and the AbuseFilter extension is installed, comments run through all enabled filters on the wiki with the action variable set to comment and the new_wikitext variable set to the wikitext of the comment. An example of a rule that would match is:

action == 'comment' & new_wikitext irlike "badword"

Special pages

[edit ]
Page Right Description
Special:Comments - Browse all comments on the wiki or the comments of a single user.
Special:CommentControl yappin-manage Set a page's comment status to enabled, read-only, or disabled. Review pages that are restricted from commenting.
Special:ImportComments yappin-import Import comments from a JSON file.
Special:ExportComments yappin-manage Export all comments on the wiki to a JSON file.

It is possible to migrate comments from other MediaWiki extensions by converting comments into a conforming JSON format.

Maintenance scripts

[edit ]
Script Description
ImportCommentStreams.php Import comments from the CommentStreams extension.
ReparseComments.php Regenerate the stored HTML of every comment from its wikitext after a change to the way comments are parsed. For example, this may be necessary after patching a security vulnerability.
RemoveAllComments.php Delete every comment, rating, and per-page control entry. Mostly useful for cleaning up a botched import.

See also

[edit ]

AltStyle によって変換されたページ (->オリジナル) /