From 689456eb159f31bf4d89b571c8176ece148d27d9 Mon Sep 17 00:00:00 2001 From: urs_hunkler Date: Tue, 6 Feb 2007 20:18:45 +0000 Subject: [PATCH] 'deleted old block width definition' --- course/format/scorm/format.php | 6 ------ course/format/social/format.php | 6 ------ course/format/topics/format.php | 15 ++++++++++----- course/format/weeks/format.php | 6 ------ index.php | 16 +++++++++++----- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/course/format/scorm/format.php b/course/format/scorm/format.php index 2aa5a2e399..5827f1bb8c 100644 --- a/course/format/scorm/format.php +++ b/course/format/scorm/format.php @@ -6,12 +6,6 @@ $module = $course->format; require_once($CFG->dirroot.'/mod/'.$module.'/locallib.php'); - // Bounds for block widths - // define('BLOCK_L_MIN_WIDTH', 100); - // define('BLOCK_L_MAX_WIDTH', 210); - // define('BLOCK_R_MIN_WIDTH', 100); - // define('BLOCK_R_MAX_WIDTH', 210); - // Bounds for block widths // more flexible for theme designers taken from theme config.php $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width; diff --git a/course/format/social/format.php b/course/format/social/format.php index 26b30e4b15..2b04117b1c 100644 --- a/course/format/social/format.php +++ b/course/format/social/format.php @@ -4,12 +4,6 @@ require_once($CFG->dirroot.'/mod/forum/lib.php'); - // Bounds for block widths - // define('BLOCK_L_MIN_WIDTH', 100); - // define('BLOCK_L_MAX_WIDTH', 210); - // define('BLOCK_R_MIN_WIDTH', 100); - // define('BLOCK_R_MAX_WIDTH', 210); - // Bounds for block widths // more flexible for theme designers taken from theme config.php $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width; diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 922f84b8c7..5b8d718669 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -13,12 +13,17 @@ $topic = optional_param('topic', -1, PARAM_INT); - // Bounds for block widths - define('BLOCK_L_MIN_WIDTH', 100); - define('BLOCK_L_MAX_WIDTH', 210); - define('BLOCK_R_MIN_WIDTH', 100); - define('BLOCK_R_MAX_WIDTH', 210); + // more flexible for theme designers taken from theme config.php + $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width; + $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width; + $rmin = (empty($THEME->block_r_min_width)) ? 100 : $THEME->block_r_min_width; + $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width; + + define('BLOCK_L_MIN_WIDTH', $lmin); + define('BLOCK_L_MAX_WIDTH', $lmax); + define('BLOCK_R_MIN_WIDTH', $rmin); + define('BLOCK_R_MAX_WIDTH', $rmax); $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), BLOCK_L_MAX_WIDTH); diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php index f49c096c8c..80c86db0c9 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -7,12 +7,6 @@ $week = optional_param('week', -1, PARAM_INT); - // Bounds for block widths - // define('BLOCK_L_MIN_WIDTH', 100); - // define('BLOCK_L_MAX_WIDTH', 210); - // define('BLOCK_R_MIN_WIDTH', 100); - // define('BLOCK_R_MAX_WIDTH', 210); - // Bounds for block widths // more flexible for theme designers taken from theme config.php $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width; diff --git a/index.php b/index.php index 760522be15..6fd71a7fed 100644 --- a/index.php +++ b/index.php @@ -30,11 +30,17 @@ die; } -/// Bounds for block widths on this page - define('BLOCK_L_MIN_WIDTH', 160); - define('BLOCK_L_MAX_WIDTH', 210); - define('BLOCK_R_MIN_WIDTH', 160); - define('BLOCK_R_MAX_WIDTH', 210); + // Bounds for block widths + // more flexible for theme designers taken from theme config.php + $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width; + $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width; + $rmin = (empty($THEME->block_r_min_width)) ? 100 : $THEME->block_r_min_width; + $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width; + + define('BLOCK_L_MIN_WIDTH', $lmin); + define('BLOCK_L_MAX_WIDTH', $lmax); + define('BLOCK_R_MIN_WIDTH', $rmin); + define('BLOCK_R_MAX_WIDTH', $rmax); require_once('config.php'); require_once($CFG->dirroot .'/course/lib.php'); -- 2.39.5