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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Jun 12 21:53:29 2009 UTC (5 months, 2 weeks ago) by deekayen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +62 -0 lines
File MIME type: text/x-php
move background and link configuration from the mobi_loader module to the theme itself
make the output XHTML mobile 1.2 compliant
1 <?php
2 // $Id: theme-settings.php,v 1.1.2.1 2009/06/12 21:45:14 deekayen Exp $
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 }

  ViewVC Help
Powered by ViewVC 1.1.2