Release status: stable
|Description||Makes it easy to add positive feedback to user talk pages|
|Author(s)||Ryan Kaldari, Jan Paul Posma, Brandon Harris (design)|
|MediaWiki||1.27+ - WikiLove master should only be used with core's master; otherwise, use matching branches (e.g. WikiLove REL1_27 with core REL1_27, or matching WMF release branches).|
Translate the WikiLove extension if it is available at translatewiki.net
|Check usage and version matrix.|
|Open tasks · Report a bug|
WikiLove is an extension designed to promote the spread of WikiLove within Wikipedia and possibly other wikis. Specifically, it makes adding awards, gifts, and invitations to user talk pages as simple as clicking a few buttons.
- 1 Download
- 2 Installation
- 3 Usage
- 4 Custom configuration
- 5 Glitches and problems
- 6 API Documentation
- 7 Design for version 1.0
- 8 See also
The extension can be retrieved directly from Git [?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "Continue"
Extract the snapshot and place it in the extensions/WikiLove/ directory of your MediaWiki installation.
If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/ git clone
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'WikiLove' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
If you want to use the built-in awards, you must have InstantCommons enabled. To do this, add this to LocalSettings.php:
$wgUseInstantCommons = true;
The extension should now be active. Go to the editing tab in your preferences to turn on the interface.
You can also use these configuration options in your LocalSettings.php:
$wgWikiLoveGlobal- enable the extension for all users, removing the user preference (default: false)
- Note: you can also enable the setting by default but still give the users the option to turn it off (opt-out) by using:
$wgDefaultUserOptions['wikilove-enabled'] = 1;
$wgWikiLoveTabIcon- use an icon for skins that support them (i.e. Vector) (default: true)
$wgWikiLoveLogging- enable logging of giving of WikiLove (default: false); this automatically creates a database table
wikilove_logwhich you can use for statistical queries
To enable your account to use WikiLove, go to the editing tab in your preferences and turn on WikiLove under "Labs features" (or, in some versions, under "General options").
To use WikiLove, go to a user's talk page and click the heart icon. Follow the directions from there.
To learn how to customize WikiLove for an individual editor (rather than an entire wiki), see the user documentation.
You can customize the options for your own wiki by editing the page MediaWiki:WikiLove.js. In here, you can change the configuration the same way as is done with the built-in options: defaultOptions.js. Here are some examples of custom WikiLove configurations: Malayalam Wikipedia, English Wikipedia, Wikimedia Commons, English Sturmkrieg.
The options at the top of defaultOptions.js are some default settings for your convenience. If you omit certain properties from types or subtypes, these defaults will be used (
defaultText, defaultBackgroundColor, defaultBorderColor, defaultImageSize, defaultImage). Then there is the list of types. Each type can have the properties
name (required) and
icon (optional). Furthermore, a type can have a list of subtypes, or not, in which case the additional properties will be assigned to the type itself.
If the type has subtypes, they are listed in an object list
subtypes. Optionally, the type can also have the property
select, which specifies the label above the dropdown menu. Each subtype can have the following properties:
option- name in the dropdown menu
descr- Description when selecting the subtype
header- Header of the message that is being added, i.e. the part that will be between
== ... ==
title- Title of the message box
text- Text of the message box (see below for details)
image- Image of the message box
gallery- Gallery for selecting an image (see below for details)
fields- Array of fields that the user can edit; can contain these values:
header, title, image, message
imageSize- Image size (e.g.
backgroundColor- Background color (any CSS valid color, e.g.
borderColor- Border color (same)
When not using subtypes, these options (except for the first two) need to be added to the type itself.
defaultText, mentioned earlier), you can use a few codes that will be substituted automatically:
- $1 - User message
- $2 - Title
- $3 - Image name
- $4 - Image size
- $5 - Background color
- $6 - Border color
- $7 - Username of the recipient
To make it easy for the user to select images, you can create a gallery with predefined images. For this, create a
gallery property, which has the following properties:
imageList- An array of image names
width- Maximum width of the images in the gallery (in pixels); for 3 images
height- Maximum height of the images in the gallery (in pixels)
number- Number of random images to show (optional); if omitted all images are shown
You can use images from Wikimedia Commons, as the default awards do. Like mentioned before, you have to enable InstantCommons for this.
If you just want to remove some of the default WikiLove items, you can delete them from the $.wikiLoveOptions object. Here are some examples that you could use in your wiki's MediaWiki:WikiLove.js page:
// Delete the Random Acts of Kindness Barnstar from the barnstars list delete $.wikiLoveOptions.types.barnstar.subtypes.kindness; // Delete the cheeseburger from the food and drink list delete $.wikiLoveOptions.types.food.subtypes.cheeseburger; // Delete the kittens interface entirely delete $.wikiLoveOptions.types.kitten;
Glitches and problems
If the talk page you are attempting to edit contains a word that has been subsequently added to Special:SpamRegex, attempts to use the interface to add a barnstar or other award will fail. This is because the page cannot be edited, as it contains a forbidden word. Removing the word from the page or from the filter will fix the problem.
WikiLove uses a special wikilove API to post messages to users' talk pages. The API is basically just a thin wrapper around some existing APIs. If the user's talk page is a Wikitext page, it uses the edit API. If it's a Flow page, it uses the flow API. And if it's a LiquidThreads page, it uses the threadaction API.
In order to call the API, use the parameter
title- Title of the user or user talk page to send WikiLove to (required)
text- Raw wikitext to add in the new section (required)
message- Actual message the user has entered, for logging purposes (doesn't include the image and HTML formatting)
token- Edit token. You can get one of these through prop=info (required)
subject- Subject header of the new page section (required)
type- Type of WikiLove (for statistics); this corresponds with a type selected in the left menu, and optionally a subtype after that (e.g. "barnstar-normal" or "kitten") (optional)
Design for version 1.0
This document describes the design and behavior of the WikiLove system of positive feedback for Wikipedia. This tool is designed to promote the spread of WikiLove within Wikipedia. Specifically, it makes adding awards and gifts to user talk pages as simple as clicking a few buttons.
Wikipedia, as a community, has several mechanisms for indicating displeasure or to provide negative feedback to its users. Certain gadgets, such as Twinkle, are heavily engineered towards warning, blocking, and reverting.
Since Wikipedia is in need of positive reinforcement, especially for new users, a system designed specifically and only towards positive feedback is desired.
Use of Whimsical Style
The system has a heavy style of "whimsy" to its design. This is intentional and is intended to align closer to the expectations of users of modern websites. Further, the entire principle of "awards" is in and of itself whimsical (e.g., cookies and kittens).
This style may be abandoned based on user feedback.
Note on Nomenclature
Some template types, such as welcome templates, are not technically "awards".
This document uses the term award interchangeably with template. Since the system is user-focused, and not intended directly for power-users, user-facing nomenclature has been used.
The WikiLove dialog is modal. Initiating it (from anywhere) will cause it to appear over the text of the page. It can be dismissed with a simple click.
The user will initially be presented with a short set of easy-to-understand instructions and a list of available award categories.
Upon selecting an award type, the user is presented with a section in which they can add details to the award (such as a short message).
Note that some award categories (e.g., "cookie") will not have a secondary award creation step and will go directly to "Preview".
The user then clicks the "preview" button, which will load a preview of the award so that they may see how it will look on the user's talk page.
Once the user is satisfied, they may click the "Send WikiLove" button. At this time, AJAX calls to the server API will be fired, adding the template to the user's talk page.
Since most new users are unlikely to be aware that they even have talk pages, they may not be aware that they have received the WikiLove in question.
Accordingly, the server will email the recipient (if they have provided an email address) informing them of the WikiLove as well as short instructions on how to access their talk page.
Initially, the awards that can be given are to be defined in the gadget itself. If this system is elevated to an extension, then the names of the awards and the templates should be defined in the site's LocalSettings.php.
Alternatively, such information can be stored in the database. An administration console would be required to add or subtract available awards and award categories.
For statistics gathering purposes, every time an award is given, data is tracked and stored in the database. A simple table, written to via the API, is all that need be required:
- From User - The username of the person who is giving the award
- To User - The username of the person receiving the award
- Template - the name of the template awarded
- Timestamp - when the award was given
- Award Text - Optional; this would be the text of the award
In the future, it should be possible to create a page, Special:WikiLoveStatistics, that could be used to see how often the system is used as well as providing insight into who gives the most love, what awards are most popular, and who receives the most awards.
This will help to provide a global overview of community health. The more awards given, the healthier the community.
Phase two of this project could result in "Send WikiLove" links being dynamically added to signatures on talk pages. This would allow for WikiLove to be sent in a much easier manner, directly from other talk pages.
- WikiLove - Original design document
- Extension:Thanks - lighter-weight thanking for edits using Echo
- GiveCredit on MeatBall Wiki
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|