Active
Project:
Audio
Version:
6.x-1.x-dev
Component:
Views support
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2006 at 11:04 UTC
Updated:
17 Dec 2009 at 22:37 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedViews supports core fields by default; audio_image is provided by a module; I"m not even sure what module that is, since I don't think that's audio.module unless it's been added relatively recently. In any event, module's fields must be exposed to views by that module. Either the module in question isn't, or perhaps it isn't correct.
Comment #2
drewish commentedRather than opening my own issue, i'll just move this to the audio module queue.
Comment #3
drewish commentedComment #4
drewish commentedi do want to work on this. it should be pretty simple.
Comment #5
mike.hobo commentedThis is what i was looking for, I went into the views_audio.inc file and tried to add this code
But.. I guess this is not how the views works... After doing this, i looked in the views and their was no field for "Audio: Image"
I have also tried to go into the SQL and go to the view_tablefield and add an audio_image row into there.
I am very unexperienced in all of this.. but I will look into how "User: Author Picture" works.
Comment #6
mike.hobo commentedI really want this feature.. So if anyone knows alot about views. I added this to views_audio.inc
And this is the handler I added.
Is there anyway this can be altered to work correctly?
Comment #7
costinius commentedHi, I think I found the solution. I've created this code below quite fast and didn't test it well enough. But it works for me (except for the image theming, but I think this can be solved).
Step 1. Put the following code in the views_audio.inc under the $tables['audio'] // 'fields' => array(:
Step 2. Create a handler function below:
If you can bring this code further so that it will theme the image as needed, please share. Hope it helps.
Comment #8
drewish commentedi think the approach in #6 is the correct one, it would allow you to include info on the image's size and type.
Comment #9
mimancillas commentedI tried both #6 and #7 but had no luck with either. This would be a cool tool. I guess I'll follow mike.hobo's lead and research "User: Author Picture" and try and figure it out.
Comment #10
mike.hobo commentedyah. my code was incorrect, i was just jotting stuff. my solution to this was to give up and use imagefield. But this doesn't really help if you are trying to have the audio_feeds module's xspf feeds to have images.
Comment #11
costinius commentedHi, I'm not sure why #7 didn't work for you, just some stupid thing to bear in mind. At first when I created the code I also though it didn't work. Then it turned out that I just didn't notice the new field "Audio: Audio image" in the views field chooser. The problem is the views field chooser doesn't sort the fields alphabetically - the fields are sorted the way you put them in the module code.
Anyway, I attach the file "views_audio.inc" that works for me. Just in case.
PS: I'm using Audio module 5.x-1.3, Views 5.x-1.6
Comment #12
CinemaSaville commentedCan this be included for Drupal 6? Thanks.
Comment #13
drewish commentedyeah probably won't do anything with it in 5.x
Comment #14
CinemaSaville commentedSo you will include this? I'm not sure what the response meant.