-
Notifications
You must be signed in to change notification settings - Fork 0
UploadWizard
Here is how you get the upload wizard running.
#Get it going ##Installation
- you need to download the extention
- Please follow the installation instructions.
##Integration in the wiki It makes usability wise sense to set the wizard as default upload possibity. This is done in the myWikiFolder/LocalSettings.php
if you have php > 5.3, you can use
$wgExtensionFunctions[] = function() {
$GLOBALS['wgUploadNavigationUrl'] = SpecialPage::getTitleFor( 'UploadWizard' )->getLocalURL();
return true;
};
otherwise use
$wgUploadNavigationUrl = '/wiki/Special:UploadWizard';
The old form can be made easily accessible setting
$wgUploadWizardConfig[ 'altUploadForm'] = 'Special:Upload';
##Image upload problems
- Your server needs writing access to the myWikiFolder/Images folder. A possible solution is to make it owned by nobody or Apache (depending what your server uses). You could just generally allow writing there but only for testing, as it is security-wise a bad idea.
###SVG trouble ––you actually need to have upload of svg allowed. Add it in your myWikiFolder/LocalSettings.php by using something like
$wgFileExtensions = array('png','gif','jpg','jpeg','svg');
––you need to have librsvg2.bin on your system installed
––If it has trouble with converting the thumbnail, you may want to increase shell memory limits in LocalSettings.php, e.g. using
$wgMaxShellMemory = 131072;
(source) I did so and it worked hereafter.
#Make it nice ##Licencing tutorial There is the possiblity to show a graphic that teaches what to upload and what not at the first step (it can be disabled by the user easily with "dont show this again") To get in running you need to upload the tutorial image or graphic just like you would upload any other file. Remember the filename since you will reference this file in the myWikiFolder/LocalSettings.php
$wgUploadWizardConfig[ 'tutorialTemplate'] = 'putYourFileNameHere.extention';
The width of the file in px needs to be set via
$wgUploadWizardConfig[ 'tutorialWidth'] = 400
But replace the 400 by the width in px of your image. Btw.: if your image is 720px in width you don't do anything, since this is the default.
#Custom Licences
You should enable the javascript debug mode in your local settings: $wgResourceLoaderDebug = true;
(Paraphrasing from a Mail I got)
You can add custom Licences via $wgUploadWizardConfig
variable in your LocalSettings.php.
$wgUploadWizardConfig['licenses']['myown'] = array( 'msg' => 'mwe-upwiz-license-myown' );
Than you need to add the Text Message to your Wiki using
[[Mediawiki:mwe-upwiz-license-myown]]
Also it needs to be added to the list of 3rd Party/Custom Licences
$wgUploadWizardConfig['licensesOwnWork']['licenses'][] = 'myown';