Extension talk:MsUpload

From MediaWiki.org
Jump to: navigation, search
Start a new discussion

Contents

Thread titleRepliesLast modified
Works on MediaWiki 1.19.0 but there seems to be a race condition314:03, 19 May 2012
New Chinese translation109:42, 16 May 2012
Find a bug you may need to fix.004:44, 3 May 2012
I have a question.222:58, 26 April 2012
linked file bugfix, other minor tweaks212:42, 25 April 2012
Works great. Thanks!307:17, 25 April 2012
Upload is not working716:37, 16 April 2012
I find a bug!014:37, 10 April 2012
Error during upload511:29, 9 April 2012
PNG uploading but not accepted after upload111:28, 9 April 2012
Only SysOp can upload ?316:49, 6 March 2012
Chinese translate114:47, 6 March 2012
Find a bug112:59, 6 March 2012
Why this extension doesn't have msupload.i18n.php ?217:57, 23 February 2012
Include Button in WikiEditor509:38, 15 February 2012

Works on MediaWiki 1.19.0 but there seems to be a race condition

Works fine with the MediaWiki 1.19.0, but often the Button is missing in the WikiEditor, even after deleting the Browser cache and reloading (tested with FF, IE 9 and Google Chrome).

91.20.37.9110:35, 5 May 2012

+1, seems to be random but definitely occurs.

124.169.136.15423:58, 12 May 2012

Please use Version 9.2! The code for toolbar customization has changed slightly in mw1.19

Ratin (talk)09:50, 16 May 2012
 
 

New Chinese translation

 /** Chinese Simplified 
  * @author 晒太阳的冰 (zoglun@gmail.com)
  */

 $messages['zh-hans'] = array(
           'msu-desc' => '开启轻松上传',
       'msu-button_title' => '上传图片',
       'msu-insert_link' => '插入图片的链接',
       'msu-insert_gallery' => '插入图片画廊',
       'msu-insert_picture' =>  '插入图片',
       'msu-insert_movie' => '插入视频',
       'msu-cancel_upload' => '取消上传',
       'msu-upload_possible' => '文件没有问题,可以被上传',
       'msu-ext_not_allowed' => '只有下列类型文件可以被上传:',
       'msu-upload_this' => '点这里上传这个文件',
       'msu-upload_all' => '点这里上传所有文件',
       'msu-dropzone' => '拖动文件到这里上传',  
       'msu-comment' => 'MsUpload',
 );

 /** Chinese Traditional
  * @author 晒太阳的冰 (zoglun@gmail.com)
 */

 $messages['zh-hant'] = array(
           'msu-desc' => '開啟輕鬆上傳',
       'msu-button_title' => '上傳圖片',
       'msu-insert_link' => '插入該圖之鏈接',
       'msu-insert_gallery' => '插入圖片畫廊(gallery)',
       'msu-insert_picture' =>  '插入圖片',
       'msu-insert_movie' => '插入視頻',
       'msu-cancel_upload' => '取消上傳',
       'msu-upload_possible' => '經檢查閣下所選圖片可被上傳',
       'msu-ext_not_allowed' => '只有下列類型文件可被上傳:',
       'msu-upload_this' => '點此上傳該文件',
       'msu-upload_all' => '點此上傳所有文件',
       'msu-dropzone' => '拖動文件到這裡', 
       'msu-comment' => 'MsUpload',
 );
Zoglun (talk)03:45, 3 May 2012

Thanks again for your translation!

93.104.23.6509:42, 16 May 2012
 

Find a bug you may need to fix.

When I click Insert link this extension add [[:Datei:26026304_p2.jpg]]

The datei did not work in Chinese and other langue version. But English word media work fine in every langue.

You may need to change it to [[media:26026304_p2.jpg]]

The problem can be find here: MsUpload/js/msupload.js

line 213 to 218

                   $(document.createElement("a")).text(mw.msg('msu-insert_link')).click(function(e) { //click
                            if(msu_vars.use_mslinks == 'true'){
                                msu_vorlage_insert('{{#l:'+file.name+'}}',,); // insert link             
                            } else {
                                msu_vorlage_insert('File:'+file.name+'',,); // insert link
                            }
Zoglun (talk)04:07, 3 May 2012

I have a question.

It seems that the 9.0 version did not use msupload.api.php. Then, The 25 line $comment = "MsUpload"; did not have effect any more.

Is there any way to add a comment like $comment = "upload by MsUpload";?(in 9.0 version)

Zoglun (talk)15:39, 10 April 2012

You are right that there is no msupload.api.php in 9.0 version. You can either add

comment: 'upload by MsUpload',

to the multipart_params (line 135) or use 9.1 version where you can change the comment in msupload.i18n.php

Ratin (talk)12:14, 25 April 2012

thank you!

Zoglun (talk)22:58, 26 April 2012
 
 

linked file bugfix, other minor tweaks

Thanks for this great extension! I have installed it on a local city wiki and after a few tweaks, it works great. Here's what I did:

  • The "insert link" option was outputting ":Datei:FILENAME.jpg" instead of ":File:FILENAME.JPG" (for unaware observers, "Datei" is the "File" in German). All other messages from MsUpload were in English. So I went into /extensions/MsUpload/js/msupload.js and changed ":Datei:" to ":File:".
  • Also in /extensions/MsUpload/js/msupload.js, I changed "Image:" and "Media:" to "File:". Image and Media are pseudo-namespaces, or aliases, for many (most?) wikis, including ours. It worked for us using "Image:" and "Media:", but I thought since File is the namespace we use, I would go ahead and have it output "File:" for consistency.
  • English localization. In /extensions/MsUpload/msupload.i18n.php, I changed the following messages, for better grammar:
        'msu-ext_not_allowed' => 'Only following filetypes are allowed:',
        'msu-upload_this' => 'Click here for upload this file',
                'msu-upload_all' => 'Click here for upload all files',
to:
        'msu-ext_not_allowed' => 'Only the following filetypes are allowed:',
        'msu-upload_this' => 'Click here to upload this file',
                'msu-upload_all' => 'Click here to upload all files',
  • Looking at the drag/drop box in the edit page, where it was not labeled, it wasn't clear to me what its purpose was. So I added a message in it. In /extensions/MsUpload/js/msupload.js, I changed this line:
                   var upload_drop = $(document.createElement("div")).attr("id","upload_drop").attr("class","drop").html(' ').insertAfter(status_div); 
to:
                   var upload_drop = $(document.createElement("div")).attr("id","upload_drop").attr("class","drop").html('drop image here').insertAfter(status_div); 
I then made the text white by adding "color: #fff;" to the ".drop" element in /extensions/MsUpload/css/msupload.css.

With these changes, I'm very happy with this upload tool. It's a very nice feature. I especially like how it warns when an image has a "DSCN..." filename, and the progress bar for uploading the file. Thank you for making this very useful extension!

kotra (talk)06:08, 23 April 2012

Good work, kotra!

Davydog (talk)14:45, 23 April 2012
 

Thanks for your bugfixes. Your changes are implemented in the 9.1 version.

Ratin (talk)12:42, 25 April 2012
 

Works great. Thanks!

Very nice job! Using MsUpload 9.0 on MediaWiki 1.18.2. Something like this should really be part of MediaWiki core...

NocNokNeo (talk)02:31, 10 April 2012

I think so too! Great work! Keep the updates rolling ;-)

SmartK (talk)11:49, 10 April 2012

Fat cool and very useful! Thank you for this good work!

Dg.de (talk)19:30, 13 April 2012

Thanks for your positive feedback! :-)

Ratin (talk)07:17, 25 April 2012
 
 
 

Upload is not working

Hi, The browser allows me to search for my images but after clicking on the upload button they are not uploaded into the wiki database. (the bars with the image name are in green), what can I do to make it work? Does this extension compatible with rich editors like FCKeditor?

195.42.56.4315:01, 25 January 2012

Same Problem for me.

92.252.97.14416:26, 31 January 2012

yepp, didi not work with MediaWiki 1.18.1 - i see the upload process - but no files in the /images direcrory

BLinz19:00, 4 February 2012
 

Hi, which browser and browser version do you use? This Extension is not compatible with FCK so far.

Ratin15:08, 8 February 2012

Hi, firefox 10.0 doesnt work. Looks like the extension is actually uploading, though very fast, somewhere. But there is no such file anywhere in the mediawiki dirs. neither there is a file:abc.jpg in the specific mediawiki. (i use restrict group permissions, maybe that helps?)

89.166.198.22311:08, 21 February 2012

Works like charm for me now since ver 8.8. Thank you so much!

92.252.109.22910:32, 2 March 2012

Iam glad to hear that!

Ratin (talk)14:36, 2 March 2012

Hi, I am using MediaWiki 1.17 and ver 8.4 but I still encounter the same problem: no error message but the files won't upload. No chance even with 8.7. Tried from Firefox, Safari. Do I really need to upgrade the whole wiki to run 8.8?

212.243.68.21016:37, 16 April 2012
 
 
 
 
 

I find a bug!

When user upload a file which have same name as exist file. This extension will simply upload the picture as new version.

For example, When I upload file: rin.jpg there is another exist rin.jpg in my wiki. Then this extension simple upload the rin.jpg as a new version of old rin.jpg.

I hope, when duplicate happened, this extension can ask user change their file name.

That's it! This is a great extension! Hope you can fix this tiny bug soon!

Zoglun (talk)14:37, 10 April 2012

Error during upload

The following error comes up when I click on the File upload in the editor after selecting a file and confirm the upload:

Error: getToken(); #echo $wgUser->getName(); global $sCreateIndexFilepath; $sCreateIndexFilepath = false; $ignorewarnings = true; $text = ""; $comment = "MsUpload"; $watch = false; $error = false; if (isset($_FILES['file']['name'])) { $filename = $_FILES['file']['name']; if ($_POST['name'] != $filename) { //name was changed $filename = $_POST['name']; //echo 'changed!'; } $token = $wgUser->editToken(); $wgEnableWriteAPI = true; if($version[1] == '17'){ #only version 1.17 $params = new FauxRequest(array ( 'action' => 'upload', 'file' => $_FILES['file'], 'filename' => $filename, 'filesize' => $_FILES['file']['size'], 'comment'=> $comment, 'ignorewarnings'=> true, //sonst wird nix ueberschrieben 'token' => $token,//$token."%2B%5C", )); }else{ $params = new FauxRequest(array ( 'action' => 'upload', 'file' => $_FILES['file'], 'filename' => $filename, 'filesize' => $_FILES['file']['size'], 'comment'=> $comment, 'ignorewarnings'=> true, //sonst wird nix ueberschrieben 'token' => $token,//$token."%2B%5C", ), true, $_SESSION ); } $enableWrite = true; // This is set to false by default, in the ApiMain constructor $api = new ApiMain($params,$enableWrite); #$api = new ApiMain($params); $api->execute(); $data = & $api->getResultData(); //$ret = Array("filename" => $filename, "data" => $data ); echo json_encode($data); return $data; //.$data; } exit(0); ?>

How can I fix it?

195.212.29.18416:46, 12 March 2012

This error shows the content of the msupload.api.php file. Hmmm ... Can you tell me which browser, browserversion and mediawikiversion you use?

Ratin (talk)15:40, 15 March 2012

I also get the same message IE 9 firefox 10 Mediawiki 18.1 hosted on IIS 7.5 PHP 5.2 Mysql 5.5

75.167.152.22500:41, 21 March 2012
 

Hi there Ratin,

Any news on this?

188.39.17.10107:59, 29 March 2012

Hi, I could reproduce this error on MW 18.2 and I am working hard on a new version where this bug is solved.

Ratin (talk)09:41, 29 March 2012
 

Hi there, please try the latest version. There is no msupload.api.php file needed any more.!

Ratin (talk)11:29, 9 April 2012
 
 
 

PNG uploading but not accepted after upload

Hi, I go to upload a png image and it uploads. I then "insert link" or "insert image" but it doesn't add the link or image into the text below. The other file extensions work fine such as JPG or gif.

Chrome 17

Any suggestions?

Dan

Djdanster (talk)15:54, 22 March 2012

Hi, is png in the $wgFileExtensions array? Can you please try the new verison (msupload 9.0) Martin

Ratin (talk)11:28, 9 April 2012
 

Only SysOp can upload ?

Hi, ist it possible to set the rights of this extension that only the SysOp-Group can upload multiple pictures ?

hollosch (talk)20:56, 26 February 2012

It is not possible but by setting:

$wgGroupPermissions['user']['upload'] = false;

in the LocalSettings.php you could shut out normal users from uploading (but single-upload as well)

Ratin (talk)19:22, 28 February 2012

hmmmm.. that's not perfect, because users should upload (single-upload) files... and they should choose a license for the file... maybe it is planned for a upcoming version ?

thx

hollosch (talk)23:18, 28 February 2012

Hmmm this is not planned for the next versions ... sorry!

Ratin (talk)13:00, 6 March 2012
 
 
 

Chinese translate

make sure you set msupload.i18n.php to UTF-8 format

/** Chinese Simplified by 晒太阳的冰 (zoglun@gmail.com)
 */

$messages['zh-hans'] = array(
       'msu-button_title' => '上传图片',
       'msu-insert_link' => '插入图片的链接',
       'msu-insert_gallery' => '插入图片画廊',
       'msu-insert_picture' =>  '插入图片',
       'msu-insert_movie' => '插入视频',
       'msu-cancel_upload' => '取消上传',
       'msu-upload_possible' => '文件没有问题,可以被上传',
       'msu-ext_not_allowed' => '只有下列类型文件可以被上传:',
       'msu-upload_this' => '点这里上传这个文件',
                'msu-upload_all' => '点这里上传所有文件', 
);
/** Chinese Traditional
*/

$messages['zh-hant'] = array(
       'msu-button_title' => '上傳圖片',
       'msu-insert_link' => '插入該圖之鏈接',
       'msu-insert_gallery' => '插入圖片畫廊(gallery)',
       'msu-insert_picture' =>  '插入圖片',
       'msu-insert_movie' => '插入視頻',
       'msu-cancel_upload' => '取消上傳',
       'msu-upload_possible' => '經檢查閣下所選圖片可被上傳',
       'msu-ext_not_allowed' => '只有下列類型文件可被上傳:',
       'msu-upload_this' => '點此上傳該文件',
                'msu-upload_all' => '點此上傳所有文件', 
);


And one more question: How to use the wgMSU_ShowAutoKat? I set it to true but no category been added to the image.

Zoglun (talk)18:33, 23 February 2012

xie xie ni, for publishing your translation. I implemented the translation in version 8.9

Is a checkbox with the category-name displayed for each file?

Ratin (talk)14:47, 6 March 2012
 

Find a bug

http://i.imgur.com/SXq9e.png

The white bar block the heading Level 2

It seems that you need to change the z-index number.

Zoglun (talk)18:36, 28 February 2012

You were right - I had to change the z-index number of the headings-dropdown. This is solved in Version 8.9!

Ratin (talk)12:59, 6 March 2012
 

Why this extension doesn't have msupload.i18n.php ?

How can I translate this extension in to English or Chinese?

Zoglun (talk)05:01, 17 February 2012

Hi, in the latest version (8.8) you can find a msupload.i18n.php-file to translate the messages.

Ratin (talk)16:25, 22 February 2012

Thank you!

Zoglun (talk)17:57, 23 February 2012
 
 

Include Button in WikiEditor

Hello and thanks for this nice Plugin. Can You tell me how to include the Upload-Button into the nearly standard Editor: Extension:WikiEditor? Thanks! 193.22.166.88 09:22, 26 January 2012 (UTC)

193.22.166.8809:22, 26 January 2012

Same Problem!

71.201.158.5204:20, 27 January 2012
 

Hi, WikiEditor is supported in the new version (8.4) of MsUpload.

Ratin15:20, 8 February 2012

Hi Ratin,

to avoid having to close and open the filelist again to display it after dragging a file, you should add the last 2 lines to the QueueChanged event in the MsUpload.js:


     uploader.bind('QueueChanged', function(up) {
                

        if(up.files.length==1){
        start_button.html('Hier klicken um diese Datei hochzuladen').show();
        }else if(up.files.length>1){
        start_button.html('Hier klicken um alle Dateien hochzuladen').show();
        }else{
         start_button.hide();
         gallery_insert.hide();
        }
        $('#wikiEditor-ui-toolbar').find('.sections').css('height','100%');;
        up.refresh();
       
      });

GreetinX,

Alex

84.200.212.9813:26, 9 February 2012

Hi Alex,

thanks a lot for your great hint!

Martin

Ratin18:56, 10 February 2012

Hab mir nebenbei auch noch für PDFs einen Filter dazugebaut damit ich sie als [[Media:file]] einbetten kann (damit der Link nicht auf die File Page sondern gleich auf das PDF geht). Könntest das ev. in deinen trunk dazubauen?

217.92.240.16009:37, 15 February 2012
 
 
 
 
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox