Posted by priestdi on April 28, 2011 at 8:53pm
Hi
The info for the ImageField Extended module includes this:
"This now "extends" the base FileField widget using the new CCK 2.5 alter hooks, which is also a requirement. The update script should convert all of your existing fields. All FileFields and ImageFields can be extended, as can any widgets from other modules that provide additional functionality to FileField. REQUIRES CCK 2.5+"
I have no idea what this means. alter hooks? Can someone direct me to a how-to?
This is for a new Drupal site for a college newspaper, that's supposed to go live really soon, and we still don't have a way to add cutlines to images.
ANY advice is greatly appreciated!
Diane
Comments
Adding a cutline field using ImageField Extended
Hi Diane,
Assuming you are starting from scratch (if not, ignore any steps you've already done).
--- cck, filefield, imagefield, imagefield_extended
--- content, filefield, imagefield, ImageField Extended Fields, Text
Add the fields you want such as "cutline" at:
http://yoursite.com/?q=admin/settings/imagefield-extended
Just enter whatever additional fields you want into the textbox there, one per line, in the following format:
cutline|Cutline
in other words: machine_readable_fieldname|Field Label
Go to: http://yoursite.com/?q=admin/content/types
Click "manage fields" on the content type you want to use the cutline with.
Assuming you've already added an imagefield to this content type,
click "Configure" on your imagefield field.
Scroll down and you should see an option for "Cutline text settings".
Expand this and you can specify a variety of settings for it.
Good luck,
Adam
Image field / attach a file
I want to ask, how I can attach a file (pdf, txt, doc, docx etc.) to an image ? I want to create an image gallery and I must attach a file for some images and there shoud be a way to download this file which is attached to the image. Please, help me someone. Thanks.
Andrew.
Use filefield
@andrel.yopeso
You're a little off topic for this thread but... to answer your question I'd suggest adding a filefield based field to your node type that also has the image assigned to an imagefield. It would then be a matter of theming the output for the node to display both the image and the file download thus in effect attaching the file for download to the the image. Trying to attach a hardwired file for download within an imagefield seems to me beyond the scope of an imagefield.
Of course, if you find a better solution I hope you share it with the community.
Image field / attach a file
I understood what you explained me, this is what I want to do but I am not very good in drupal and I thought about creating new module which will permit to add this filefield to image existing fields...So I think about what I have to do know...If i'll find a way to solve this problem I'll comment this topic.
Image field / attach a file
I found a way to resolve this problem. There is a FllexiField module that permits repeating a group of fileds, I created a new content type called FlexiFieldGallery. There I created 4 fields: Image, Textarea, textfield and upload field. Then I created other content type called ImageGallery and there I created a new field Images with the type flexifield, in the setting I indicated from where I want to import fields, there I chose FlexiFieldGallery. So a created an content type with a group of fields that can repeat.
but in the "flexifield_filefield.module"
rewrite this function:
function flexifield_filefield_menu() {
$aItems = array();
$aItems['flexifield-filefield/ahah/%/%/%/%'] = array(
'page callback' => 'flexifield_filefield_js',
'page arguments' => array(2, 3, 4, 5),
'access callback' => 'filefield_edit_access',
'access arguments' => array(2, 3), //modified field
'type' => MENU_CALLBACK,
);
return $aItems;
}
FllexiField module??
@andrel
Can you please provide a link to the "FllexiField module" your referring to for the sake of those reading this thread.A Google search or a search within drupal.org produces nothing. The last time I heard of anything that sounded like "FllexiField" module was back in Drupal 4.7 when it was a predecessor do CCK, is this the same one?
Image field / attach a file
No, I khow this module you talk about but this is the right module : http://drupal.org/project/flexifield
So, you should download it and then you should download this module: http://drupal.org/project/ahah_response , becouse FlexiField is required by this module. Then you have to create a new content type called for example FlexiFieldsExample,then you create a new content of this type called FlexiFieldPage. So, there you have to put as much fields as you want,it doesnt matter which type of field you use. Then you have to create another content type but in this one you can add a new field from "manage fields" but this field should be the "flexifield" type, and there you can indicate from where you want to import field and you choose "FlexiFieldExamplePage". So, you have to clear cach after that, then go to Permissions and allow all the fields and content types you created. For me it works very good, but it is not all, as I said you have to modify this file:
"flexifield_filefield.module"
rewrite this function:
function flexifield_filefield_menu() {
$aItems = array();
$aItems['flexifield-filefield/ahah/%/%/%/%'] = array(
'page callback' => 'flexifield_filefield_js',
'page arguments' => array(2, 3, 4, 5),
'access callback' => 'filefield_edit_access',
'access arguments' => array(2, 3), //modified field
'type' => MENU_CALLBACK,
);
return $aItems;
}
Hope it will help you.