diff options
author | Silvio <silvio@devlet.com.br> | 2010-10-22 17:15:49 -0200 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-10-22 17:15:49 -0200 |
commit | 4674cdd60cb9d43ad635d3b5cec7a5aa3d5daf03 (patch) | |
tree | a00b54ffbc95cfc7929bc25783ad5035ce939455 | |
parent | 2e712d04423c087d78a6216595fc4ea77274106b (diff) | |
download | jquery_gallery_view-4674cdd60cb9d43ad635d3b5cec7a5aa3d5daf03.tar.gz jquery_gallery_view-4674cdd60cb9d43ad635d3b5cec7a5aa3d5daf03.tar.bz2 |
Removing admin interface
-rw-r--r-- | jquery_gallery_view.admin.inc | 69 | ||||
-rw-r--r-- | jquery_gallery_view.module | 33 |
2 files changed, 0 insertions, 102 deletions
diff --git a/jquery_gallery_view.admin.inc b/jquery_gallery_view.admin.inc deleted file mode 100644 index 5388509..0000000 --- a/jquery_gallery_view.admin.inc +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/** - * @file - * Admin callbacks. - */ - -/** - * Menu callback. - */ -function jquery_gallery_view() { - $output = t('jQuery Gallery View.'); - $output .= drupal_get_form('jquery_gallery_view_form'); - return $output; -} - -/** - * Mass import form. - */ -function jquery_gallery_view_form(&$form_state) { - $form['node_type'] = array( - '#type' => 'select', - '#title' => t('Node type'), - '#options' => jquery_gallery_view_types(), - '#default_value' => variable_get('jquery_gallery_view_node_type', array()), - '#description' => t('Select node type to import images. For CCK, if node type contains more than one filefield, make sure that the imagefield is the first one.'), - ); - - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Save'), - ); - - return $form; -} - -/** - * Return the existing content types. - * - * @return - * Content types. - */ -function jquery_gallery_view_types() { - $node_types = node_get_types(); - $node_codes = array(); - - foreach ($node_types as $item) { - $node_codes[$item->type] = $item->name; - } - - return $node_codes; -} - -/** - * Implementation of hook_validate(). - */ -function jquery_gallery_view_form_validate($form, $form_state) { - if (!isset($form_state['values']['node_type'])) { - form_set_error('node_type', t('Please choose a content type')); - } - else { - $type = $form_state['values']['node_type']; - $types = node_get_types(); - - if (!isset($types[$type])) { - form_set_error('node_type', t('Invalid content type')); - } - } -} diff --git a/jquery_gallery_view.module b/jquery_gallery_view.module index fe3b815..4edb235 100644 --- a/jquery_gallery_view.module +++ b/jquery_gallery_view.module @@ -7,39 +7,6 @@ */ /** - * 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 |