Extension talk:MsUpload
Contents
| Thread title | Replies | Last modified |
|---|---|---|
| Works on MediaWiki 1.19.0 but there seems to be a race condition | 3 | 14:03, 19 May 2012 |
| New Chinese translation | 1 | 09:42, 16 May 2012 |
| Find a bug you may need to fix. | 0 | 04:44, 3 May 2012 |
| I have a question. | 2 | 22:58, 26 April 2012 |
| linked file bugfix, other minor tweaks | 2 | 12:42, 25 April 2012 |
| Works great. Thanks! | 3 | 07:17, 25 April 2012 |
| Upload is not working | 7 | 16:37, 16 April 2012 |
| I find a bug! | 0 | 14:37, 10 April 2012 |
| Error during upload | 5 | 11:29, 9 April 2012 |
| PNG uploading but not accepted after upload | 1 | 11:28, 9 April 2012 |
| Only SysOp can upload ? | 3 | 16:49, 6 March 2012 |
| Chinese translate | 1 | 14:47, 6 March 2012 |
| Find a bug | 1 | 12:59, 6 March 2012 |
| Why this extension doesn't have msupload.i18n.php ? | 2 | 17:57, 23 February 2012 |
| Include Button in WikiEditor | 5 | 09:38, 15 February 2012 |
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).
/** 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',
);
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
}
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)
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!
Very nice job! Using MsUpload 9.0 on MediaWiki 1.18.2. Something like this should really be part of MediaWiki core...
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?
Same Problem for me.
Hi, which browser and browser version do you use? This Extension is not compatible with FCK so far.
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?)
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!
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?
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
Hi, ist it possible to set the rights of this extension that only the SysOp-Group can upload multiple pictures ?
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.
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)
Hi, WikiEditor is supported in the new version (8.4) of MsUpload.
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