I think youre right on here sirkyle. This is exactly what I do for "sermon series" displays. You have a node type of 'series' and a 'podcast' node type. The podcast has a node reference to a series. We then build a view that is embedded on the series page with the series reference as the argument.
I think you're doing the right thing here.
For the files in the View I'd reccomend a list (table display, etc) type view. There should be an option when configuring the filefield in the view for displaying as a player (somehow...I don't quite remember how). I'll double check this when I have a second.
I have it up here at the moment: rocknpraise.rosevillechurch.com/products.
I can generate the view basically how I want it, in a table, but when it comes to calling the swf() fuction, I can't find a field reference that will work. I've done a print_r on all the relevant .tpl files that the view information suggests and nothing reveals the file.mp3 field like it does when theming a standard view.
You may like to look over Lullabot's creation of a page dedicated to displaying artists, albums and songs for SonyBMG. They published a reveal of their work here: http://drupal.org/node/241344
I'm assuming you're using Views theming and you've created a tpl.php file for that field, right? If so, and that info really isn't anywhere in the available variables, there's really 2 solutions.
Those are the two options that I would, personally, explore. A Drupal guru may have another method, but that's how I'd accomplish it on my own.
I have a quick question hopefully someone can shed some light on.
I was setting up something very similar, but had trouble getting SWF Tools to load the player I was using (1pixelout). I was able to reveal the .mp3 file and path in a View and use print swf(); in a views tpl file. However, I always received the error message that said something along the lines of Flash content not defined for series (it's the standard error message for SWF Tools).
Any thoughts on why this might happen?
@avr
That is what I'm facing. As per Bob's suggestion I'm going to figure out how to make a database call in the tpl file to gather the correct variable for the MP3 file. I'm hoping that once I get that the swf() function will work. If I get this figured out I'll post the code here, if you find a way to do it I'd love to see how.
The other way to do it (the right way) would be to write a manual database call in your template.php file and grab the path that way. This should offer hte best performance, but unless your a mysql guy, it may take some time to get it exactly right.
Would love to see a Mustard Seed Media video/G&G podcast/G&G tutorial on how to do this... :)
@AVR
I stored a text field in the song node that is the URL to the mp3 file. I was then able to pull the the field that points to the URL.
My field name is: field_audio_link
I issued a print_r($row) on the file: views-view-field--field-audio-link-value.tpl.php
<?php print swf($row->node_data_field_album_track_field_audio_link_value); ?>Still trying to figure out the sql query to actually call the field from the CCK filefield.
Thanks for posting the idea you used.
I actually had been doing just fine getting the path into Views. I was using "FileField" module and in CCK Display Fields section, I just selected "path to file."
This returned the path in the Views tpl.php file just fine. My issue was/is getting the SWF tools player to load. With your print swf(....) are you getting a player loaded?
Thanks,
Aaron
If anybody else can help, that would be great!
@avr
I was getting the same message. In the standard view I could see the file correctly, but when theming it if I passed the output to swf I just got that error. It is a generic error so it could mean anything. I can get a player to show, but it isn't attached to a file and so will not play. At least not until I created a CCK field to specifically pass the URL as a text file, now I can get it to play.
sirkyle:
on the G&G site, we just avoided this all together and used a node view instead of a field view (totally cheating, I know). Then we didn't have to deal with this.
However, the correct way to do this (as I've recently learned about thanks to glidetothehoop's last comment here) is to expose the filepath using the Relationship feature in Views 2. I haven't tried this specifically in this situation, but it's working just great in all my other Views theming situations.
Hope that helps!
I'm trying to display a page that will show multiple albums and the songs in those albums. The song information should include the title and a player.
My approach was to create a node called song and a node called album. The song node has the audio file and a relational link to the album node. The album node has the album title and the cover artwork. I have a view that calls songs and the album relational link so it outputs the album information then the song information in a table format. The problem I am having relates to theming the mp3 file. I can't see where the mp3 file is being inserted into the view in order to wrap it with a swf() function.
I could use suggestions or perhaps a whole different approach.
-sirkyle