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