Extension:Hashtags

MediaWiki extensions manual
Hashtags
Release status: stable
Implementation User interface
Author(s) Brian Wolff
Latest version 0.1
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
License GNU General Public License 2.0 or later
Download
README
  • $wgHashtagsRequireActiveTag
  • $wgHashtagsMakeTagsSystemManaged
Quarterly downloads 3 (Ranked 133rd)
Translate the Hashtags extension if it is available at translatewiki.net

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.

Installation

  • Download and move the extracted Hashtags folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Hashtags
  • Add the following code at the bottom of your LocalSettings.php file:
    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
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

$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.

Known limitations

  • 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.

See also