ManipulateUpload: Unterschied zwischen den Versionen

Aus Free Software
Zur Navigation springen Zur Suche springen
 
(15 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
{{MediaWikiExtensionDeprecated}}
 +
 
{{Extension|templatemode = a
 
{{Extension|templatemode = a
 
|name        = ManipulateUploade
 
|name        = ManipulateUploade
 
|status      = stable
 
|status      = stable
 
|type1      = interface
 
|type1      = interface
|hook1      = UploadForm:initial
+
|hook1      = UploadFormInitDescriptor
|hook2      = UploadForm:BeforeProcessing
+
|hook2      = UploadCreateFromRequest
 +
|hook3      = SpecialUploadComplete
 
|username    = Mati
 
|username    = Mati
 
|author      = Mathias Ertl
 
|author      = Mathias Ertl
 
|description = Manipulates the upload process so it integrates better with the PerPageResources-project. {{Extension-PerPageResources}}
 
|description = Manipulates the upload process so it integrates better with the PerPageResources-project. {{Extension-PerPageResources}}
|version    = 1.2
+
|version    = 2.9
|update      = 2008-02-12
+
|update      = 2010-08-09
|mediawiki  = 1.11.x
+
|mediawiki  = 1.16.0 or greater
 
|license    = GPL v3
 
|license    = GPL v3
|download    = [http://svn.fsinf.at/mediawiki/ManipulateUpload SourceCode in SVN]
+
|download    = see [[#Download|Download]]
 
|readme      = [[{{FULLPAGENAME}}|Documentation]]
 
|readme      = [[{{FULLPAGENAME}}|Documentation]]
 
|changelog  = [[{{FULLPAGENAME}}#Changelog|Changelog]]
 
|changelog  = [[{{FULLPAGENAME}}#Changelog|Changelog]]
Zeile 18: Zeile 21:
 
|example    = Use the [[Special:AddResource/{{FULLPAGENAME}}|AddResource-Page]] to upload a file in this wiki
 
|example    = Use the [[Special:AddResource/{{FULLPAGENAME}}|AddResource-Page]] to upload a file in this wiki
 
}}
 
}}
This extension manipulates the upload-process so it better integrates into the [[PerPageResources]]-project. It requires the [[MReferer]]-patch to work correctly. Its main use is that some text is automatically appended to the description of the files. It will include an internal link to the page referenced by the mReferer-variable and, if set, will put the file into the category referenced by $wgResourcesCategory.
 
  
Additionally, it is possible to both prepend and append text to the upload-form of [[Special:Upload]]. You can do this by setting $wgUploadPageHeader and/or $wgUploadPageFooter.
+
 
 +
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.
 +
 
 +
__TOC__
 +
 
 +
=== Deprecated ===
 +
Version 2.1.0 of the [[AddResource]] extension bundles the code previously found in this extension.
  
 
=== Download ===
 
=== Download ===
The most recent version of this extension is always available in the [http://svn.fsinf.at/mediawiki/ManipulateUpload ManipulateUpload-directory] of our SVN-Repository. You may also find releases for different (older) MediaWiki-versions in the [http://svn.fsinf.at/mediawiki/tags tags-Directory].
+
{{Download|dir=manipulateupload}}
  
 
=== Installation & Configuration ===
 
=== Installation & Configuration ===
* You have to apply the [[MReferer]]-patch. Please see there for patch-instructions.
+
After downloading, you only have to do a require_once to enable this extension:
* Download the [http://svn.fsinf.at/mediawiki/ManipulateUpload sources] into the extensions-directory
 
 
 
All that is left is some simple configuration in LocalSettings.php:
 
 
<source lang=php>
 
<source lang=php>
 
require_once("$IP/extensions/ManipulateUpload/ManipulateUpload.php");
 
require_once("$IP/extensions/ManipulateUpload/ManipulateUpload.php");
 
# optional: modifies the appearance of Special:Upload
 
$wgUploadPageHeader='this text is displayed above the upload form.';
 
$wgUploadPageFooter='this text is displayed below the upload form.';
 
  
 
# optional: If set, uploaded files will be added to this category:
 
# optional: If set, uploaded files will be added to this category:
Zeile 42: Zeile 43:
  
 
=== Changelog ===
 
=== 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) =====
 
===== 1.2 (rev. 192) =====
 
* Added support for missing file name extensions in the destination file names (automated copy of the source file name extension)
 
* Added support for missing file name extensions in the destination file names (automated copy of the source file name extension)
Zeile 58: Zeile 71:
 
GPL v3 or later.
 
GPL v3 or later.
  
[[Category:Extensions]]
+
[[Category:Old Extensions]]

Aktuelle Version vom 7. Oktober 2012, 22:30 Uhr

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.