ManipulateUpload

Aus Free Software
Wechseln zu: Navigation, Suche

Deprecated Extension!

This extension is deprecated and no longer maintained by the developer. It may no longer work for current versions of MediaWiki and Bugs are no longer fixed. Please see the Deprecated section for more information.

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
ManipulateUploade

Release status: stable

Implementation User interface
Description Manipulates the upload process so it integrates better with the PerPageResources-project. This extension is part of the PerPageResources project.
Author(s) Mathias Ertl (Mati talk)
Version 2.9 (2010-08-09)
MediaWiki 1.16.0 or greater
License GPL v3
Download see Download
Documentation
Changelog
Parameters $wgUploadPageHeader, $wgUploadPageFooter, $wgResourcesCategory
Example Use the AddResource-Page to upload a file in this wiki
Hooks used

UploadFormInitDescriptor
UploadCreateFromRequest
SpecialUploadComplete


This extension manipulates the upload-process so it better integrates into the PerPageResources-project. This resource adds the wpReferer field pass through the page for which this file was added. It automatically prefixes the desired destination name with the original page and adds a comment linking back to it. After successful upload, the user will be redirected back to AddResource-page for the original page.

Deprecated

Version 2.1.0 of the AddResource extension bundles the code previously found in this extension.

Download

The source code of this extension was hosted on git.fsinf.at, a project no longer maintained. Since this extension was so old, the git repository was not transfered to any other repository and the source code is no longer available.

Installation & Configuration

After downloading, you only have to do a require_once to enable this extension:

require_once("$IP/extensions/ManipulateUpload/ManipulateUpload.php");

# optional: If set, uploaded files will be added to this category:
$wgResourcesCategory='Resources';

Changelog

2.0 (rev. 338)
  • Modified to work with 1.16. This extension no longer requires the mReferer-patch, which is now deprecated.
  • Redirect back to Special:AddResource/<original-page>?wpDestFile=<destination-file> upon successful upload. <original-page> is the original page we added the resource for, <destination-file> is the final filename of the file that was just uploaded.
  • Modifying the desired destination filename and the page comment is now done by subclassing the normal upload handlers. This is much cleaner and should improve the maintainability of this extension considerably.
  • Hooks: This extension now uses three hooks instead of two - but none of the original two!
  • Updated homepage to this page
1.3 (rev. 241)
  • wgResourcesCategory wasn't appended, because of an inconsistency with an old version (this variable was once called wgResourcesAddCategory)
  • If destination name is now empty, the source-filename is assumed.
  • A link to the resources-page of the linked-to article is added automatically
1.2 (rev. 192)
  • Added support for missing file name extensions in the destination file names (automated copy of the source file name extension)
1.1 (rev. 177)
  • Adding a category to uploaded files is no longer hardcoded but set using the shared variable $wgResourcesCategory.
1.0
  • first version documented here

ToDo

  • If the mReferer variable is not set, the link should not be added
  • If the mReferer variable refers to an external link, it could add an external link instead.

Licence

GPL v3 or later.