/** creates default box with caption @author <a href="mailto:daniel@hexerei.net">Daniel Vorhauer</a> @param caption the caption for the box @param content the content of the box @param class_pre the class prefix to use (default "a") @param width the width of the box (default "100%") @param icon the icon to use in the caption ("BYCLASS" uses stylesheet only) @return the ready rendered html box @note the icon parameter is currently not supported */ function getBoxed($caption, $content, $class_pre = 'a', $width = "100%", $icon = "BYCLASS") { /* if ( empty($GLOBALS['box_template']) ) { $GLOBALS['box_template'] = new xoxSimpleTemplate('box','box'); } if ($icon=="BYCLASS") $icon ="images/".$class_pre."caption.gif"; $box = $GLOBALS['box_template']; $box->setVar('width', $width); $box->setVar('icon', $icon); $box->setVar('caption', $caption); $box->setVar('content', $content); $box->setVar('class', $class_pre); return $box->show(TRUE); */ if (isset($GLOBALS['getBoxCorners'])) { return wrapCorners($caption, $content, $GLOBALS['getBoxCorners'], $width, ''); } else { return wrapBox($caption, $content, $class_pre, $width, ''); } }
function renderArea($area) { $target = isset($this->page->mods[$area]) ? $this->page->mods[$area] : ''; if (!empty($target)) { $_mods = is_array($target) ? $target : explode('|', $target); foreach ($_mods as $mod) { $mod_caption = ''; $mod_corners = false; $mod_teaser = ''; $mod_cstyles = ''; if (substr($mod, 0, 4) == 'mod:') { $mod = substr($mod, 4); $modfile = $this->base . "/lib/mod/{$mod}/mod.{$mod}.php"; if (is_file($modfile)) { if (!isset($GLOBALS['xoxmod'][$mod])) { $GLOBALS['xoxmod'][$mod] = array('_self' => ''); } include $modfile; if (is_object($GLOBALS['xoxmod'][$mod]['_self'])) { $mod_caption = $GLOBALS['xoxmod'][$mod]['_self']->title; $mod_corners = $GLOBALS['xoxmod'][$mod]['_self']->corners; if (isset($GLOBALS['xoxmod'][$mod]['render_mode'])) { $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getDefault(); } else { switch ($area) { case 'left': $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getCompact(); break; case 'right': $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getTeaser(); break; case 'header': $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getHeader(); break; case 'footer': $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getFooter(); break; default: $mod_teaser = $GLOBALS['xoxmod'][$mod]['_self']->getDefault(); break; } } $mod_cstyles = $GLOBALS['xoxmod'][$mod]['_self']->cstyles; } } else { $mod_teaser = "Unknown MOD {$modfile}"; } } elseif (is_file($mod)) { $mod_teaser = file_get_contents($mod); } else { $mod_teaser = $mod; } if ($this->corners || $mod_corners) { $this->output[$area] .= wrapCorners($mod_caption, $mod_teaser, $mod_cstyles) . '<br />'; } else { $this->output[$area] .= wrapBox($mod_caption, $mod_teaser, $mod_cstyles) . '<br />'; } } } }