Hi,
I have the following in mind:
In the node, i have filefields and imagefields and settings that define the content and looks of the jwplayer.
now, i create a computedfield that creates a [jwplayer] tag, where the values of the other node fields are used to compose the optional fields for the player.
however, when i view the node, the [jwplayer] tag is rendered as text, and it's not converted into the actual player.
when i copy/paste the same [jwplayer] tag into the node body text, the jwplayer is created.
is there a way to use computedfield to create the jwplayer.
or is there another way to create the jwplayer and have the node fields as file and image tags for the [jwplayer]?
thanks a lot!
Gerbrand
Comments
Comment #1
JW Player commentedHi gerbrand,
That sounds like a cool way of using the player. At this time I'm not sure of how that would be done, but I'll definitely research the possibility for the next release.
Thanks,
Cameron
Comment #2
gerbrand commentedHi Cameron,
ok thanks for your enthousiasm. I will keep checking this issue list and if I find the way to accomplish what I described, I'll share it here.
Best,
Gerbrand
Comment #3
xurizaemonI suspect you want to theme the output of your computed field so that it runs the code from jwplayer_nodeapi().
I probably wouldn't even bother with computed field myself - instead I'd just create a template for that field, and use
theme('jwplayermodule_render_player', $config, $flashVars);in your node or field template -Eg this minimal code works (you'll need to change $config to match your JWPlayer config name) -
So from there you can set additional values in $flashVars to provide the various settings you've added via CCK.
Comment #4
btopro commentedWorks like a charm as embedded in my content type specific theme. thank you so much for this snippet, I was having trouble getting this worked out. This should be in documentation somewhere
Comment #5
JW Player commentedYeah, he could definitely use the theme function in this case. However, I believe the OP was interested in having the tag itself be replaced with the Player which the module currently doesn't do in computed fields.
Comment #6
JW Player commentedComment #7
hanno commentedchanged title slightly
Comment #8
hanno commented@grobot pro for using computed field and not the theme itself is that the configuration sticks when changing your template. Even better would be to be able to use cck media file field or a variant.
Comment #9
caponey commentedI would like to use this in CCK as well, mostly just so we could use the code as a default value and not have to enter it in every time.
We need to use php to check if user is logged in or not, and display the agegate plugin if they are not. I just get the JPlayer tags as text, same as gerbrand.