Changeset 563:87842010f794 for themes/ductile/_config.php
- Timestamp:
- 07/10/11 21:58:19 (14 years ago)
- Branch:
- themes
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_config.php
r515 r563 13 13 14 14 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/admin'); 15 16 $list_types = array( 17 __('Title') => 'title', 18 __('Short') => 'short', 19 __('Full') => 'full' 20 ); 21 22 $contexts = array( 23 'default' => __('Home (first page)'), 24 'default-page' => __('Home (other pages)'), 25 'category' => __('Entries for a category'), 26 'tag' => __('Entries for a tag'), 27 'search' => __('Search result entries'), 28 'archive-month' => __('Month archive entries') 29 ); 15 30 16 31 $sticker_images = array( … … 111 126 if (!is_array($ductile_stickers)) { 112 127 $ductile_stickers = $ductile_stickers_base; 128 } 129 130 $ductile_lists_base = array( 131 'default' => null, 132 'default-page' => null, 133 'category' => null, 134 'tag' => null, 135 'search' => null, 136 'archive-month' => null 137 ); 138 139 $ductile_lists = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_lists'); 140 $ductile_lists = @unserialize($ductile_lists); 141 if (!is_array($ductile_lists)) { 142 $ductile_lists = $ductile_lists_base; 113 143 } 114 144 … … 147 177 $ductile_stickers[$i]['image'] = null; 148 178 } 179 180 for ($i = 0; $i < count($_POST['list_type']); $i++) { 181 $ductile_lists[$_POST['list_ctx'][$i]] = $_POST['list_type'][$i]; 182 } 183 149 184 } 150 185 … … 180 215 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_style',serialize($ductile_user)); 181 216 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_stickers',serialize($ductile_stickers)); 217 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_entries_lists',serialize($ductile_lists)); 182 218 $core->blog->triggerBlog(); 183 219 … … 242 278 echo '</fieldset>'; 243 279 280 echo '<fieldset><legend>'.__('Entries list types').'</legend>'; 281 282 echo '<table id="entrieslist">'.'<caption>'.__('Entries lists').'</caption>'. 283 '<thead>'. 284 '<tr>'. 285 '<th scope="col">'.__('Context').'</th>'. 286 '<th scope="col">'.__('Entries list type').'</th>'. 287 '</tr>'. 288 '</thead>'. 289 '<tbody>'; 290 foreach ($ductile_lists as $k => $v) { 291 echo 292 '<tr>'. 293 '<td scope="raw">'.$contexts[$k].'</td>'. 294 '<td>'.form::hidden(array('list_ctx[]'),$k).form::combo(array('list_type[]'),$list_types,$v).'</td>'. 295 '</tr>'; 296 } 297 echo 298 '</tbody>'. 299 '</table>'; 300 301 echo '</fieldset>'; 302 244 303 echo '<input type="hidden" name="conf_tab" value="html">'; 245 304 echo '<p class="clear"><input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>';
Note: See TracChangeset
for help on using the changeset viewer.