Extension:LastModified

From Linux Web Expert

MediaWiki extensions manual
LastModified
Release status: stable
File:Last.modified.uselang.en.png
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
$wgLastModifiedRange
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
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 <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate>
1 months <translate> No</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate>
2 days <translate> No</translate> <translate> No</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate>
3 hours <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> Yes</translate> <translate> Yes</translate> <translate> Yes</translate>
4 minutes <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> Yes</translate> <translate> Yes</translate>
5 seconds <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> No</translate> <translate> Yes</translate>

The default used by the extension is "0".

Installation

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/LastModified</tvar>|Download]] and move the extracted <tvar name=name>LastModified</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LastModified
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'LastModified' );
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

See also