Extension:Did You Know
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{Extension }} infobox. |
Did You Know Release status: unmaintained |
|
---|---|
Description | Adds display() function that displays an "Did You Know?" box for a random article in the category. |
Author(s) | Jeroen De Dauw |
Latest version | 0.3 |
MediaWiki | 1.28.0+ |
PHP | 5.2+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | readme release notes |
Translate the Did You Know extension if it is available at translatewiki.net | |
This extension allows for displaying a "did you know" box in articles (using some wikitext construct) and other interfaces such as special pages (by using the PHP interface from another extension).
The did you know (DYK) box consists of a header "Did you know... ?", followed by content pulled from a wiki page. The wiki page gets randomly selected from a list of pages within a certain category (this category can be configured in LocalSettings). A "type" parameter can also be provided, which causes the lookup for the page to happen in a different category, for example [[Category:Did you know/$type]], where $type gets replaced by the value of the type parameter. If there are no pages in this category, the selection mechanism falls back to the default category.
Requirements
[edit]Did You Know requires:
- MediaWiki 1.28 or above
- PHP 5.2 or above
Download
[edit]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/DidYouKnow/ 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 https://gerrit.wikimedia.org/r/mediawiki/extensions/DidYouKnow.git
Installation
[edit]- Download and move the extracted
DidYouKnow
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/DidYouKnow - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'DidYouKnow' );
- Done â Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
[edit]...
Version
[edit]This is a copy of the release notes file on Git, which might be more up to date then this page.
...
Internationalization
[edit]Did You Know is fully internationalized. Translation of Did You Know messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.