Copyright © 2008 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
famfamfam
Hi Kaltura-buddy-fanatics,
I need to insert a kaltura_entry node as belonging to an organic group, usually I passed the value of the organic group as an URL parameter, such as "/node/add/video?gid=XXX".
Is it possible to get a similar functionality ? I post the question in the Server Forum because as far as I can understand, the nodes are created by the notification_handler, so I guess that I would have to hack somewhere in the server to return the "gid" parameter that would allow me to insert the node in the corresponding og_group.
Could anybody share some ideas about how to do this?
Thanks in advance.
I don't know....
I think I can modify node_kaltura_entry.module:function node_kaltura_entry_form(), to add as "partner_data" the gids I want the video to belong to, this is the relevant piece of code:
(file node_kaltura_entry.module)
...
367 $partner_data = "user_id@". $user->uid;
368 //XXX: insert OG_GROUP info here
369 $partner_data .= "|gids@".implode(',',$_GET['gids']);
370 $cw_vars = kaltura_format_cw_vars(array(
371 'kshow_id' => -2,
372 'partner_data' => $partner_data,
373 ));
374 $form["add_kaltura"] = array(
375 "#prefix" => "jQuery(document).ready(function(){ kalturaInitModalBox('" . url("kaltura/contribution_wizard/". $cw_vars) ."'); });",
376 "#type" => "item",
377 "#value" => "",
378 "#suffix" => ""
379 );
...
If I am able to get back this info at the function kaltura.notification.inc:function kaltura_notify_node_entry_add(), this would be enough for my purposes.
You are right, I think that I can everything over the Drupal module.... I am testing right now this solution. Thanks for your help.
Hi yonailo,
This solution is right-on...
The partnerData field is exactly there for these kind of things.
I'm not sure, but I think that adding a generic support for the OG module might needs to be done this way, and that this might be the only way... I need to think about it some more (if you have other thoughts they're more than welcome).
Anyway, Lets us know if that solution works for you.
Gonen
Thank you for the response, I am not a Drupal expert (yet), so I can not tell you the best way to integrate Kaltura with organic groups.
I do can tell you that the modificacion works nicely for node_kaltura_entry.
I did a bit more of hacking to make the same thing working with a node_kaltura_mix, because the kaltura_mix node-type is created right after submitting the first part of the form, so for this case, I didn't have to use the partner_data value, it is enough just adding og_groups info just after (or before) calling node_save. My drupal installation is so bad-hacked that I am experiencing a lot of problems related to the og_module, but regarding kaltura, everything works as expected!
it's a pity that kalturaCE does not support flattening node-mixes yet, because I would like to create "channels" that group media content inside a custom player and I was needing the URLs of the mixes...
Hi,
How I have to pass the gid in this solution? Like that: "/node/add/video?gid=XXX". ?
Hi yonailo,
This is actually only related to Drupal and doesn't require any changes to the server.
The module creates a node for every kaltura media created, you can use the node created and connect it with the OG you want.. does that make sense ?