Closed (fixed)
Project:
Inline
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
17 Feb 2007 at 18:43 UTC
Updated:
10 Apr 2007 at 04:01 UTC
Jump to comment: Most recent file
Attached is a patch that adds imagecache support to inline.module's output. If Imagecache is installed, you can set a custom preset for scaling/cropping/etc of inlined images in both teaser and full node views. If greybox module is installed, it's also possible to make all inline images automatically link to a popup grey_box version of the full image.
if neither module is installed, the behavior is unchanged. yay.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | inline_presets_1.patch | 3.77 KB | eaton |
| #2 | inline_presets_0.patch | 4.17 KB | eaton |
| inline_presets.patch | 4.58 KB | eaton |
Comments
Comment #1
sun$preset_vardoesn't seem to be 'default' in any case.seems to deal with another filepath issue. AFAIK, there are no open issues about inlined image filepaths currently. Can you explain this change?
Please do not include the module name in issues. I know, the recent posts listing doesn't display the project name for issues, but regarding project issue queues, these prefixes are not welcome.
It's almost needless to say that I like this patch very much... ;)
Comment #2
eaton commentedGood catches -- thanks. I'm not sure how the file_create_path() change snuck in there -- I think it was accidental. The 'default' handling is unnecessary as well -- I just set it up such that the preset name is empty if no preset has been specified, and it works fine without any special casing. The re-rolled patch is attached...
Comment #3
eaton commentedAfter some careful examination, I've come to the conclusion that greybox integration *isn't* actually a good idea. It's really intended for popping up iframes of other web sites, not individual images. This version of the patch preserves imagecache integration, but adds an 'inline-image-link' to all HREFs generated for image linking. That means that a generic script like ThickBox can be used and attached to that class easily.
Comment #4
sunWe should replace
$teaserwith$fieldin the arguments of theme_inline_img() to make the code more understandable and to remove duplicate conditionals from function calls.$teaserseems then to be replaceable by$field == 'teaser'.Please also avoid changes to other code lines:
and avoid double spaces
and adhere to Drupal coding guidelines:
and
You might install Coder module to automate such tests.
Did you already test that Inline works the same way it did without this patch?
Comment #5
sunI've reworked your code and committed this feature to HEAD and DRUPAL-5.
Thanks for your help!
Comment #6
(not verified) commented