Changeset 583:c7f81168aa22 for themes/ductile/_config.php
- Timestamp:
- 07/13/11 07:28:49 (14 years ago)
- Branch:
- themes
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_config.php
r572 r583 143 143 } 144 144 145 $ductile_counts_base = array( 146 'default' => null, 147 'category' => null, 148 'tag' => null, 149 'search' => null 150 ); 151 152 $ductile_counts = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_counts'); 153 $ductile_counts = @unserialize($ductile_counts); 154 if (!is_array($ductile_counts)) { 155 $ductile_counts = $ductile_counts_base; 156 } 157 158 145 159 $conf_tab = isset($_POST['conf_tab']) ? $_POST['conf_tab'] : 'html'; 146 160 … … 182 196 } 183 197 198 for ($i = 0; $i < count($_POST['count_nb']); $i++) { 199 $ductile_counts[$_POST['count_ctx'][$i]] = $_POST['count_nb'][$i]; 200 } 201 184 202 } 185 203 … … 216 234 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_stickers',serialize($ductile_stickers)); 217 235 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_entries_lists',serialize($ductile_lists)); 236 $core->blog->settings->themes->put($core->blog->settings->system->theme.'_entries_counts',serialize($ductile_counts)); 218 237 219 238 // Blog refresh … … 283 302 echo '</fieldset>'; 284 303 285 echo '<fieldset><legend>'.__('Entries list types ').'</legend>';304 echo '<fieldset><legend>'.__('Entries list types and limits').'</legend>'; 286 305 287 306 echo '<table id="entrieslist">'.'<caption>'.__('Entries lists').'</caption>'. … … 290 309 '<th scope="col">'.__('Context').'</th>'. 291 310 '<th scope="col">'.__('Entries list type').'</th>'. 311 '<th scope="col">'.__('Number of entries').'</th>'. 292 312 '</tr>'. 293 313 '</thead>'. … … 297 317 '<tr>'. 298 318 '<td scope="raw">'.$contexts[$k].'</td>'. 299 '<td>'.form::hidden(array('list_ctx[]'),$k).form::combo(array('list_type[]'),$list_types,$v).'</td>'. 319 '<td>'.form::hidden(array('list_ctx[]'),$k).form::combo(array('list_type[]'),$list_types,$v).'</td>'; 320 if (array_key_exists($k,$ductile_counts)) { 321 echo '<td>'.form::hidden(array('count_ctx[]'),$k).form::field(array('count_nb[]'),2,3,$ductile_counts[$k]).'</td>'; 322 } else { 323 echo '<td></td>'; 324 } 325 echo 300 326 '</tr>'; 301 327 }
Note: See TracChangeset
for help on using the changeset viewer.