Extension:ImportArticles

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎español • ‎français • ‎हिन्दी • ‎日本語 • ‎polski • ‎sicilianu • ‎中文
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
ImportArticles

Release status:Extension status stable

ImplementationTemplate:Extension#type Ajax
DescriptionTemplate:Extension#description Adds an ImportArticles used for JavaScript to import multiple CSS/JS pages at once.
Author(s)Template:Extension#username Cblair91talk
Latest versionTemplate:Extension#version 1.3 (2015-09-11)
MediaWikiTemplate:Extension#mediawiki 1.21+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 3.0
Download
Hooks usedTemplate:Extension#hook
BeforePageDisplayManual:Hooks/BeforePageDisplay

Translate the ImportArticles extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The ImportArticles extension adds a JavaScript that is loaded on the page, which allows the importation of multiple JS and CSS at once. This is usable in the MediaWiki namespace for the skin, or in the users namespace for their local modifications.

Installation[edit]

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

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'ImportArticles' );, you need to use:

require_once "$IP/extensions/ImportArticles/ImportArticles.php";

History[edit]

V1.3:

  • Cleaned up a bunch of the code, and transfer to current PHP/MW standards

V1.2:

  • Add version and licence to JavaScript definer
  • Change variables to global variable
  • Fixed console logging for page missing

V1.1:

  • Change variables
  • Fixed output formatting

V1.0:

  • Initial release