Closed (fixed)
Project:
ImageCache
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 May 2007 at 18:40 UTC
Updated:
20 Dec 2007 at 10:11 UTC
Jump to comment: Most recent file
I've just posted a patch that adds default image capability to imagefield. Here is a patch that adds that capability to imagecache's imagefield formatter.
This patch requires the imagefield patch above to work.
Patch against DRUPAL-5--2.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | imagecache_formatter_default_image_0.patch | 1.89 KB | recidive |
| imagecache_formatter_default_image.patch | 1.64 KB | recidive |
Comments
Comment #1
recidive commentedMy previous patch doesn't work with views fields. This one does.
Also, there is the issue with files not being deleted from database on the imagefield queue, so it will not work if you just delete the image when editing the module. We add a workaround here, e.g. a
file_exists()check, but it won't solve the root of problem.Comment #2
bsuttis commentedThanks, this helps a lot. I'm just curious though -- while the default image shows up in my views, the default is not showing up in actual nodes.
The current solution I'm using is checking for the image field and if its 'view' isn't there, it prints out the same default image. Feels kinda gross though, I'm just checking to make sure that I didn't miss something, but does the default image only show up in views and not actual nodes?
Comment #3
Christopher Herberte commented+1 to commit
Comment #4
Christopher Herberte commentedoops change title back... :P
Comment #5
liquidcms commenteddoes this work?
Seems like a great idea; but i see no default images. This is what i have done:
- installed latest 5.2 version of imagefield (that post says has required patch)
- i now see option in cck field for defining a default image
- applied patch here to latest imagecache module
- i now go to one of my nodes and delete the image - in views, blocks, and full node i now have no image.
I think i am doing this correctly - any chance i am not?
Comment #6
liquidcms commentedwow.. pretty confusing issue with at least 4 separate posts regarding this. Anyone know if there is a resolution at the end here - seems pretty simple as far as use case - admin can set a default image for a field and imagecache will create whatever versions of it are required as needed.
- I think i have latest imagefield and patched imagecache.
- i see that i can set a default image
- and i can see it gets loaded
- but nothing in image cache folders and no images displayed.
which piece am i missing?
Comment #7
liquidcms commentedahhh, ok.. i see something now.. in one place in my site i have the default image showing - i guess perhaps ni a simple node teaser; but the other 10 places or so with views, fused views, tpls where i pull it is with imagecache theme... i don't get anything.
So i guess still some work to do here - but certainly a great idea - sadly though this site launches tomorrow so i guess i'll need to do the ugly code thing of adding this in all of my tpls :(
Comment #8
storbaek commentedAre you using version 2? I've been testing this version and I cannot get the default option to work either!
Comment #9
dopry commentedActually the fix happened in imagefield... We got a patch there that makes sure imagefield gets the default image from imagefield.
Comment #10
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.