[RFC] Multiple file uploads

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

[RFC] Multiple file uploads

Post by _hsr »

Ticket http://tracker.phpbb.com/browse/PHPBB3-10929
Pull Request https://github.com/phpbb/phpbb/pull/1772

I have written code to add plupload(http://plupload.com) to the posting.php page, and I'd like to have some feedback on the following :

1) The feature having an on/off toggle in ucp
2) enable/disable feature in acp

Here is a log of discussion with an-

Code: Select all

<an-> what is the code for?
<_hsr> the attachment upload improvement, I've added the feature to the html structure of the page
<an-> looks like includejs is not merged yet
<an-> if the js is style-specific see how editor.js is included
<an-> if not style specific see how jquery is included
<an-> e.g. phpBB/styles/subsilver2/template/simple_footer.html:<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<an-> hm
<an-> that is probably a bad exampe
<_hsr> well, its no markup and only javascript
<an-> <script src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"
<_hsr> hmm, that is template specific right ?
<an-> jquery is not template specific
<an-> editor.js probably should not be style specific but it is treated like it is
<an-> we have 3 identical  copies of it, one for each template
<_hsr> oh
<_hsr> btw, this just needs to be in the posting page, it modifies the <div id="attach-panel> section
<an-> put the script tag on the posting page for now
<an-> http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=42603&hilit=includejs is to do it better
<an-> also keep in mind that uploads must function correctly without js
<_hsr> yeah, that's why I'm keeping it JS only, it does need some markup changes, which I do via Javascript
<an-> markup should not be in js
<_hsr> hmm, I'm using the plupload library, it needs to change markup :(
<an-> it can change markup
<an-> but all markup must be specified in templates
<an-> js should only be showing/hiding/moving elements defined in templates
<_hsr> hmm, it wraps a <p> element with a <div> and adds some inline styling to it, does that bother ?
<an-> if plupload does it don't worry about it for now
<an-> you are not modifying plupload, are you?
<_hsr> no, I'm just attaching it to the page, configuring it to use the select file and upload file to represent simliar functions in it
<_hsr> i.e, when JS is enabled, normal upload works fine
<_hsr> * disabled
<an-> is plupload useless without proprietary plugins?
<_hsr> I'm not sure I get it, what proprietary plugins d you say ?
<an-> Allows you to upload files using HTML5 Gears, Silverlight, Flash, BrowserPlus or normal forms,
<an-> gears requires a google service
<an-> the rest are plugins
<_hsr> it uses any one of the sevice
<an-> ok let me rephrase
<an-> does it work on firefox 11 without any plugins installed any different than plain old upload form?
<_hsr> yeah, html5 is the only requirement
<_hsr> its like a nested if else statement
<an->       HTML 4 runtime     You browser doesn't support simple upload forms. Are you using Lynx?
<an-> interesting
<_hsr> the script goes if(html5) else if(flash) else if(silverlight) else if(gears) and so on
<_hsr> and if none are found, it shows a message "No runtimes were found"
<_hsr> which I believe we can set to a custom message or use code to revert back to the old uploader
<_hsr> the INCLUDEJS feature would be a great relief to this :)
<an-> there are a couple more considerations
<an-> 1. the resulting implementation should work offline
<an-> meaning you cannot unconditionally reference anything from third party servers
<an-> all of that stuff must have on/off toggles, probably in acp
<an-> or the entire feature must have an on/off toggle if the above is impractical or renders it useless
<_hsr> hmm, how about add a button/toggle that lets the user choose which type of uploader ?
<_hsr> which, I'd prefer as a user
<an-> why?
<_hsr> consider a case where I use my mobile to browse the forum
<_hsr> I would say multipart uploads are not so good when it comes to mobile browsers
<an-> ok, ucp option then
<an-> i still have a feeling a global on/off will be needed
<_hsr> so global + ucp, like the editors ?
<an-> like what editors?
<_hsr> okay, I think i mixed some things
<_hsr> It would be like,
<_hsr> an option in acp to enable/disable the feature
<_hsr> and another in ucp to choose which type of uploader
<an-> you should create an rfc for this
<an-> post the current status and your planned implementation there
<an-> and paste this entire log also
<_hsr> oh did I mention I'm a GSoC student ?
<an-> if nobody else wants a global toggle and everyone finds ucp toggle sufficient you don't have to do a global toggle
<_hsr> okay, on it
will add the git diff later.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Multiple file uploads

Post by naderman »

Personally I don't think this needs an on/off toggle at all. It should just be the standard way to upload attachments. It certainly doesn't need an on/off toggle for users, as long as it properly detects if it'll work, and falls back to the old mechanism.

Why did you think it requires an option Oleg?

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Multiple file uploads

Post by callumacrae »

naderman wrote:Personally I don't think this needs an on/off toggle at all. It should just be the standard way to upload attachments. It certainly doesn't need an on/off toggle for users, as long as it properly detects if it'll work, and falls back to the old mechanism.

Why did you think it requires an option Oleg?
+1
Made by developers, for developers!
My blog

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Multiple file uploads

Post by DavidIQ »

I don't think it needs an on/off toggle either. Should just be standard issue. I like the idea. Perhaps some Ajax as well?
Image

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Multiple file uploads

Post by imkingdavid »

DavidIQ wrote:I don't think it needs an on/off toggle either. Should just be standard issue. I like the idea. Perhaps some Ajax as well?
+1
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Multiple file uploads

Post by Oleg »

My concern only was that the board must remain usable offline.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Multiple file uploads

Post by DavidIQ »

Hmmm...the title here suggests it's about Multiple file uploads but in reality it's about using some third party uploading solution?

The former (multiple uploads): absolutely.
The later (third party uploading solution): don't like it. Should just be an extension.
Image

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Multiple file uploads

Post by _hsr »

DavidIQ wrote: The later (third party uploading solution): don't like it. Should just be an extension.
From what I could learn from the core files of plupload, it is something we can remodel it in a way that the code is just php + ajax + html5, but then again, html5 wouldn't serve good with IE(8-).

I'm also working on a multifile-multipart upload system from scratch. plupload seems cross-browser and cross-plugin though.
There is a text here !

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Multiple file uploads

Post by DavidIQ »

After a quick discussion on IRC I've realized I've missunderstood what Plupload is. I thought it was a service and it's not. :roll:
No objections ob course.
Image

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Multiple file uploads

Post by brunoais »

I like it. I needs some strict stuff, though.
1st. There are people like me that really hates flash because it's works slowly, consumes too much CPU for simple tasks (including idling). So...
You should add an UCP option so that the user can decide which upload system should be used (according to the user's option).
One possible way -> the user has a selectbox where he can choose one of: html5, flash, silverlight, gears, current
My favorite would be a way to create an ordered list of those options.
As the default way to solve the problem about which way should be used.

With all this I say +1!

Post Reply