Search

Hi fellow coders.

Basic idea on the subject is to merge 3 existing fields together:

  • Classic file upload
  • Uploaded files selectbox
  • Unique file upload in a form of on/off checkbox in a section editor.

End user then has two obvious options: upload new file or select from existing ones from upload directory. Cool, isn't it? :)

To achieve UberCoolness it should play well with Image cropper extension.

What do you think?

I'm building something like that at the moment. Basically it's Stage (the Subsection Manager interface) on top of the Uploaded files selectbox, with support for sub-folders and a multi-file uploader. It won't create new entries for each file, but you can attach multiple files to an entry.

I can't say when it's ready, but not too far away.

Hurray! This idea has been in my head for some time. You should chat with Huib, who seems to also be working on something similar. No point in duplicating work ;-)

Here's an excerpt from an email back in 2008 when I suggested to the Symphony guys that the File Manager should include a field that does something similar:

I also had a thought that this extension could provide a way of solving the "how to attach images to a post" conundrum. Section Links work, but as we found with WoTM, need training for client use. The alternative is this:

When the FM extension is installed it also provides a new field type called "File Browser". On the new/edit entry form, this field would display a list of files in a scrollable panel (much like my Inline Section idea http://overture21.com/forum/comments.php?DiscussionID=492). There would also be an Upload form control.

The clever bit is that when adding the File Browser field to a Section, you specify the base directory for files to be uploaded to/browsed from (by default /workspace/uploads/) but the field itself creates a directory for each entry, using a sensible naming convention. For example say we have a "Blog Posts" section with the File Browser field added, and I create a new entry (ID=123). The File Browser field would create the directory:

/workspace/uploads/blog-posts/123/

The list of files would be pulled from this directory, and uploaded files would go into here. Similarly when this field is included in a Data Source, the XML would comprise a list of all of the files and their properties.

An existing problem is that with the Section Link approach, adding images is a two-step process. First create a post, then navigate to the Publish menu and click the "0" in the Images column to add a new images entry. We can get around this using the File Browser. When editing an entry, obviously the /blog-posts/123/ folder already exists. However when creating a new entry we don't yet know the entry ID. Therefore we could create a temporary holding directory in the /manifest/tmp/ folder (using the section handle and date/time as a hash perhaps). When the entry is created, these files are copied into the newly created directory.

Advantages: * assigning files to a post or page is one-step, all from the one page, * users can FTP to this directory as well, * files are neatly categorised (siloed) given context by the section/entry they are assigned to, * no additional data sources required for retrieving the files

Disadvantages: * the data source would be reading from the file system rather than MySQL — performance?, * files can't be associated with more than one "blog post" (nor can they with normal Section Links, unless a 'bridge' section is used), * no additional meta data such as captions or descriptions can be added on a per-file basis, * no facility for DS filtering of files, such as ordering alphabetically or user-specified order (not sure if this would be important)

This is a great use of Stage — looking forward to it!

That is seriously awesome, what you guys do, but for simpler use cases it could be a bit of an overkill.

I'd be happy, if someone could breath some life into my initial idea ;)

Not overkill — I think all three of us have just described identical functionality, albeit in different ways.

Nick, thanks for the "email".

Hurray! This idea has been in my head for some time. You should chat with Huib, who seems to also be working on something similar. No point in duplicating work ;-)

AFAIK Huibs extension creates a new entry for each uploaded file. Which is a different beast. I won't do that, so there won't be so much overlap.

That is seriously awesome, what you guys do, but for simpler use cases it could be a bit of an overkill.

I do my best to make it easy to use. :-)

Ok.. Only the image cropping bit must get some proper attention :) End users totally love the option to NOT use their inexistent Photoshop to properly frame their 4 Mb camera stuff. :)

Ok.. Only the image cropping bit must get some proper attention :)

Well, I did the Image Cropper... It will be supported. But for technical reasons probably only for the "single select" mode.

Ok, I can now rest in peace :)

@klaftertief: after the email stuff I am working on right now, I planned on reworking the extension from the ground up.

So, if you want to join forces, I am all ears!

@klaftertief, @creativedutchmen is this being developed at the moment? The ubercoolfield (with auto resizing/cropping images) would be great for a current project of mine ;)

Nope, I'm not working on it currently. It's still on my todo-list, but I can't promise any timeframe. Maybe the not so well known Image Upload field is of any help?

Thanks!

The Image Upload field looks nice. I am currently using the Resize Upload extension but the former looks a bit nicer.

(I'm still slightly bummed at the difficulty in finding extensions this way. Imagine how difficult it must be for someone new to Symphony and not constantly scouting the Forums as I am ;) )

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