diff options
author | Silvio <silvio@devlet.com.br> | 2010-10-20 17:56:41 -0200 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-10-20 17:56:41 -0200 |
commit | 7af5924b4a54c5363de88849df0eac49f7d6fe9d (patch) | |
tree | a9586b789a028f53a79328801388344b193ccb1f /jquery_gallery_view.module | |
parent | e0e83b1f95c754897930f4727830edd3f2b61e4b (diff) | |
download | jquery_gallery_view-7af5924b4a54c5363de88849df0eac49f7d6fe9d.tar.gz jquery_gallery_view-7af5924b4a54c5363de88849df0eac49f7d6fe9d.tar.bz2 |
Adding admin functions
Diffstat (limited to 'jquery_gallery_view.module')
-rw-r--r-- | jquery_gallery_view.module | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/jquery_gallery_view.module b/jquery_gallery_view.module index 539433a..6ac2c58 100644 --- a/jquery_gallery_view.module +++ b/jquery_gallery_view.module @@ -7,6 +7,39 @@ */ /** + * Implementation of hook_menu(). + */ +function jquery_gallery_view_menu() { + $items['admin/settings/jquery_gallery_view'] = array( + 'title' => t('jQuery Gallery View'), + 'description' => t('Configure settings for jQuery Gallery View.'), + 'page callback' => 'jquery_gallery_view', + 'access arguments' => array('administer content'), + 'type' => MENU_NORMAL_ITEM, + 'file' => 'jquery_gallery_view.admin.inc', + ); + + return $items; +} + +/** + * Get the first filefield from a content type. + * + * @param $fields + * Content type fields. + * + * @return + * Field name. + */ +function jquery_gallery_view_field($fields) { + foreach ($fields as $field) { + if ($field['type'] == 'filefield') { + return $field['field_name']; + } + } +} + +/** * Setup photos for a view. * * @param $view |