AddResource

Aus Free Software
Zur Navigation springen Zur Suche springen
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
AddResource

Release status: stable

Implementation Special page
Description This special page allows you to attach resources to a given page. This extension is part of the PerPageResources project.
Author(s) Mathias Ertl (Mati talk)
Version 1.0 (2007-11-23)
MediaWiki 1.11.0
License GPL v3
Download SourceCode in SVN
Documentation
Changelog
Parameters none
Example example in this wiki
Hooks used

LoadAllMessages
LanguageGetSpecialPageAliases

This Extension, part of the PerPageResources-Project, enables you to add new resources to a given page. Simply call the provided special page (Special:AddResource) with the full page-name (as provided by {{FULLPAGENAME}}) as parameter, and any resources added through that interface will be automatically added to the Resources-Page.

Download

The most recent version of this extension is always available in the AddResource-directory of our SVN-Repository. You may also find releases for different (older) MediaWiki-versions in the tags-Directory.

Dependencies

  • The ExternalRedirects-Extension is required to add links to external pages. If the extension is not enabled, the corresponding chapter in the special page will not be shown.
  • If uploads are not enabled (see $wgEnableUploads), the chapter to add files to the page is not shown.
  • If you have uploads enabled, you may want to use the mReferer-patch. With this patch, the filenames of the uploaded files will be automatically prefixed with the page-name. Note that this prefix is automatically cut out on the Resources-page.

Installation

Simply download all three files (AddResource.php, AddResource.i18n.php and SpecialAddResource.php) into you extensions-directory, preferably into their own directory. Then, simply include AddResource.php in your LocalSettings.php:

# AddResource extension
require_once("$IP/extensions/AddResource/AddResource.php");

Thats it. No special configuration required! (Except for the dependencies noted above)

How it works

See PerPageResources for an explanation of how resources are associated with a page.

Changelog

1.0

first version documented here.

ToDo

  • Check if external links added start with $wgExternalRedirectProtocols. For now, you can add a redirect to anything for that interface.
  • Subpages could be prefilled with a certain text (i.e. a category)

Licence

GPL v3 or any later version.

Feature Requests

  • If a file extension for the destination file name is missing, automatically append the file extension from the selected original source file