MediaWiki extensions manual
LastModified
Release status: stable
LastModified in English
Implementation Special page
Description Provides a Last modified date for wiki articles
Author(s) Jeremy Postlethwaite (Jpostlethwaitetalk)
Latest version continuous updates
MediaWiki >= 1.29.0
Database changes No
License GNU General Public License 2.0 or later
Download
Parameters
$wgLastModifiedRange
Hooks used
  • BeforePageDisplay
Quarterly downloads 111 (Ranked 79th)
Translate the LastModified extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The LastModified extension displays text on the page showing the last modified page time. See also Timestamp position modification. This extension was created during Tech Days 2011 at the San Francisco Wikimedia office.

Customization

Using the $wgLastModifiedRange configuration parameter, you can change the display range (or timelimit) used by the extension. For example, if you only want to display the message for articles that were updated less than 30 days ago, set this value to 2. This will display a message like: "Last updated 20 days ago." You will not see this message for articles that were modified more than 30 days ago. The parameter only accepts an integer value. Here are the options available:

Value Display
years months days hours minutes seconds
0 years YesYesYesYesYesYes
1 months NoYesYesYesYesYes
2 days NoNoYesYesYesYes
3 hours NoNoNoYesYesYes
4 minutes NoNoNoNoYesYes
5 seconds NoNoNoNoNoYes

The default used by the extension is "0".

Installation

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

See also

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.