Could someone please suply me with a simple code of displaying a default image if none is uploaded during node creation or editing.
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | fileds.JPG | 47.8 KB | droople |
| #5 | fileds2.JPG | 30.88 KB | droople |
Could someone please suply me with a simple code of displaying a default image if none is uploaded during node creation or editing.
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | fileds.JPG | 47.8 KB | droople |
| #5 | fileds2.JPG | 30.88 KB | droople |
Comments
Comment #1
ThePickwickProject commentedsubscribing
Comment #2
voipfc commentedsubscribing
Comment #3
michaelfavia commentedWhy cant you use the default image capability for the field setting in cck: admin/content/types/TYPENAME/fields/FIELDNAME? wfm.
Comment #4
voipfc commentedYou have no idea how clueless some of us are, I only began using CCK less than a month ago.
I realised that if imagefield is used and no pictures are added, display of those nodes is very slow, which is what prompted me to subscribe.
I will look up your tip to see if I can use it.
thx
voipfc
Comment #5
droople commentedFrom your post up there, I interpreted it in 2 ways
1. There is a text field on admin/content/types/TYPENAME/fields/FIELDNAME where one can enter a url to the default icture
or
2. Activate the "required" button.
Now I have had a look at the page.
1. there is no textfield for inserting a default image url (see attachments)
2. Making the field required, is not user friendly, as it's not always the case that a user creates/edits that node while having access to the image they want to use. (eg trying to create a node while using a work PC, without any of your personal images)
thank you
Comment #6
ThePickwickProject commented@Michael - What exactly are you referring to? I can't find a default image capability on that url, which prompted me to subscrinbe to this thread.
Comment #7
rick hood commentedI am using Imagefield 5.x-1.x-dev ($Id: imagefield.module,v 1.30.2.20 2007/10/19 08:03:02 quicksketch Exp $).
There is an option for default image here: /admin/content/types/your_type_name/fields/field_your_type_name
...where you can upload a default image. But it doesn't seem to work.
I have a View that uses nodes with imagefields and I need something that prevents the image from showing if it does not exist so as to not have the missing image icons in IE.
Theming the View is one way with code in the View tpl file to show only if it exists, but seems like there should be a better way.
Comment #8
dopry commented5.x-1.x-dev is dangerours... try 2.x which has working default image support...
RTFM, and go through the stinking settings and test them to se ewhat they do.