[support] Field Formatter

Chris Miller cjm at tryx.org
Tue Mar 18 20:39:34 UTC 2014


Hi Folks, 

I have a content type that plays audio tracks. I want to support Apple devices, so I need an audio player that is more than a flash implementation and jPlayer is such. jPlayer also has a Drupal module, which is almost entirely a field formatter. This works out well, since field formatting is what I need. 

So I declare my content-type to have a "jPlayer - audio" field which is there by virtue of the jPlayer module. The only thing the module has as input to the formatter is the file name and the displayable title of the track. Somewhere this gets translated into a pile of HTML that displays the jPlayer with all the buttons and sliders that user expects. This could happen in "jplayer_field_format_view()", or maybe farther downstream. I don't know. 

I need to add a button to the eventually rendered jPlayer, so I need to figure out how to encode this and when to make that update to the associative array that eventually becomes rendered as the visible jPlayer. 

I enabled the developer module and I displayed a page with a jPlayer on it. The data-structure is huge with several promising entries, but I have no idea how to interpret what I see, nor do I understand how to update it to produce what I want. 

Can anybody point me to a manual describing this whole formatting / rendering procedure? Does anyone have any examples of how to do something like this? 

Thanks for the help, 

Chris. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20140318/6b0bed91/attachment.html 


More information about the support mailing list