From f005859eec16dad0594bedd9593a8537bbda6e1b Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Mon, 21 Feb 2011 09:31:51 +0000 Subject: Adding dependencies on the Preset module and added all presets are editable from the admin interface --- video.module | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'video.module') diff --git a/video.module b/video.module index 167a11b..f7d05a4 100644 --- a/video.module +++ b/video.module @@ -917,3 +917,44 @@ function rmdirr($dir) { } @rmdir($dir); } + +/** + * The hook that tells the preset module that your module should be added to the Preset Management. + * + * @return + * title - The title that you would like to show in the preset manager. + * + * description - The description of your preset when it is shown in the preset manager. + * + * permissions - The permission that you would like to add for the management of your preset. + * + * default_settings - The default settings for your preset. This can also be passed in as a string, + * which is then interpreted as a function callback that has the following signature... + * + * function mymodule_default_settings( $preset ) { + * return array( + * 'param1' => 1, + * 'param2' => 2 + * ); + * } + * + * file - The external file that will hold the form hooks (seen below) for your preset. + */ +function video_preset_info() { + return array( + 'title' => t('Video Preset'), + 'description' => t('Video module transcoding presets.'), + 'permissions' => array( + 'name' => 'administer video preset', + 'title' => t('Administer Video Preset'), + 'description' => t('Administer video preset settings for the video conversions.') + ), + 'default_settings' => array( + 'param1' => 0, + 'param2' => 1, + 'param3' => 3, + 'param4' => 4 + ), + 'file' => drupal_get_path('module', 'video') . '/includes/video.preset.inc' + ); +} \ No newline at end of file -- cgit v1.2.3