/[drupal]/contributions/themes/mobi/theme-settings.php
ViewVC logotype

Diff of /contributions/themes/mobi/theme-settings.php

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

revision 1.1 by deekayen, Fri Jun 12 21:45:14 2009 UTC revision 1.1.2.1 by deekayen, Fri Jun 12 21:45:14 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id$
3    
4    /**
5     * Implementation of THEMEHOOK_settings() function.
6     *
7     * @param $saved_settings
8     *   array An array of saved settings for this theme.
9     * @return
10     *   array A form array.
11     */
12    function phptemplate_settings($saved_settings) {
13      /*
14       * The default values for the theme variables. Make sure $defaults exactly
15       * matches the $defaults in the template.php file.
16       */
17      $defaults = array(
18        'mobi_header_background_color' => '#eef7fc',
19        'mobi_left_background_color' => '#ffffff',
20        'mobi_content_background_color' => '#ffffff',
21        'mobi_right_background_color' => '#ffffff',
22        'mobi_footer_background_color' => '#eef7fc'
23      );
24    
25      // Merge the saved variables and their default values
26      $settings = array_merge($defaults, $saved_settings);
27    
28      $form['background_colors'] = array(
29        '#type' => 'fieldset',
30        '#title' => t('Background colors'),
31        '#collapsible' => FALSE,
32        '#collapsed' => FALSE
33      );
34      $form['background_colors']['mobi_header_background_color'] = array(
35        '#type' => 'textfield',
36        '#title' => t('Header'),
37        '#default_value' => $settings['mobi_header_background_color']
38      );
39      $form['background_colors']['mobi_left_background_color'] = array(
40        '#type' => 'textfield',
41        '#title' => t('Left sidebar'),
42        '#default_value' => $settings['mobi_left_background_color']
43      );
44      $form['background_colors']['mobi_content_background_color'] = array(
45        '#type' => 'textfield',
46        '#title' => t('Content'),
47        '#default_value' => $settings['mobi_content_background_color']
48      );
49      $form['background_colors']['mobi_right_background_color'] = array(
50        '#type' => 'textfield',
51        '#title' => t('Right sidebar'),
52        '#default_value' => $settings['mobi_right_background_color']
53      );
54      $form['background_colors']['mobi_footer_background_color'] = array(
55        '#type' => 'textfield',
56        '#title' => t('Footer'),
57        '#default_value' => $settings['mobi_footer_background_color']
58      );
59    
60      // Return the additional form widgets
61      return $form;
62    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.3