mirror of
https://github.com/moodle/moodle.git
synced 2025-04-18 23:15:38 +02:00
'set sideblock left and right min/max width with values set in theme/config.php'
This commit is contained in:
parent
c5e065f817
commit
c15816ce95
@ -4,11 +4,23 @@ require_once($CFG->libdir.'/pagelib.php');
|
||||
|
||||
define('PAGE_ADMIN', 'admin');
|
||||
|
||||
define('BLOCK_L_MIN_WIDTH',0);
|
||||
define('BLOCK_L_MAX_WIDTH',210);
|
||||
define('BLOCK_R_MIN_WIDTH',0);
|
||||
define('BLOCK_R_MAX_WIDTH',210);
|
||||
// define('BLOCK_L_MIN_WIDTH',0);
|
||||
// define('BLOCK_L_MAX_WIDTH',210);
|
||||
// define('BLOCK_R_MIN_WIDTH',0);
|
||||
// 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)) ? 0 : $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)) ? 0 : $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);
|
||||
|
||||
page_map_class(PAGE_ADMIN, 'page_admin');
|
||||
|
||||
class page_admin extends page_base {
|
||||
|
@ -21,11 +21,23 @@ if (!$course = get_record('course', 'id', $courseid)) {
|
||||
}
|
||||
|
||||
// Bounds for block widths within 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);
|
||||
// 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)) ? 160 : $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)) ? 160 : $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);
|
||||
|
||||
//_____________ new page class code ________
|
||||
$pagetype = PAGE_BLOG_VIEW;
|
||||
$pageclass = 'page_blog';
|
||||
|
@ -10,11 +10,23 @@ require_once($CFG->dirroot.'/lib/weblib.php');
|
||||
$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);
|
||||
// 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;
|
||||
$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);
|
||||
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
|
||||
|
@ -7,11 +7,23 @@
|
||||
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);
|
||||
// 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;
|
||||
$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);
|
||||
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
|
||||
|
@ -5,11 +5,23 @@
|
||||
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);
|
||||
// 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;
|
||||
$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);
|
||||
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
|
||||
|
@ -8,11 +8,23 @@
|
||||
$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);
|
||||
// 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;
|
||||
$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);
|
||||
$preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user