Bakery: setting default vars (overview page: columns)

Chaploo

#2
Nobody?  :-(

Meanwhile I found a line in install.php where the default of num_cols is set to 3:

$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_bakery_page_settings`");
$mod_bakery = "CREATE TABLE `".TABLE_PREFIX."mod_bakery_page_settings` ( "
. "`section_id` INT NOT NULL DEFAULT '0' ,"
. "`page_id` INT NOT NULL DEFAULT '0' ,"
. "`page_offline` ENUM('yes','no') NOT NULL DEFAULT 'no' ,"
. "`offline_text` TINYTEXT NOT NULL ,"
. "`continue_url` INT(11) NOT NULL ,"
. "`header` TEXT NOT NULL ,"
. "`item_loop` TEXT NOT NULL ,"
. "`footer` TEXT NOT NULL ,"
. "`item_header` TEXT NOT NULL ,"
. "`item_footer` TEXT NOT NULL ,"
. "`items_per_page` INT NOT NULL DEFAULT '0' ,"
. "`num_cols` INT NOT NULL DEFAULT '3' ,"
. "`resize` INT NOT NULL DEFAULT '100' ,"
. "`lightbox2` VARCHAR(10) NOT NULL DEFAULT 'detail' ,"
. "PRIMARY KEY (`section_id`)"
. " )";
$database->query($mod_bakery);


But even when I change num_cols to 1 here and create a new bakery page, the default in page settings is set to 3.  :?

Chaploo

Hi everybody,

the default var for columns on the overview page is set to 3. I tried to change this to 1, but unfortunately without any success. Can anybody help me where to edit?

I thought it must have been in modify_page_settings.php from line 149 on:
<tr>
<td width="25%" align="right"><?php echo $MOD_BAKERY['TXT_NUMBER_OF_COLUMS']; ?>:</td>
<td colspan="2">
<select name="num_cols" style="width: 40px;">
<?php
for ($i 1$i <= 10$i++) {
if ($fetch_page_settings['num_cols'] == $i) { 
$selected ' selected';
} else { 
$selected '';
}
echo '<option value="'.$i.'"'.$selected.'>'.$i.'</option>';
}
?>

</select></td>
</tr>


But how?

Regards
Jochen