* @param mixed $idbase, optionally, define one idbase to be added to all the elements in the corners
*/
function print_custom_corners_start($clearfix=false, $return=false, $idbase=null) {
+ global $THEME;
/// Analise if we want ids for the custom corner elements
$idbt = '';
$output .= "\n";
$output .= '<div '.$idi1.'class="i1"><div '.$idi2.'class="i2">';
$output .= (!empty($clearfix)) ? '<div '.$idi3.'class="i3 clearfix">' : '<div '.$idi3.'class="i3">';
-
+
+ $THEME->customcornersopen += 1;
+
if ($return) {
return $output;
} else {
* @param mixed $idbase, optionally, define one idbase to be added to all the elements in the corners
*/
function print_custom_corners_end($return=false, $idbase=null) {
+ global $THEME;
/// Analise if we want ids for the custom corner elements
$idbb = '';
$output .= "\n";
$output .= '<div '.$idbb.'class="bb"><div> </div></div>'."\n";
$output .= '</div>';
-
+
+ $THEME->customcornersopen -= ($THEME->customcornersopen > 0) ? 1 : 0;
+
if ($return) {
return $output;
} else {
}
}
+/// Close eventually open custom_corner divs
+ if ((!empty($THEME->customcorners)) && ($THEME->customcornersopen > 1)) {
+ require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
+ while ($THEME->customcornersopen > 1) {
+ print_custom_corners_end();
+ }
+ }
/// Include the actual footer file
if (!empty($THEME->customcorners)) {
echo '<div class="i1"><div class="i2">';
echo '<div class="i3">';
+ $THEME->customcornersopen += 1;
}
echo '<div class="content">';