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.
Release status: stable
|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)|
|MediaWiki||1.16.0 or greater|
|Parameters||$wgUploadPageHeader, $wgUploadPageFooter, $wgResourcesCategory|
|Example||Use the AddResource-Page to upload a file in this wiki|
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.
Version 2.1.0 of the AddResource extension bundles the code previously found in this extension.
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';
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.
- first version documented here
- 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.
GPL v3 or later.