Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plupload integration #2

Merged
merged 11 commits into from
Jun 7, 2014
Merged

Plupload integration #2

merged 11 commits into from
Jun 7, 2014

Conversation

YaNoo
Copy link

@YaNoo YaNoo commented Jun 4, 2014

Hi,

Here is a plupload integration.
I removed uploadify references except in readme files.

You can ignore .gitignore and .project file as these are jsute for my eclipse environnement.

Thks

YaNoo

@iionly
Copy link
Owner

iionly commented Jun 4, 2014

Wow. That's great! I wanted to replace Uploadify with Plupload anyway. You saved me much time!

I made some brief tests and it seems to work (almost) fine. A minor issue is that you hardcoded max_file_size to 10mb. But this is easy to fix (the corresonding Tidypics plugin setting is still fetched at the beginning of uploading.php). The chunking option seems not to work though. As I understand the docs there some additional server-side handling necessary to caternate the chunks. But it works fine also for larger files with chunking disabled.

If you want to, you can fix it before I merge the PR. I'm afraid I might have the time for the merge next weekend at the earliest anyway (but I try to do it next weekend!). If you don't want to make the changes I can do it, of course.

@YaNoo
Copy link
Author

YaNoo commented Jun 5, 2014

Hi,

I removed the chunk size as it seems to be used for large files. Maybe we should investigate if you want to add the functionnality to upload zip files.

I changed the max_file_size, import lang file for plupload and fixed harded code string.
I let you update the de.php file, I can write and maintain the fr.php if you want.

@iionly
Copy link
Owner

iionly commented Jun 5, 2014

By default the chucking splits the file uploads into 1mb chunks. For smaller files it worked even with chunking enabled as they are provided in one part. Only for larger files there's some server-side handling necessary. On the plupload site is an example in php that might work. But I don't know if the chunking option is really necessary.

I think the plupload uploader can't unzip zip files, so it wouldn't work to allow uploading of zip files. The example on the plupload site regarding configuration of allowed type of files is just a general example that included zip files. But I don't think it will work for Tidypics.

The language option depending on get_current_language() is very nice to have. I wanted to include that, too. But I think it's necessary to check the existence of the translation file before trying to register the corresponding translation file. Such a check is included in the tinymce plugin (or my extended_tinymce plugin). I can implement a corresponding check.

If you could provide a fr.php, it would be very nice. I don't speak French, so I can't create it myself. I have been sent a Spanish language file for Tidypics that I intended to include in the next release of Tidypics, too. Some strings are not yet translated though (and of course any new strings will be missing, too). But I hope the guy who provided me with the Spanish file will help me out once more. I'll also update the German language file.

@iionly
Copy link
Owner

iionly commented Jun 5, 2014

A bit nicer UI might also be nice to have. On the plupload site is a demo with different themes. Do you know how it's possible to include one of these themes? The "Smoothness" theme might fit best with Elgg's default theme as it's quite neutral regarding the colors used. I don't know if it might be better to include the plupload CSS definitions into the Tidypics CSS file (regardless if the default CSS classes or a plupload theme is used). This might allow better customization via an Elgg theme plugin.

@YaNoo
Copy link
Author

YaNoo commented Jun 6, 2014

By importing zip file, I thought about uploading a zip file and uncompress it in server side. For bulk upload purpose if a user request this fonctionnality one day.

I changed the template by using the plupload instead of pluploadQueue. I imported the css files of the jquery-ui because plupload use it for theming. I don't know if it's a good practice.

I let you make the check for existing translation files if you have already done it for another plugin.

@iionly iionly merged commit 26624dc into iionly:master Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants