Hi guys, I've got an idea for a module and would like to put it to the community before I start work on it. The sort of feedback I'm after is:
- How useful it would be
- Are there are any existing modules I could use instead to avoid duplicating efforts.
- Would it would be easier to help extend an existing module?
- Potential pitfalls
- Whether or not the idea is crazy, hence why it hasn't been implemented before.
Please correct me if any of the assumptions I have made are incorrect.
Objective
I require a solution that enables users to construct a node with text and rich media in a simple user friendly way with the following features:
- Ability to add new media or select from a library of existing media
- Types of media to include are image, video, audio, documents, third-party embeded (e.g. youtube, flickr etc), APIs? (e.g. google maps, statistics etc)
- Default meta data can be applied to media e.g. height, width, alt text.
- Additional meta data can be applied to each instance of media added to a node to configure it's display e.g. for images size of image(imagecache?), position(align, float, clear), caption etc
- Media can be ordered within the node e.g. text, an image, some more text, a video, some more text etc.
Existing solutions
CCK *fields
CCK is very powerful and enables you to create custom content types with all sorts of fields. This is brilliant for things like a product page which always has an image of a certain size in a certain place, but it doesn't give you the freedom to construct a page with text and rich media in a flexible way for the following reasons:
- You have to follow the outline defined by the content type
- A separate field is required for each type of media
- No way of positioning media per node, eg above/below/inline of body, float left/right. You can set the position in the templates/settings for a content type, but it is then fixed for every node of that type.
- Unable to select size/derivative per node. e.g. using imagecache for imagefield. You can set this in the settings for a content type, but it is then fixed for every node of that type.
- Media isn't reusable between nodes
Asset, IMCE, Image Assist and Inline
My main gripe with these modules is that the media is inserted inline into the body as a token/pattern and when the node is rendered it is swapped for relevant HTML by a filter. The potential issues I see with this are:
- A pattern/token inline in the body would be confusing to most users.
- Once added it is difficult/not obvious how to change the meta data associated with that media e.g caption, alignment
- It is difficult to reposition the media once added, and with a WYSIWYG editor it is potentially very easy to break the layout e.g. if the user drags an image to a new position in the body a caption could get left behind separating it from its image. Also dragging media around a WYSIWYG editor could lead to code that isn't symantic, e.g a div within a p tag.
- The data isn't very structured. If you wanted to find all nodes that had a particular image you would have to search all node bodies for a pattern/token with a particular image id.
- Asset only has a stable release for dupal 5. I can't get the development version for drupal 6 to work and it hasn't been updated since November last year.
- IMCE and Image Assist only deal with images.
Media
This module looks really promising and sounds like it could be a great foundation managing media between nodes. The only issue here is that it is in very early planning stages.
Proposal
Create an interface to replace, or to use as an alternative to, the node body field to enable users to build nodes with text and rich media. I have created a mockup of how I envisage this interface and attached it below to aid my explanation. I think the process of building a node should go as follows:
- The user selects create page or which ever content type they would like to create and they are presented with a fairly standard node add form with a title field and a very simple WYSIWYG editor (bold, italic, underline, lists, links, styles, and format) for the node body textarea. Underneath the textarea there are a couple of buttons add text and add media.
- To add media the user presses the add media button and they are presented with a media manager of some sort, either in a modal box or a popup. They can either add new media, or select existing media. Once something has been selected the modalbox/popup closes and a new panel gets inserted after the textarea with a preview of the media and a form to edit the meta data for that instance of the media.
- If the user requires more text under the media then they can press add text and a new WYSIWYG editor is inserted below the media that was added previously.
- This can be repeated until the complete node has been created. If user decides the need to change the order of the text and media then they can drag them up or down in the list, much in the same way as a multiple value cck field, or the blocks admin page.
I look forward to hearing your comments
| Attachment | Size |
|---|---|
| node-body-builder-mockup.jpg | 221.71 KB |

Comments
Yes the Media project is in
Yes the Media project is in early stages, but if you're planning to contribute a new module anyway, it shouldn't hurt to use this API as a base. Additionally, we're striving to make it future-proof by back-porting code from d7, and also by recruiting as many media developers as we can round up. (See the current list at http://groups.drupal.org/node/19746#who-is-media and feel free to add your name!)
The framework is fairly sound (and we're always open to ideas for improvement). See the road map at http://groups.drupal.org/node/19799.
Thanks,
Aaron
Aaron Winborn
Drupal Multimedia (book, in October!)
AaronWinborn.com (blog)
Advomatic (work)
Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic
Great idea, keep it moving forward..
Hi Olly,
I would strongly encourage you to take this impulse and work on a design from a top-down perspective - i.e. not necessarily paying attention to the re-use of existing modules in designing your vision. This will allow you to design what you feel is necessary and then investigate whether existing modules might not be useful in implementing that design.
The lack of a single-module, or better yet, core functionality that provides a comprehensive and intuitive interface for building/editing nodes that assume rich media as a baseline requirement, I think is a considerable deficit for Drupal as a CMS framework in general. Whether it ends up being your vision, or the media module, or core functionality that pulls together this baseline need is less important than starting up this conversation and pushing it forward.
FWIW - I think your proposal above does a good job of hitting many important issues and I'd say that bodes well for your insight and direction.
Additional clarifications
Hi there - I'm working with nievo on designing/developing the system he discusses above, and just wanted to post some additional information/clarifications:
First off, we're not in control of our deadline for having the system in production. We're a small web design shop, and we have several projects coming up that require at least a basic system to be production-ready within a couple of months (customers' deadlines, not ours). Unfortunately, given both the grander scope of the Media project and what we understand to be the current state of the MP code, regrettably it doesn't look like the Media project is going to have a stable production-ready release in time for us to then build a system on top of it, all within timeframe we've been given.
Secondly, it appears we're approaching the issue from a slightly different direction than the Media project, so it's still an open question exactly how much functional overlap there will be between the two projects. In the limit case it would be daft to wait for months for a fully-features Media project, only to find that that only really affects a few small areas of our code.
In case additional info would be useful, we're going to be using this system to build a simple "flow layout" page builder:
The idea (once the asset manager system is done) is to provide a simple page builder module that allows non-developers/clients to build pages either by defining their own assets or selecting from a library of pre-defined ones, then minimally formatting them and floating them left or right to create a simple but flexible flow layout.
The system will offer various hooks (to be determined), be extensible via sub-modules (for example, to define new types of asset), and integration with other important Drupal modules and systems (CCK, Views, Media project, etc) is a major aim.
Given all this, we're planning to:
The timing is the major obstacle - if we had our way we'd wait until MP was production-ready and then build our system on top of that, but alas business requirements have intervened and make this impossible. :-(
However we are committed to supporting the Media project's vision, and to eventually migrating the back-end design of our system so it conforms to that of the Media project as soon as it is a suitable base to build production code from.
Obviously any/all comments are welcome, and if anyone would like further information on our plans please feel free to contact myself or nievo. ;-)
Status Update
Has any further work been done with this project? This concept really needs more exposure. Perhaps a blog post to the drupal planet?
It is a great concept and would definitely add some usability for standard users.
We're working on it ;-)
Yep - we're hard at work on it as I type, and hope to have something release-worthy in a few weeks.
Stay posted. ;-)