diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/video_customfields/video_customfields.module | 24 | ||||
-rw-r--r-- | plugins/video_image/video_image.module | 2 | ||||
-rw-r--r-- | plugins/video_multidownload/video_multidownload.module | 14 | ||||
-rw-r--r-- | plugins/video_upload/video_upload.module | 24 |
4 files changed, 55 insertions, 9 deletions
diff --git a/plugins/video_customfields/video_customfields.module b/plugins/video_customfields/video_customfields.module index 972bdc1..fa48795 100644 --- a/plugins/video_customfields/video_customfields.module +++ b/plugins/video_customfields/video_customfields.module @@ -14,7 +14,7 @@ */ function video_customfields_help($section) { switch ($section) { - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enable addition of custom fileds on video nodes created by video module.'); } } @@ -27,6 +27,24 @@ function video_customfields_perm() { return array('insert custom fields'); } +/** + * Implementation of hook_menu(). + */ +function video_customfields_menu($may_cache) { + $items = array(); + if ($may_cache) { + $items[] = array( + 'path' => 'admin/content/video/customfields', + 'title' => t('customfields'), + 'description' => t('administer video_customfields module settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('video_customfields_settings_form'), + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); + } + return $items; +} /** * Settings Hook @@ -34,7 +52,7 @@ function video_customfields_perm() { * @return * string of form content or error message */ -function video_customfields_settings() { +function video_customfields_settings_form() { //Must have "administer site configuration" and "administer video" privilages. if (!user_access('administer video')) { drupal_access_denied(); @@ -88,7 +106,7 @@ function video_customfields_settings() { '#default_value' => variable_get('video_customgroupcollapsed', 1), '#description' => t('Should the custom fields group be initially collapsed when creating and editing video nodes?') ); - return $form; + return system_settings_form($form); } diff --git a/plugins/video_image/video_image.module b/plugins/video_image/video_image.module index 9664523..18c249b 100644 --- a/plugins/video_image/video_image.module +++ b/plugins/video_image/video_image.module @@ -63,7 +63,7 @@ function video_image_nodeapi(&$node, $op, $teaser) { break; case 'prepare': // check that image.module is actived - if ( !module_exist("image")) { + if ( !module_exists("image")) { db_query("UPDATE {system} SET status = 0 WHERE name ='video_image' AND type = 'module' LIMIT 1"); drupal_set_message(t('video_image module requires the %module module.<br />To prevent system errors video_image module has been disabled.<br />Please install the image module and then reactivate the video_image module.', array('%module' => l('image', 'http://drupal.org/project/image'))), 'error'); break; diff --git a/plugins/video_multidownload/video_multidownload.module b/plugins/video_multidownload/video_multidownload.module index b936224..23b1826 100644 --- a/plugins/video_multidownload/video_multidownload.module +++ b/plugins/video_multidownload/video_multidownload.module @@ -32,7 +32,15 @@ function video_multidownload_help($section) { function video_multidownload_menu($may_cache) { $items = array(); if ($may_cache) { - ; // for further uses + $items[] = array( + 'path' => 'admin/content/video/multidownload', + 'title' => t('multidownload'), + 'description' => t('administer video_multidownload module settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('video_multidownload_settings_form'), + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); } else { if (arg(0) == 'node' && is_numeric(arg(1))) { @@ -66,7 +74,7 @@ function video_multidownload_perm() { /** * Implementation of hook_settings() */ -function video_multidownload_settings() { +function video_multidownload_settings_form() { $form = array(); $options = array(1 => 'Yes', 0 => 'No'); @@ -84,7 +92,7 @@ function video_multidownload_settings() { '#default_value' => variable_get('video_download_ext', 'mov,wmv,rm,flv,avi,divx,mpg,mpeg,mp4,zip'), '#description' => t('The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm).')); - return $form; + return system_settings_form($form); } diff --git a/plugins/video_upload/video_upload.module b/plugins/video_upload/video_upload.module index e467d7e..41e79ae 100644 --- a/plugins/video_upload/video_upload.module +++ b/plugins/video_upload/video_upload.module @@ -14,19 +14,39 @@ */ function video_upload_help($section) { switch ($section) { - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enable video files uploading in video module.'); } } /** + * Implementation of hook_menu(). + */ +function video_upload_menu($may_cache) { + $items = array(); + if ($may_cache) { + $items[] = array( + 'path' => 'admin/content/video/upload', + 'title' => t('upload'), + 'description' => t('administer video_upload module settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('video_upload_settings_form'), + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); + } + return $items; +} + + +/** * Settings Hook * * @return * string of form content or error message */ -function video_upload_settings() { +function video_upload_settings_form() { //Must have "administer site configuration" and "administer video" privilages. if (!user_access('administer video')) { drupal_access_denied(); |