Search

Right now symphony only has the mass upload utility to upload many files at once (and process them).

Because this is something a lot of people as for, I decided to write a new one.

I really hate uploadify, so I am writing my own flash uploader aswell.

It’s far from finished (especially the javascript/css part), but I have put a first draft/proof of concept online. (I’m more a php developer, so any help on the js is greatly appreciated!)

EDIT: this extension can be found on github

Huib, I’m going to look at this asap…

One question, in the thread relating to the Mass Upload Utility, there was discussion regarding auto completion of fields like the Reflection Field that wasn’t working due to the Delegates being used, have you been able to tackle this at all?

Just out of curiosity, as a layman, what are your grievances with Uploadify?

From a practical point of view just seems that you’d have a platform there that got all the quirks ironed out and you just have to develop an extension to integrate it into Symphony, you get to do all the good stuff (and glory! ;) ) and not worry about getting the basic fundamentals right? That said perhaps that’s where all the fun is depending on your point of view :)

Best of luck with this, its something that is lacking in Symphony, and if at all possible should be available in a section ( as its own field or part of Subsection Manager ), rather than a separate section like Mass Upload Utility currently is in an effort to streamline the process when creating content.

Just out of curiosity, as a layman, what are your grievances with Uploadify?

Uploadify is mainly focussed on the UI and the javascript part. (the part I would have to customise to work correctly with symphony).

In flash itself, uploading multiple files is a matter of 2! lines of code.

So I figured: why not just handle that part in flash, and write my own javascript handle that integrates better with symphony?

Also, mine allows for localisation (because uloadify uses images for all buttons, this is not really possible. (mine uses html+css for all markup, the upload is just a transparent button laid over it).

My plans for this is to integrate it in the index page of a section (the page the content-manager ends up if the section is chosen from the menu). Then it will generate as many new entries as there are images (just like the mass upload utility). I believe this will make it quite easy for the users to understand the concept.

One question, in the thread relating to the Mass Upload Utility, there was discussion regarding auto completion of fields like the Reflection Field that wasn’t working due to the Delegates being used, have you been able to tackle this at all?

My field will not change anything to any other field. It will only pre-process the images uploaded (the normal file upload field expects an uploaded file as input, mine expects a filename up an already uploaded file).

So, unless I am completely missing something, the section will still work as all other sections, and every other field (except for those that need to be unique) will still work.

My current progress;

  • To the index page I’ve added a new button: “create many”. If this button is clicked, the standard entry editor is opened, and the flash uploader is set to multiple.
  • If an entry is edited later on, the upload field will only allow for one single file (to keep it consistent with the normal workflow in symphony).
  • The list of currently selected items needs work.

index page:

alt text

create new page:

alt text

images selected for upload:

alt text

Please tell me what you think!

Attachments:
upload_many_new_selected.png, upload_many_new.png and upload_many_index.png

You could make use of Stage for the interface :)

Can I get a hold of what you’ve done so far, I wanna play :)

@designermonkey: I think it needs a lot more development before it will work. There are quite a few key concepts that will very likely change.

Either way, I will try to get a working alpha on github asap.

@Nils: Thanks! I’m not really a JS expert, so really figuring out what the stage does (and how;)) will take some time.

It does sound very useful though!

@Huib: If you know how the Subsection Manager looks like, you know what Stage does: it builds the interface and offers a construct and destruct function for handling items (which is what you need for your task). It’s a Symphony focused jQuery plugin and bundles all the needed styles as well.

Ah, sounds good!

Again, I’m really no js ninja, and I find the jquery plugins very hard to read. Could you maybe point me in the right direction?

Right now, I have setup an empty div with a stage class. I tried applying the symphonyStage function to it (with almost all the settings set to false).

For the record, all the uploading will be done using flash. I’m not sure yet how I am going to submit the rest of the data (could be an array of filenames with the standard section data, or I could do it completely in JS.)

Add symphony.stage.js and symphony.stage.css to the page head and try this:

JavaScript

jQuery(document).ready(function() {
    jQuery('.field-yourfieldname div.stage').symphonyStage({
        draggable: false,
        droppable: false,
        constructable: true,
        destructable: true,
        searchable: false,              
    });
});

HTML

<div class="field field-yourfieldname">
    <div class="stage">
        <ul class="selection">
            <li class="item" value="1">
                <span>This is a test entry</span>
            </li>
            <li class="empty message">
                <span>No uploads available</span>
            </li>
            <li class="item template">
                <!-- This is where you create your markup to display each uploaded file.-->
            </li>
        </ul>
    </div>
</div>

P. S.: The need to add a value (which represents the item id) is a bug in Stage that needs to be fixed.

Great to see you’re making progress! I wish I couldve developed my extension further, but if you need help with anything I would be glad to help!

Great to see you’re making progress!

Well, not as much as I would like to, really.

My time is very limited at this moment, but starting next wednesday I will be able to put more time into this extension (and hopefully finally finish it

Wow, nice work! I’m working for a client that needs to upload six images at once for each product, thus this extension would really make my (and his) life a lot easier. :) Can’t wait to use it.

I’m working for a client that needs to upload six images at once for each product

Please keep in mind this extension will create a new entry for every image. This would mean the images will have to be linked using a selectbox link to the other section.

I wanted to have a working alpha version ready today, but I couldn’t get my head around a flash bug, where it refuses to send session information on uploads. If anyone knows a good solution, I would really appreciate it!

As soon as I have that issue taken care of, it’s just a matter of cleaning up code (it’s a mess right now) and making it look pretty (the UI is crap).

Please keep in mind this extension will create a new entry for every image.

Fair enough ;) It would be strange if it wasn’t like this!

Woohoo!

Got it working!

First version will be released on github in a few minutes.

This is a pre-pre-pre alpha. It is NOT stable, not optimized. This release is only to show my progress.

TODO:

  • Rewrite all javascript / actionscript (it’s a mess)
  • Provide feedback to the user on progress and errors
  • Only start uploading if the save entry button is clicked, not after files are selected (see #1 ;))
  • Find a way to get the sessions to work without hacking the core.
  • Various bugfixes (mostly uncaught errors)
  • Display previously saved files when editing an entry.
  • Did I mention I need to clean up the code?

Update:

Done:

  • provide feedback on the user on progress and errors
  • Only start uploading the save button is clicked
  • display previously saved files when editing (still needs some work!)

TODO:

  • clean up
  • Fix editing (editing is currently impossible)
  • Fix single mode (right now, only multi-mode is available)
  • Test with a lot of other fields.

To clarify on the last point: to be able to give visual feedback to the user, I assumed all error styles are the same (div gets a class, description added). Ofcourse, there will always be fields with other styles, so maybe exceptions should be made.

Please let me know what you think!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details