/[drupal]/contributions/modules/slider/slider.admin.inc
ViewVC logotype

Contents of /contributions/modules/slider/slider.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Oct 15 10:04:25 2008 UTC (13 months, 1 week ago) by marktheunissen
Branch: MAIN
CVS Tags: DRUPAL-6--1-1, DRUPAL-6--1-2, DRUPAL-6--1-3, HEAD
Branch point for: DRUPAL-6--1, DRUPAL-6--2
File MIME type: text/x-php
first commit of slider module
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Administration callbacks for the slider module.
7 */
8
9 /**
10 * Form builder. Configure slider.
11 *
12 * @ingroup forms
13 * @see system_settings_form()
14 */
15 function slider_admin_settings() {
16 // get an array of node types with internal names as keys
17 // and friendly names as values
18 $options = node_get_types('names');
19
20 // remove the node types that don't have a cck field called slider_content.
21 foreach ($options as $key => $val) {
22 $field = content_fields('field_slider_content', $key);
23 if ($field['type'] != 'nodereference') {
24 unset($options[$key]);
25 }
26 }
27
28 $form['slider_node_types'] = array(
29 '#type' => 'checkboxes',
30 '#title' => t('The following nodes will be converted to sliders.'),
31 '#options' => $options,
32 '#default_value' => variable_get('slider_node_types', array()),
33 '#description' => t('The node must have a nodereference CCK multifield called field_slider_content.'),
34 );
35
36 $form['slider_tabs_position'] = array(
37 '#type' => 'radios',
38 '#title' => t("The location of the tabs."),
39 '#options' => array(t('Above'), t('Below')),
40 '#default_value' => variable_get("slider_tabs_position", 0),
41 '#description' => t('Should the tabs display above or below the content?.'),
42 );
43
44 return system_settings_form($form);
45 }

  ViewVC Help
Powered by ViewVC 1.1.2