Jump to content

Extension:DonateButton

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
MediaWiki extensions manual
DonateButton
Release status: stable
px
Implementation Skin , MyWiki , Hook
Description Add button with link to a donation page
Author(s) WikiMANNia (WikiForMentalk)
Latest version 1.6.0 (2024-04-21)
MediaWiki 1.35+
PHP 7.3.19+
License GNU General Public License 2.0 or later
Download
  • $wmDonateButton
  • $wmDonateButtonURL

The DonateButton extension allows a custom addition of a button with link to a donation page to a wikis sidebar . The button image is automatically adapted according to the language selection.

Use

Install the extension and upload to the wiki a file as specified in $wmDonateButtonFilename. By entering * donatebutton in the MediaWiki:Sidebar , the button can be placed individually.

Installation

  • Download and place the file(s) in a directory called DonateButton in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'DonateButton' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration options

Enable the DonateButton. Default is false.

$wmDonateButton = true;

An image with this name should be uploaded on each wiki of your wikifarm.

  • Specify the link to a donation page.
$wmDonateButtonURL = "https://example.org/yourdonationpage.php?lang=";

The link is automatically completed by the code of the language selected by the user or alternatively by the $wgLanguageCode variable.

Localisation

The extension is provided in "de", "en", "es", "fr", "he", "it", "nl", "pt", "ru".

See also

Remarks

  • Branch REL1_25 works from REL1_25 and has been tested up to MediaWiki version REL1_37 .
  • Branch REL1_35 works from REL1_35 and has been tested up to MediaWiki version REL1_41 .
  • Configuration of a donation link in skin Minerva Neue .
  • Version 1.5 has some Refactoring:
    Changed “configuration schema”, replaced manifest version 1 with version 2 and changed the prefix of the configuration variables from default to wm.
    Replaced class “DonateButtonHooks” (extends “Hooks”) with class implements interfaces.
  • Version 1.5.1 adds a dirty hack for skin Timeless.
  • The extension was tested with the following MediaWiki versions: 1.35.14, 1.39.8, 1.40.2, 1.41.2, 1.42.1
  • Version 1.6.0 has added support for skin Monaco.