/[drupal]/contributions/themes/newsflash/settings.php
ViewVC logotype

Contents of /contributions/themes/newsflash/settings.php

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Sep 8 23:14:39 2008 UTC (14 months, 2 weeks ago) by roopletheme
Branch: MAIN
CVS Tags: DRUPAL-5--1-6, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +100 -4 lines
File MIME type: text/x-php
Complete overhaul, fixed numerous bugs.
1 <?php
2
3 function phptemplate_settings($saved_settings) {
4
5 $settings = theme_get_settings('newsflash');
6
7 $defaults = array(
8 'newsflash_style' => 'blue',
9 'newsflash_width' => 0,
10 'newsflash_fixedwidth' => '850',
11 'newsflash_breadcrumb' => 0,
12 'newsflash_iepngfix' => 0,
13 'newsflash_themelogo' => 0,
14 'newsflash_fontfamily' => 0,
15 'newsflash_customfont' => '',
16 'newsflash_uselocalcontent' => 0,
17 'newsflash_localcontentfile' => '',
18 'newsflash_leftsidebarwidth' => '25',
19 'newsflash_rightsidebarwidth' => '25',
20 'newsflash_suckerfish' => 0,
21 'newsflash_usecustomlogosize' => 0,
22 'newsflash_logowidth' => '100',
23 'newsflash_logoheight' => '100',
24 );
25
26 $settings = array_merge($defaults, $settings);
27
28 $form['newsflash_style'] = array(
29 '#type' => 'select',
30 '#title' => t('Style'),
31 '#default_value' => $settings['newsflash_style'],
32 '#options' => array(
33 'copper' => t('Copper'),
34 'green' => t('Green'),
35 'blue' => t('Blue'),
36 'black' => t('Black'),
37 'red' => t('Red'),
38 'violet' => t('Violet'),
39 'aqua' => t('Aqua'),
40 ),
41 );
42
43 $form['newsflash_themelogo'] = array(
44 '#type' => 'checkbox',
45 '#title' => t('Use Themed Logo'),
46 '#default_value' => $settings['newsflash_themelogo'],
47 );
48
49 $form['newsflash_width'] = array(
50 '#type' => 'checkbox',
51 '#title' => t('Use Fixed Width'),
52 '#default_value' => $settings['newsflash_width'],
53 );
54
55 $form['newsflash_fixedwidth'] = array(
56 '#type' => 'textfield',
57 '#title' => t('Fixed Width Size'),
58 '#default_value' => $settings['newsflash_fixedwidth'],
59 '#size' => 5,
60 '#maxlength' => 5,
61 );
62
63 $form['newsflash_breadcrumb'] = array(
64 '#type' => 'checkbox',
65 '#title' => t('Show Breadcrumbs'),
66 '#default_value' => $settings['newsflash_breadcrumb'],
67 );
68
69 $form['newsflash_iepngfix'] = array(
70 '#type' => 'checkbox',
71 '#title' => t('Use IE PNG Fix'),
72 '#default_value' => $settings['newsflash_iepngfix'],
73 );
74
75 $form['newsflash_fontfamily'] = array(
76 '#type' => 'select',
77 '#title' => t('Font Family'),
78 '#default_value' => $settings['newsflash_fontfamily'],
79 '#options' => array(
80 'Arial, Verdana, sans-serif' => t('Arial, Verdana, sans-serif'),
81 '"Arial Narrow", Arial, Helvetica, sans-serif' => t('"Arial Narrow", Arial, Helvetica, sans-serif'),
82 '"Times New Roman", Times, serif' => t('"Times New Roman", Times, serif'),
83 '"Lucida Sans", Verdana, Arial, sans-serif' => t('"Lucida Sans", Verdana, Arial, sans-serif'),
84 '"Lucida Grande", Verdana, sans-serif' => t('"Lucida Grande", Verdana, sans-serif'),
85 'Tahoma, Verdana, Arial, Helvetica, sans-serif' => t('Tahoma, Verdana, Arial, Helvetica, sans-serif'),
86 'Georgia, "Times New Roman", Times, serif' => t('Georgia, "Times New Roman", Times, serif'),
87 'Custom' => t('Custom (specify below)'),
88 ),
89 );
90
91 $form['newsflash_customfont'] = array(
92 '#type' => 'textfield',
93 '#title' => t('Custom Font-Family Setting'),
94 '#default_value' => $settings['newsflash_customfont'],
95 '#size' => 40,
96 '#maxlength' => 75,
97 );
98
99 $form['newsflash_uselocalcontent'] = array(
100 '#type' => 'checkbox',
101 '#title' => t('Include Local Content File'),
102 '#default_value' => $settings['newsflash_uselocalcontent'],
103 );
104
105 $form['newsflash_localcontentfile'] = array(
106 '#type' => 'textfield',
107 '#title' => t('Local Content File Name'),
108 '#default_value' => $settings['newsflash_localcontentfile'],
109 '#size' => 40,
110 '#maxlength' => 75,
111 );
112
113 $form['newsflash_leftsidebarwidth'] = array(
114 '#type' => 'textfield',
115 '#title' => t('Left Sidebar Width'),
116 '#default_value' => $settings['newsflash_leftsidebarwidth'],
117 '#size' => 5,
118 '#maxlength' => 5,
119 );
120
121 $form['newsflash_rightsidebarwidth'] = array(
122 '#type' => 'textfield',
123 '#title' => t('Right Sidebar Width'),
124 '#default_value' => $settings['newsflash_rightsidebarwidth'],
125 '#size' => 5,
126 '#maxlength' => 5,
127 );
128
129 $form['newsflash_suckerfish'] = array(
130 '#type' => 'checkbox',
131 '#title' => t('Use Suckerfish Menus'),
132 '#default_value' => $settings['newsflash_suckerfish'],
133 );
134
135 $form['newsflash_usecustomlogosize'] = array(
136 '#type' => 'checkbox',
137 '#title' => t('Specify Custom Logo Size'),
138 '#default_value' => $settings['newsflash_usecustomlogosize'],
139 );
140
141 $form['newsflash_logowidth'] = array(
142 '#type' => 'textfield',
143 '#title' => t('Logo Width'),
144 '#default_value' => $settings['newsflash_logowidth'],
145 '#size' => 5,
146 '#maxlength' => 5,
147 );
148
149 $form['newsflash_logoheight'] = array(
150 '#type' => 'textfield',
151 '#title' => t('Logo Height'),
152 '#default_value' => $settings['newsflash_logoheight'],
153 '#size' => 5,
154 '#maxlength' => 5,
155 );
156
157 return $form;
158 }
159
160

  ViewVC Help
Powered by ViewVC 1.1.2