I've been trying for hours to display a cck filefield in a view with a player other than the selected swf default. After trying all sorts of embedding, rewriting, customfield (php), and things like that, nothing worked out. Does anyone have an idea?
Otherwise this could become a feature suggestion for directly selecting different players in cck and views display options. I display everything on my site through CKK or Views, so at the moment it is impossible for me to have more than one player per filetype.
thanks for any ideas
Comments
Comment #1
ju.ri commentedI now found a way to do this by using the "views-customfield" module to be able to insert the php code for a certain player into a view.
So first I added a relationship to the view, adding the filefield of the node as the relation. That way I can pull in the path of the filefield-file, not only the fid. Then I add the path of the file as a field to the view, and choose not to display it.
THe "customfield" has the great feature that it can use any other field (sorted before the custom field) as a variable. So I can put this in the php-code-area:
Maybe someone finds this information useful. Thanks for listening anyway :)
Comment #3
ñull commentedMay be the following sample PHP code for views-customfield will help someone to save a lot of time:
File path is retrieved and displayed in wijering4 mediaplayer. The player string I found defined in the module of the player:
I guess you can find similar ID string for the other players defined in their modules.
Would be nicer though when SWFtools by itself would enable the player in the view and therefore I change this thread into a feature request
Comment #4
Stuart Greenfield commentedI think this might be addressed by #483524: Create SWF Tools "profiles"?
That will let you create any number of player configurations, and then you can use them in CCK, and it should also work in Views. I've only done limited testing, but the formatters seemed to show up ok.
We don't yet have clever stuff like assembling data from views in to a playlist. That is requested somewhere else on the queue (can't find the link right now).
But in terms of over-riding defaults that will be in the next release.
Development code for this feature is on HEAD.
Can I set this as a duplicate of the "profiles" thread?
Comment #5
Stuart Greenfield commentedSetting as duplicate as this does seem to describe what we can now do via profiles.
Note - profiles are now included on branch DRUPAL-6--3, and in the BETA3 release, so don't use HEAD!