Imagecache Image assist counterpart module

Events happening in the community are now at Drupal community events on www.drupal.org.
ezra-g's picture

I propose a module that provides both an input filter and a widget used on the node edit form.

The filter would contain the path to an image file and the name or id of an imagecache preset.

The widget would allow the user to view images that exist on the site, and select which one should be inserted into the node body at a particular point, along with the preset that should apply to the display of this image. The widget would place the appropriate tag to be consumed by the filter when the node is rendered.

The visual view of existing images could potentially be specified in a View.

An alternative would be to have a noderefernce field that, in addition to displaying a list of matching node titles, would display a reduced-size (thumbnail) image corresponding to the full size image in an image node, consisting of a CCK imagefied. (I once wrote a custom autocomplete function and replaced that of a nodereference field but I couldn't output an img tag in JSON since drupal_to_js sanitizes the output for good reason...)

Comments

Asset module

matt v.'s picture

If you haven't already, you might want to check out the Asset module, to see how your ideas compare to what's being worked on there. I think there is a fair amount of overlap with what you're proposing. I'd encourage you (or anyone for that matter) to test Asset or at least glance over the documentation to get an idea of what it is capable of. Asset has a lot of potential. If nothing else, maybe it could spark smoe additional ideas for your proposal.

exactly my suggestion

drewish's picture

+1 i was just going to say the same thing. there's a TON of existing media modules at this point. i'd rather see some SoC projects to extend the existing ones rather than start afresh.

I'll be addressing this when

ezra-g's picture

I'll be addressing this when I revise the proposal, but there is no existing module I'm aware of that allows people to visually browse existing images on a site. By visually browse, I mean display the content of those images, as opposed to just their titles.

Stay tuned

ezra-g's picture

( Stay tuned for a revised proposal including text and a wireframe later this week.)

Pardon my flurry of

ezra-g's picture

Pardon my flurry of responses here...I meant to say above that there is no existing module that allows someone to visually browse imagefield images. I am to clarify all of this with the rewritten proposal.

Try image assist module, you

couzinhub's picture

Try image assist module, you can browse image by icons and re-use already uploaded images

The Drupal Agency >> www.raincitystudios.com <<
Me on the Web >> www.couzinhub.com <<

advice for feedback

greggles's picture

As people are thinking of feedback on this idea, be sure that you're thinking of "what would the ideal system be for inserting images into content" because that's what you want to do (right?). That's the UI question and then the implementation detail is that this will be the ideal system for inserting imagefield images into content.

Also, I crossposted this into the image group and the usability group to get more feedback and ideas on how to do this right.

--
Open Prediction Markets | Drupal Dashboard

I like the Image + Image Assist + TinyMCE recipe...

boris mann's picture

...except that I wish that Image Assist also supported content types that use imagefields / imagecache. And this is for in-body insertion of images + image re-use.

+1 on this solutions Images

couzinhub's picture

+1 on this solutions

Images are nodes, and you can browse all uploaded images, add some style, like float left/right or center, or none, and it's all editable through tinyMCE... all that just need some fine tuning. Images can be displayed inline as links that you can customize to show either the original file, could be in a pop up, or another preset.
All is customizable with css. There is even the psd file of the image_assist icon in the module.

Only downside, it doesn't uses image cache, but image preset... so no cropping :'( but you can resize as needed also using tinymce.

This is for inline images, in paralelle, I use imagefield for main images.

The Drupal Agency >> www.raincitystudios.com <<
Me on the Web >> www.couzinhub.com <<

This sounds like the inline

catch's picture

This sounds like the inline API that Sun's been talking about. http://drupal.org/node/80170

afaik it's fairly well specced, but not a lot of code yet. So would be worth seeing if that could be turned into a GSoC project.

= Inline API

sun's picture

Regarding the hidden feature of a "widget to define a macro tag for displaying a(ny) content (including images) in a content [inline]", this is exactly what Inline API is all about - but not limited to images. I've posted a draft about it on http://groups.drupal.org/node/8707 a while ago. There's already some code in Inline 5.x-2.x that implements parts of this draft.

Unfortunately, I'm on vacation currently and can't elaborate further. I'll be back on April 1st - you might check whether Inline API covers all of your ideas or what's missing in the meantime.

@catch: Thank you very much for the pointer to this thread!

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

+1 for asset module

eigentor's picture

I've been trying it out and so far it appears quite promising.
What would be ideal to me is to put more developers on it or maybe agree on an extension structure. They appear to have an integrative attitude - integrate imagecache, and so on.

If a decent team would be working on this - or another module that's worth it - given that one can agree on a vision - would sure make a kick-ass inline media handling (plus a core mediabrowser for all uploaded media files) hah, sweet dreams are made of these...

Life is a process

Life is a journey, not a destination

interesting existing filter

greggles's picture

I hadn't seen this before, so please pardon me if y'all are already aware of it: http://project.para.ro/img that's a demo for the http://drupal.org/project/img_filter

The movie does a nice job showing how it works.

It sounds like there are some existing but disparate modules which perhaps could be improved upon.

--
Open Prediction Markets | Drupal Dashboard

I've seen it, and it's a

catch's picture

I've seen it, and it's a fork of inline.module http://drupal.org/node/150624
Not sure how much they've diverged since then.

Seems like ulink is trying to solve the same problem as well. So probably at least part of the project is likely to involve comparing these and trying to unify and/or fill in the gaps with what they're doing.

Thanks for all of these

ezra-g's picture

Thanks for all of these great leads! I'll investigate this weekend.

This is also already covered

dldege's picture

This is also already covered in last years uLink project which provided a filter format for doing exactly what you described and has imagecache support, token support, and supports more then just image types.

Dan DeGeest
Software Developer
Somewhere or Another

it looks uLink provides the

ezra-g's picture

it looks uLink provides the filter functionality but not the image selection interface, right?

Sorta, part of uLink was to

dldege's picture

Sorta, part of uLink was to do JS autocomplete on the filter as you typed it. ie, you could type [l|file/ and it would start doing an autocomplete with the files in your files table. It didn't do a graphical file browser of any kind. There is room to grow on this issue so I'm no trying to deter you, just provide useful information. uLink is also a little harder then point and click which might be more intuitive with some sort of file browser. There are a lot of filters out there, inline, uLink, etc. It would be nice to get all of this sorted out.

Dan DeGeest
Software Developer
Somewhere or Another

It seems like evaluating the

ezra-g's picture

It seems like evaluating the best way to develop this specified functionality would be the first phase of the SOC project, if this were to be accepted. Do people agree?

I marked this needs work...

webchick's picture

There's a lot of posts here to the effect that "X module already does Y part.." Is there anything here we can actually propose as a SoC project?

Since it seems like the

ezra-g's picture

Since it seems like the input filter I described is likely already provided by another module, it seems like the user interface would be the main part of this project. It would probably happen in these phases:

1) Figure out the best existing solutions with which to integrate
2) Wireframes\design discussion
3) Building

I will give Asset module another shot -- I experienced a boat load of separate issues trying to get it to function properly and had to stop.

This could be a good SoC

alex_b's picture

This could be a good SoC project if it builds on existing solutions and aims for a good UI. Who has been really happy with the image assist UI? I think a simple and intuitive way of interacting with images would be a big win. The proposal needs work.

A clean UI on top of a

bonobo's picture

A clean UI on top of a pluggable backend would definitely be nice --

In some ways, this feels more like a usability-centered project -- between imce, img_assist, tiny and fckeditor native image handling, asset, the image module, imagefield, inline, etc there are already a variety of methods for handling images.

This project could also benefit from some specific use cases -- what are the exact needs to be met?


FunnyMonkey
Tools for Teachers

Response

ezra-g's picture

Thank you to everyone who responded thoughtfully to my proposal!

I'd like to respond to everyone's questions at once. If you feel your feedback has not been addressed, please let me know.

Use case: A user wants to easily add inline to a post, images that exist on the site as CCK imagefield content, and specify an imagecache preset for the display of those inline images.

The goal of this module is to provide functionality that allows the user to:
- browse existing CCK imagefield images visually -- (using thumbnails of the images)
- select an image and specify an imagecache preset to be used when displaying that image.
- Specify a point in the body of a post and insert that image and imagecache preset pair inline into the body.

The main functionality provided by this module would be an interface to achieve all of the above. This interface would communicate the user's selection of image and imagecache preset through a structured tag that would be consumed by the Inline module, which provides a filter for images and imagecache presets.
The interface should achieve a high level of usability. Usability testing could be incorporated into the SOC schedule.

The interface might provide the following filters for narrowing down the choice of images:
-node title contains (text)
-contains taxonomy terms (text autocomplete, select field?)
-My vs Other users' images

The module that provides functionality most similar to what's described here is image_assist.module. This functionality has been requested by several people in a feature request at http://drupal.org/node/208136 . Image assist does not work with CCK imagefield content. See the module review list below for more information about other modules mentioned in the discussion of this proposal.

Inline is the best choice as the module providing the input filter because its maintainer, sun (who also maintains image_assist) is working towards a carefully thought out Inline API. Inline API aims to be an extensible way of adding content inline to posts. An extensible Inline API contrasts with the use of multiple unrelated modules that provide proprietary input filters

Sun intends for the Inline API to integrate into Gábor Hojtsy's battle plan for a WYSIWYG editor in Drupal core ( http://hojtsy.hu/blog/2008-feb-04/supporting-wysiwyg-editing-better-drup...) .

For details about the Inline API, read http://drupal.org/node/80170 (description of the API) and http://groups.drupal.org/node/8707 (“sun's vision for handling embedded/inline content and Wysiwyg in Drupal”).

While this is project is *not* intended as a core contribution, I see it as the primary benefit that it would integrate with functionality intended for an accepted DRUPAL WYSIWYG system; this functionality is a type or component of WYSIWYG.

At http://drupal.org/node/80170 , describing the InlineAPI, sun said "A inline_assist.module leveraging this API is also worth thinking about (Obviously this would be based on the great work of img_assist.module and supersede it)."
Given that this project is related and may be the "next generation" of image_assist, is it best to wait for sun's feedback\work on InlineAPI, and thus not use it for GSOC this summer?

Modules mentioned in this discussion:

1. Inline (maintained by sun) – Provides an input filter
-Works with any image on a Drupal site (CCK or otherwise)
-Works with imagecache
-Will use the inline API: Extensible filter system, incorporates Gabor's Battle Plan for a Core WYSIWYG

2. Image Assist – (Maintained by sun) – Provides an interface
-The interface allows the user to:
--browse images visually
--specify a size (based on image.module's defined sizes)
--specify an alignment
-Funtionality is similar to what's being proposed here
-Doesn't work with imagefield, imagecache

3.uLink – Provides an input filter
-Has imagecache support
-Has extra features that are unnecessary to the project propose here, such as autocomplete
-Extensible filter system could be relevant material for sun's work on Inline API

4.Asset
-In my testing, I was unable to achieve a display of image thumbnails and am not clear that the module actually provides this. Can anyone attest otherwise?
-At 600+kb zipped, tis module is bigger than Drupal Core (and many of the images it's likely to manage)

5.(img Package) IMG filter
-doesn't work with cck imagefield
-instead, allows user to upload images as attachments to the node being edited
-Let's users specify image alignment
-uses custom filter (which makes sense given its functionality)
-Great module!
-Features are well documented!

In response to billfitzgerald's question about pluggability: What component(s) of this project do you think should be pluggable. Extensibility is one of the most important values for a Drupal project\component, and I see this module's "participation in extensibility" as being fulfilled by being built on top of Inline which will become the Inline API. Ideally, it would be built on top of the Inline API, but being built to use the Inline filter seems like the next best approach. Ideally, we would also have sun's input on all of this but as mentioned in this discussion, he is on vacation until the day after the GSOC application deadline.

Perhaps the interface could be pluggable in some way.

Part or all of the interface could be defined by a view with exposed filters such as search by title, search by taxonomy term, etc. Using a view offers the end user more complete control over the module's interface.

With a popup window that contains a list view, a jQuery event could bind to the click event for the .view-field divs containing the imagefield image and onclick, close the popup window and populate the image information appropriately into the body of the post.

Alternatively, the interface could be defined by a form (of course, modifiable via the Form API). This approach offers complete control over the interface to developers and makes it easier to update form elements asynchronously. For example: the available images display could be updated to show only those images that match the text in a 'title' search field as the user types.
A non-view based approach does not preclude the form from using views as components. For example, a custom form element could refer to a callback function that uses user-submitted data as filter text to be programatically submitted to a view and returns the results of that view as HTML.

Just marked this 'needs

ezra-g's picture

Just marked this 'needs review'. I thought I'd already done that.

After further thought, I

ezra-g's picture

After further thought, I think it would be inappropriate to proceed on this project without sun's involvement, since it would cover so much of his development territory.

Marking as 'rejected'.

Join forces!

sun's picture

That's a great overview you've posted here. While this proposal unfortunately has not been turned into a GSoC project, I'd still like to invite you to join forces on this topic. I think you've gained a lot of knowledge about Inline API, Image assist, and other input filters during this analysis - and envisioning the big picture is definitely required for anyone who wants to join these efforts.

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

FYI :

subscribe

stevenator's picture

subscribe

Image

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: