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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Apr 26 19:31:34 2008 UTC (19 months ago) by ceejayoz
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
File MIME type: text/x-php
coder.module fixes.
1 <?php
2
3 // $Id: theme-settings.php,v 1.1 2008/04/26 01:55:30 ceejayoz Exp $
4
5 function phptemplate_settings($saved_settings) {
6 global $theme_path;
7
8 $defaults = array(
9 'tarski_centre_theme' => 1,
10 'tarski_header_image' => 'greytree.jpg',
11 );
12
13 $settings = array_merge($defaults, $saved_settings);
14
15 $form['tarski_centre_theme'] = array(
16 '#type' => 'checkbox',
17 '#title' => t('Centre the theme'),
18 '#default_value' => $settings['tarski_centre_theme'],
19 );
20
21 $headers = file_scan_directory(path_to_theme() .'/headers', '^.*$');
22
23 foreach ($headers as $header) {
24 $header_options[$header->filename] = $header->basename;
25 }
26
27 $form['tarski_header_image'] = array(
28 '#type' => 'select',
29 '#title' => t('Header image'),
30 '#default_value' => $settings['tarski_header_image'],
31 '#options' => $header_options,
32 '#description' => t('Upload new ones to !theme_path', array('!theme_path' => '<code>'. path_to_theme() .'/images/headers</code>')),
33 );
34
35 return $form;
36 }

  ViewVC Help
Powered by ViewVC 1.1.2