Drupal 5.1
Inline 5.x.1-1
Imagecache 5.x.1-2
Imagefield 5.x.1-1
I have a custom content type with an imagefield named image. I can attach an image and the imagecache module creates the thumbnail, medium and large versions of the picture. I have inline enabled for the current input filter, and I put in [inline:1] or [inline:imagename.jpg] and it can't find the file.
If I attach the file as a file attachment to the node it works. While this is great, it is not the desired means. I would like to have the user upload to the imagefield and have the [inline:1] find the image. From what I have read this should work. Any suggestions are appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | simple_media.zip | 6.05 KB | mtsanford |
Comments
Comment #1
russew commentedSorry, in anticipation of you next question, the error message in the node display is.
NOT FOUND: 1
Comment #2
sunI'm sorry, there is no CCK imagefield support yet. Of course patches are greatly appreciated.
Comment #3
catchsubscribing.
Comment #4
astroboy commentedI second that, it should be a top priority, because imagefield is essential to many content types.
Suscribing, also
Comment #5
Richard_ commentedsubscribing :) imagefield support would be great
Comment #6
NoRandom commentedAnother subscription.
Kind regards.
Comment #7
zilla commentedand another subscription....also wondering if any patches were ever submitted for this, or if it's now more of an inline api thing (hooks et al)?
Comment #8
zilla commentedhmm, just popping back in to find out if there's been any more thought on imagefield support in D6 or D5 wiht inline (this discussion has been quite for over a month..)
btw, realize that this goes back to may 2007 (not may 08) - is this off the table? is inline going a different way wiht the api that will push this back to imagefield itself?
Comment #9
VeeLin commentedsubscribing
Comment #10
Dimm commented+1
Comment #11
ChrisBryant commentedThis would be a good feature for sure. Add another +1 vote for this. :-)
Bumping version as well. Thanks.
Comment #12
ChrisBryant commentedI haven't tested it, but It looks like this has been added to the 2.x branch of Inline API as per this commit message:
http://drupal.org/cvs?commit=167616
Comment #13
sunNot yet. "CCK support" refers to CCK text fields, where Inline should also work (but is still referencing attached uploads).
Comment #14
ChrisBryant commentedI see, thanks for the update and sorry for jumping the gun!
Comment #15
guillaumeduveauHello,
Should we expect Imagefield support in Inline 2.x or 3.x ?
Comment #16
dquakenbush commented+1 subscribing
Comment #17
messal commented+1
Comment #18
mtsanford commentedThis is a small module I put together to solve this problem, as there seems to be no good solution yet to embed fielfield/imagefield into a node's body using a filter.
If the community thinks this is worth pursuing, I'll do the work to make it a contributed module. I'd also be interest to hear comments or suggestions on this approach.
Here's the README, and attached is the module.
----------------------------
// $Id: $
Simple_media provides a method for CCK field data to be embedded in the other
fields using a filter. Once set up content creators can upload images or other media
using a filefield or imagefield, and embed those media within the content body using
a simple [[token:#]] syntax, such as [[image:2]], which might embed the second image
of a list of unloaded imagefields in the node.
Tokens can be defined by administrators on a per field basis, and the delimiters can also
be changed if required. Administrator created template files are utilized to the theme
the output of field data.
Simple media works by a 3 step process:
1) The filter leaves a placeholder in the filtered text:
e.g.
2) hook_nodeapi is used to add data at $node->content['simple-media'] that is invisible
in the browser by { display : none; }
3) On the browser, jQuery plucks out the rendered field data , and injects it into the
placeholders created by the filter.
*** WARNING***
Simple media requires javascript to be active on the browser, as it is used to pluck out the
rendered field data out of a hidden part of the page, and inject it into the placeholders
created by the filter.
Simple_media was written by Mark Sanford (mtsanford)
Dependencies
------------
* Filter
* Content
FileField and/or Imagefield are also recommended, as embedding of file based media
is the intended use of this module. Imagecache is also recommended for sizing of images.
Install
-------
1) Copy the simple_media folder to the modules folder in your installation.
2) Enable the module using Administer -> Site building -> Modules
(/admin/build/modules).
Configure
-------
1) Configure simple_media at admin/admin/content/types/simplemedia
For each field defined, you can enter a token that will be recognized by the
Simple Media filter. For example if your field name is 'field_images' and
you enter a token of 'picture', the Simple Media filter will convert [[picture:#]]
into a placeholder for CCK data of field_image.
2) Copy the simple-media.tpl.php template to your theme folder, and rebuild your
theme registry by clearing the cache of some other method.
3) Create templates for all the fields you've defined tokens for. In the example
above, you would created a template called simple-media-images.tpl.php.
See simple-media.tpl.php for hints.
4) Create an Input format that includes the Simple Media filter.
Development Path
------------------------
Better integreation with CCK formatters: In addition to simple-media-FIELD.tpl.php
templates, it would be nice to be able to use existing CCK formatters for rendering.
No reliance on javascript, but embedding when doing the filtering, based on 'context' of
the filter processing, like inline.module does.
Comment #19
ao2 commentedHi, a real filter based solution could be implemented following the idea shown in #394682: CCK fields (filefield,imagefield,emfield) and fieldgroups for Inline API.
Any collaboration is appreciated.
Comment #20
ao2 commentedMarking as a duplicate of #394682: CCK fields (filefield,imagefield,emfield) and fieldgroups for Inline API, it now supports basic imagefield support.
Comment #21
sinasalek commentedGreat feature! +1