Needs work
Project:
Inline
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2008 at 16:52 UTC
Updated:
2 Sep 2010 at 13:08 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunThis won't fix in 5.x-1.x, but would be a valuable addition for inline_upload module in 2.x (Inline API).
Comment #2
tonycpsu commentedSubscribe
Comment #3
Bryan76 commentedI have patched the latest HEAD of 6.x-2.x-dev to allow for inline imagecache preset override. The new format is:
[inline|file=01.jpg|title=Some Title|imagecache=alternative-preset]
If the imagecache parameter is not set, it will fall back to the default.
Comment #4
tonycpsu commentedAfter applying this patch, I no longer see the image inline -- just the title of the image linked to the image file. This is with no changes to the syntax. If I reverse the patch, I get the images showing up in the nodes again.
Comment #5
Bryan76 commentedtony, this is without changes to syntax? So your inline tag still looks something like:
[inline|file=01.jpg|title=some text] ?
Comment #6
tonycpsu commentedYes, except inline_upload instead of inline.
Comment #7
Bryan76 commentedWhoops, mine is also. For a moment there I thought "Wait.... how did I code my inline tags."
Are you certain that w/o the imagecache parameter [inline_upload|file=01|imagecache=tiny-preset] That it is still using imagecache and not just displaying the default image?
Upload an image, check the url that is displayed directly under the description down in the "file attachments" section of the node edit. Then insert it using [inline_upload|file=filename.jpg]. When the image is properly displayed in-line, right click on it and select view image. Verify that the image is coming from a directory such as: http://yoursite.com/sites/all/files/imagecache The important item is "imagecache" if you don't see that in the path, then imagecache isn't being used, and you have something to troubleshoot before trying to do a parameter override of the imagecache preset.
If it is properly displayed let me know. I'll do a fresh drupal install and see if I can get my patch to work or not.
Comment #8
tonycpsu commentedYes, it looks to me like it's the imagecache image that's being served. Here is what the HTML source before I apply this patch:
and here's what it looks like after the patch:
Notice, the filename of the
tag disappears after I apply this patch (well, technically, it's replaced by the imagecache preset name, in this case, "300".)
Comment #9
dquakenbush commentedI have the same behavior. Subscribing.
Comment #11
srobert72 commentedSubscribing
Comment #12
NoRandom commentedardas, I really would like to choose wich imagecache preset to apply but I think it should be in a simpler way. Since you should only need a couple of presets for inline images I would go for some kind of symbol at the end of the inline tag. For example:
[inline:file.jpg*] would launch preset one.
[inline:file.jpg**] would launch preset two.
...and so on.
Regards.
Comment #13
ademarco commentedA slightly modified version is attached, it allows to apply an Imagecache preset to the inline image by using the following syntax:
Specifying a preset overrides the global ones (those fetched from
inline_upload_teaser_presetandinline_upload_full_presetvariables).The patch makes also possible to control the image position in the text by introducing the
positionparameter:Available positions are
left,centerandright. Such a filter will produce the following HTML code:No default CSS is provided.
Comment #14
ademarco commentedFix for #13: check preset existence by name and not by array key. It also prints an error message in case the specified preset was not found.