Page 1 of 1

Edit Drupal hook method

Posted: Wed Feb 29, 2012 7:36 pm
by DoubleT
Hi,
Does someone here has modified Drupal core?
I really want one feature in my website, but Drupal 7 has no support for it.
I want upload video from administration in node, and then the video is uploaded in YouTube.
I googled and foun this - http://code.google.com/apis/youtube/2.0 ... PI_Request
I probably should make POST request to URL and then show video in my node.
But i am not quite sure, how to do that.
One person said, that i need to edit hook_node_submit() method but there's nothing to edit ( it seems )

hook_node_submit()
Parameters
$node: The node object being updated in response to a form submission.
$form: The form being used to edit the node.
$form_state: The form state array.

Code: Select all

<?php
function hook_node_submit($node, $form, &$form_state) {
  if (!empty($form_state['values']['menu']['parent'])) {
    list($node->menu['menu_name'], $node->menu['plid']) = explode(':', $form_state['values']['menu']['parent']);
  }
}
?>
Can someone help?

Sincerely Yours,
DoubleT