Jump to content

Extension:Hashtags

From mediawiki.org
This page is a translated version of the page Extension:Hashtags and the translation is 29% complete.
MediaWiki 拡張機能マニュアル
Hashtags
リリースの状態: 安定
実装 ユーザー インターフェイス
作者 Brian Wolff
最新バージョン 0.1
互換性の方針 MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。
MediaWiki >= 1.42
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
README
  • $wgHashtagsRequireActiveTag
  • $wgHashtagsMakeTagsSystemManaged
四半期ごとのダウンロード数 3 (Ranked 128th)
translatewiki.net で翻訳を利用できる場合は、Hashtags 拡張機能の翻訳にご協力ください

The Hashtags extension allows you to use hashtags in edit summaries.

When a user puts something like "#foo" in the edit summary, the edit gets tagged as such. In the edit summary this becomes linked so that users can see other edits with the same tag.

Internally, this is implemented as a hidden change tag with the prefix 'hashtag-'.

MediaWiki core already comes with support for change tags . Despite that, I think there is a place for an extension like this - hashtags are similar but different to change tags. I believe hashtags provide a more "wiki-way" method of organizing than the existing change tags system. The motivation for this extension is as follows:

  • Hashtags are ad-hoc. Any user can create any tag they want. This eliminates gate keepers and allows taxonomies to develop naturally. "Wiki" means quick, which is supposed to mean you can be bold without needing permission.
  • Hashtags allow learning by copying. Change tags (That are on a pre-approved allow list) can be added to edits via a secret url parameter. However most users do not know this and there is no reasonable way for a user to find out. With hashtags they can easily spread. One user starts doing it. Another user sees it in an edit summary and starts doing it themselves. There is a natural on ramp for users to discover the feature.
  • Users are already familiar with this pattern from other websites like Twitter. There is even an external hashtag tool for Wikimedia wikis. Clearly users already want to do this even without software support.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のHashtagsという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Hashtags
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'Hashtags' );
    
  • Optional: If you want edits from before you installed the extension to be searchable by hashtags in their edit summaries, run the reparseHashtags.php maintenance script.
cd extensions/Hashtags/maintenance
php reparseHashtags.php --type revision
php reparseHashtags.php --type logging
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

構成パラメーター

$wgHashtagsRequireActiveTag
When true, hashtags must first be created and active in Special:Tags before being considered a valid tag. Activating a tag is not retroactive
$wgHashtagsMakeTagsSystemManaged
Make the change tags corresponding to Hashtags be system managed. When true, users are unable to add or remove hashtag style tags via Special:EditTags or manage them with Special:Tags. Users can still remove the tags by revision deleting the edit summary.


Handling unwanted tags

If you are concerned about users tagging things inappropriately, this extension is compatible with all the standard tools for managing edit summaries. You can use Extension:AbuseFilter to prevent edits where the edit summary contains a specific tag. If there is an edit summary that is inappropriate, it can be deleted using Revision delete . Revision deleting an edit summary will automatically remove all hashtags associated with it. (Note: not yet implemented for log items.)

Beyond that, there are some extension specific features. You can add a list of tags you don't want to the page MediaWiki:Hashtags-invalid-tags on your wiki. Any tags listed on this page will not be considered a hashtag.

The extension supports the additional option $wgHashtagsRequireActiveTag. If this is enabled, users with managechangetags rights (typically admins) must first create the appropriate change tag (The hashtag name with the # replaced with a 'hashtag-'. So #foo becomes hashtag-foo) on Special:Tags. Only once the tag is created will the extension consider it a valid hashtag in this configuration. Note that users will not be able to delete such hashtags from the web interface unless $wgHashtagsMakeTagsSystemManaged is false. This is somewhat of an extreme option, as then hashtags are no longer ad-hoc which reduces much of their benefit.

If $wgHashtagsMakeTagsSystemManaged is false, users (with changetags rights. Typically that is all logged in users) can adjust the hashtags associated with a specific revision from the history page just like they could with any other change tag.

既知の制限

  • When revision deleting a log entry, hashtag related change tags are not removed (phab:T374643). The reparseHashtags.php maintenance script will remove such tags.
  • Similarly, revision deleting edit summaries that have been normally deleted does not remove any associated hashtags
  • Unclear if this works on pages made through Special:Import
  • Log entries in restricted logs (e.g. Special:Log/suppress) do not get hashtags associated with them (This might be a good thing for security).
  • The maintenance script does not work with deleted pages.

関連項目