Hello,
I am wondering if there is a D7 port planned?
thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagecache_external_D7_port-1153772-3.patch | 10.46 KB | manu manu |
Hello,
I am wondering if there is a D7 port planned?
thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagecache_external_D7_port-1153772-3.patch | 10.46 KB | manu manu |
Comments
Comment #1
larowlanYes, happy to receive patches.
Shouldn't be that much to change.
Comment #2
manu manuOk, will post a patch if the need of this module is confirmed for the project I am working on.
Comment #3
manu manuOkay larowlan,
Here is a patch to port Imagecache External to D7.
I used 6.x-2.0-beta2 as starting point, but I discovered a major design problem: if there is an error fetching an image (no permission, 404), the module sends a drupal_not_found() or drupal_access_denied(), the problem is that happens on the page request on witch we try to display an image (resulting in broken page display), not the image request itself.
I really understand the point to not bootstrap Drupal on each external image request, so I added a theme_imagecache_external() function witch acts as theme_image_style(). If something is wrong, no img tag is returned.
Other points to review:
So with this patch, the recommended way to display an external image is:
This will return a formated img tag, gaining D7 features:
See here for a full list of options:
http://api.drupal.org/api/drupal/modules--image--image.module/function/t...
http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_image/7
Comment #4
manu manuoops, did not seen issue #1181232: Prevent image request errors from bubbling up to the entire page. ... Luckily the orientation is the same..
Comment #5
larowlanThanks, will try and get to this on the weekend.
Comment #6
larowlanCommitted as 7.x-2.x (thanks manu manu)
Sorry for the delay.
If we get solid feedback in here, I'll roll an alpha.
Comment #7
manu manuYou're welcome!
Comment #9
13rac1 commentedCan you make a 7.x-2.x release? There isn't one on the project page. Thanks!
Comment #10
summit commentedHi There is one on: http://drupal.org/node/975222/release
Hopefully it is working, thanks for building. Greetings, Martijn
Comment #11
manu manuHi,
the initial port is working quite well but I noticed a problem witch cause images being downloaded multiple times.
I will open an issue & post a patch as soon as possible, I hope tomorrow
Comment #12
7wonders commentedWorks well for me except if switching to private file system (i see there is a similar issue for d6 version).
Comment #13
manu manuHere is the issue mentioned in #11:
#1356648: Images are fetched one time per preset
Comment #14
davidneedhamClosing per #9, there is a 7.x release now.