diff options
author | Heshan Wanigasooriya <heshanmw@gmail.com> | 2011-02-21 09:31:51 +0000 |
---|---|---|
committer | Heshan Wanigasooriya <heshanmw@gmail.com> | 2011-02-21 09:31:51 +0000 |
commit | f005859eec16dad0594bedd9593a8537bbda6e1b (patch) | |
tree | 72032796dc9a4c89c24159163dd8c3e029138c3d /video.module | |
parent | 76913b8b151e4b9e85f0fae20854ed8a9202c3fd (diff) | |
download | video-f005859eec16dad0594bedd9593a8537bbda6e1b.tar.gz video-f005859eec16dad0594bedd9593a8537bbda6e1b.tar.bz2 |
Adding dependencies on the Preset module and added all presets are editable from the admin interface
Diffstat (limited to 'video.module')
-rw-r--r-- | video.module | 41 |
1 files changed, 41 insertions, 0 deletions
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 <array> + * 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 |