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