Author Topic: Bakery: setting default vars (overview page: columns)  (Read 1757 times)

Offline Chaploo

  • Posts: 286
    • Internet-Service Berlin
Bakery: setting default vars (overview page: columns)
« on: March 04, 2011, 12:17:04 PM »
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_setting s.php from line 149 on:
Code: [Select]
<tr>
<td width="25%" align="right"><?php echo $MOD_BAKERY[&#39;TXT_NUMBER_OF_COLUMS&#39;]; ?>:</td>
<td colspan="2">
<select name="num_cols" style="width: 40px;">
<?php
for ($i 1$i <= 10$i++) {
if ($fetch_page_settings[&#39;num_cols&#39;] == $i) { 
$selected = &#39; selected&#39;;
} else { 
$selected = &#39;&#39;;
}
echo &#39;<option value="&#39;.$i.&#39;"&#39;.$selected.&#39;>&#39;.$i.&#39;</option>&#39;;
}
?>

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

But how?

Regards
Jochen

Offline Chaploo

  • Posts: 286
    • Internet-Service Berlin
Re: Bakery: setting default vars (overview page: columns)
« Reply #1 on: March 17, 2011, 01:40:42 PM »
Nobody?  :-(

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

Code: [Select]
$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.  :?
« Last Edit: March 21, 2011, 06:16:47 PM by Chaploo »

 

postern-length