Posted by chrisdoherty on October 9, 2009 at 11:33pm
21 followers
| Project: | ImageField Extended |
| Version: | 6.x-4.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | nicholas.alipaz |
| Status: | closed (fixed) |
Issue Summary
I have installed ImageField Extended and it works great. Is there any way I can pull this data into a view? I'm not seeing any options under the Fields in Views.
Comments
#1
I haven't needed to do a direct imagefield based field view with this. We have had a few views that are based on just grabbing the nid and doing all of the formatting ourselves, using node_load. We virtually never need to do a simple list, outside of teaser lists.
Good topic to add to the help code section, adding to todo list but way to busy to do this in the next few weeks.
#2
Thank you, Alan D. for the prompt response!
#3
I'd like to add another request for Views integration. It's a shame to have to run node_load and dig into the data structure to retrieve extended imagefield metadata. Thanks!
#4
I would request for a views integration for this module as well. It will mke life so mu simpler..especially given that i dont know how to do this node_load stuff
#5
I've put a general request for help into the forums, http://drupal.org/node/680304. Hopefully someone will pick up on this. I will have a quick look at a general CCK formator in the next week or two.
#6
The latest dev version should have additional formatters that will allow users to view the textfields automatically. This is integrated with imagecache and views. Either checkout from CVS or wait about 24 hours for the newest development snapshot.
This makes theming easier, using "function theme_imagefield_extended_image($item, $additional_fields = array())", see the function in imagefield_extended.module for details.
This version includes these new features:
1) New formatters for the element to show the new fields, with imagecache support. (For view & imagecache integration as per this issue)
2) Implementation of hook_insert_widgets(). (For insert integration)
3) Minor changes of field validation to allow numbers in keys and to reserve certain keywords [alt, title, description]
The issue should stay open, i.e. for pulling out the individual data elements for view presentation.
#7
Subscribe
#8
This should be a big help. You can use the Table Wizard module to setup the relationships that you need, and see it live in a view. Then just export the hook_views_data() and that would get you over 90% of the way there. You just might want to tweak some things.
http://drupal.org/project/tw
Feel free to reach out to me if you have any questions.
#9
There seems to be a fairly basic implementation of the data field being used within views. title, alt, and description are hardcoded in filefield module. I opened a ticket with filefield to resolve the hardcoding which would allow us to simply supply a hook to send our data through filefields views implementation.
#735512: Views filefield-data should not be hard-coded
#10
subscribing
#11
Subscribe
For me it would be geat if I colud add a checkbox to a multiple image field, so I can filter only the selected images in a view
Ciao,
Marco
#12
+1
#13
I really like this module but according to comment #6 views some sort of integration was added however I do not see it in the latest release. Could I be missing something?
#14
In views you can use the extended field in the field section: content - fieldname_data
I want to filter on an extended checkbox field, like #11, how can I do that? Or maybe it is not possible, see #9.
#15
subscribing
#16
subscribing
#17
Summarizing the thread so far, the formatters to display the additional data are in the latest version.
Track #735512: Views filefield-data should not be hard-coded to add filtering / sorting support, etc. Once that is done, I can apply the required hooks and finalize this issue.
#18
sorry for asking- but i installed the latest 6.x-4.1, set up an additional field and configured it in the contenttype.
when using content - fieldname - data inside a view i still get only "description", "title", "alt" but not my field.
shouldn't that apear or did i get something wrong?
regards
tom
#19
Only the textfields get displayed by default, you need to override the theme template to show checkbox values. Make sure that you have "{preset} image, with additional fields" selected for the CCK field display.
#20
hi alan, thanks for your quick answer. actually i only do have one TEXTfield. and i need to access this field with a VIEW, not cck field display.
i understood #14 like the new fields would already be available in views/fieldbut maybe i got it wrong...
#21
#735512: Views filefield-data should not be hard-coded is now complete, ImageField Extended can implement hook_filefield_data_info() to reuse the FileField "data" column in Views.
#22
I wrote up a quick patch that works for me. Not much to it, thanks to quicksketch. The implementation of the checkboxes is fairly rudimentary only returning a "Yes" or "No". This part should definitely be looked at a bit to see if it could be better handled.
#23
hhmmm, a lot of people want this, but not a lot want to test? Help testing would be great. Thanks ;)
#24
No testing environment, but the code looks good. Just one comment,
<?php$checkbox = ($type === 'checkboxes') ? TRUE : FALSE;
?>
can just be
<?php$checkbox = ($type === 'checkboxes');
?>
unless there is some coding convention that I do not know of.
I am happy if you want to roll this into dev to get better community feedback. Patches always get a poor response.
And a big thanks for the help!
#25
lol, yeah, I had actually noticed my strange coding there later on. heh. I still want to give a look at removing that altogether to allow for better styling of the checkbox fields. I am looking into that a little today.
#26
or, for clarification, not removing that^ but changing the checkbox handling a little.
#27
This is fixed in the Dec 22 2010 or later dev release. I am opening a new ticket for better handling of the checkbox fields.
#1005328: Allow better options for formatting checkboxes within Views options
#28
Thanks for doing this. Is it possible to use the data as filter in Views? I can't seem to find it..
#29
There does not currently seem to be a filter handler setup. I am not sure if that is really an issue here, or for filefield. I am thinking filefield since all we do is provide basic information to filefield via a hook and then filefield does the rest.
#30
I have checked and it seems that the normal title, alt, description are not filterable either. That being said, mattiasj that is an issue to file against filefield as a feature request. I am sure quicksketch will use the data from the hook we are implementing here to make his filter if he chooses to add it.
#31
nicholas, thanks for your reply. it sure seems like a feature request for filefield - i will go ahead from there!
#32
That is because it is impossible to filter or sort on a field that is serialized data in the database. This functionality is not possible in Drupal 6.
#33
and that would make sense. There you have it. I think views integration is about as far as it will get within d6. Perhaps just some alterations to the handling of checkboxes and that's it. See #1005328: Allow better options for formatting checkboxes within Views options for more info.
#34
thanks for clearing this up!
#35
Automatically closed -- issue fixed for 2 weeks with no activity.
#36
I am having problems with this showing up in views. I am trying to do this with a slideshow content type which has an image field in it that is Type field. I have added the field and can enter data in it when I edit but when I go to a view and select content:images-data I only get the standard 3 (Description, title and alt) as Data key options. Should it be showing up there?
thx.
Dave
#37
When I look at the $data variable with dpm, the value is in the node_data_field_slideshow_images_field_slideshow_images_data string (which looks to be a serialized string) but is not showing as an option on the "Data key". Should it be showing up there or do I need to access it some other way?
#38
Same issue here as #18 and #37. The only values showing up in views are the default ones (alt, desc and title). Not the newly added image fields to my content type imagefield (such as "credit"). I can see and edit them in the form for the content type but as said, they're not showing up in views.
I'm using:
Drupal core 6.22
ImageField Extended 6.x-4.1
ImageField 6.x-3.10
FileField 6.x-3.10
thx
#39
+1
Same thing at #38, created a new textfield for images but can't get at it in Views. From what I can summarize from this thread, this should be working? I do not need to filter the new field, just display it as a field along with the image. (Attempting to create a Views Slideshow of artwork that needs to have rich text credits/captions attached to each image)
Same module versions as #38.
thanks,
Im.
#40
Partially answering my own question...
I have gotten my new textfield created by ImageField Extended to show up by choosing "Image, with additional fields" when creating the field entry to display the actual image file using "Content: your field" NOT in "Content: your field - data".
The new textfield's name is displayed along with the content - as you can see in the screenshot - but worst case scenario it can be hidden with CSS. After two days of trying to get a rich text image caption I am very happy to have this actually working!
Im.
#41
This module needs a new release. This feature was added over a year ago, but the last release was even before that. I opened #1413662: Make a new release (4.2) to request a new release. This feature will be in the 4.2 release.