function display($file, $wrap = true, $cache_id = null, $compile_id = null) { if ($wrap && !$this->is_channel) { $this->assign('webapp_page_title', $this->page_title); $this->assign('webapp_app_title', $this->app_title); $this->assign('webapp_content_classes', implode(' ', $this->content_classes)); if (isset($this->body_style_classes)) { if (is_array($this->body_style_classes)) { $this->assign('body_style_classes', implode(' ', $this->body_style_classes)); } else { $this->assign('body_style_classes', $this->body_style_classes); } } else { $this->assign('body_style_classes', basename($file, '.tpl')); } if (isset($this->body_id)) { $this->assign('body_id', $this->body_id); } $this->addCSS('/app/core/css/all960.css'); if ($this->fluid) { $this->addCSS('/app/core/css/fluid960.css'); } //end if $this->addCSS('/app/core/css/style.css?v=1.2'); if (\PSU::isDev() && $_SESSION['username'] == 'mtbatchelder') { $this->addCSS('/app/core/css/mtbatchelder.css'); } //end if if ($GLOBALS['BASE_URL'] == 'http://' . $_SERVER['HTTP_HOST'] . '/webapp/style') { if ($_GET['old']) { $this->addCSS('/app/core/css/old_webapp_style.css'); } //end if } else { } //end if if ($GLOBALS['channel_styles']) { $this->addCSS('/webapp/my/templates/override.css'); $this->addCSS('/webapp/my/templates/channels.css'); } //end if $this->addJS('http' . ($_SERVER['HTTPS'] ? 's' : '') . '://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js', array('head' => true)); // psu-standard scripts if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { $this->addJS('/app/core/js/amplify.js'); $this->addJS('/app/core/js/jquery-plugins/jquery.multi-ddm.min.js'); $this->addJS('/app/core/js/behavior.js'); $this->addJS('/app/core/js/jquery-plugins/jquery.ba-dotimeout.js'); $this->addJS('/app/core/js/jquery-plugins/waypoints.js'); } else { $this->addJS('/app/core/js/standard/psu-standard.min.js'); } $this->addJS('/app/core/js/bootstrap/bootstrap.min.js'); if ($this->channel_container) { $this->addJS('/js/jquery-plugins/shadowbox/shadowbox.js'); $this->addCSS('/js/jquery-plugins/shadowbox/shadowbox.css'); $this->addJS('/webapp/my/js/combined.js?v=1'); $this->addJS('/webapp/portal/myjs/index.php?v=1.6'); $this->addJS('/webapp/my/js/loaded.js?v=1'); } //end if $this->webapp_content('css'); $this->webapp_content('host_js'); $this->webapp_content('pre_js'); $this->webapp_content('js'); $this->webapp_content('head'); $this->webapp_content('nav'); $this->webapp_content('avant_body'); $this->webapp_content('body', $this->fetch($file, $cache_id, $compile_id, false)); $this->webapp_content('apres_body'); $this->webapp_content('foot'); $this->webapp_content('apres_foot', $this->fetch(PSU_BASE_DIR . '/app/core/templates/apres_foot.tpl', $cache_id, $compile_id, false)); $this->webapp_content('apres_foot_center'); if (!$GLOBALS['suppress_theme']) { $this->addCSS('/webapp/themes/my/my.php'); $this->addJS('/webapp/themes/my/js.php'); } //end if $this->fetch(PSU_BASE_DIR . '/app/core/templates/main.tpl', $cache_id, $compile_id, true); } else { $this->fetch($file, $cache_id, $compile_id, true); } //end else if ($this->is_channel) { $params = array('callback' => $this->channel_callback ? $this->channel_callback : '$.my.channelLoad', 'channel_id' => $this->channel_id ? $this->channel_id : $_GET['channel_id']); if ($this->channel_js_callback) { $params['js_callback'] = $this->channel_js_callback; } //end if if ($this->state) { $params['state'] = $this->state; } //end if if ($this->title) { $params['title'] = $this->title; } //end if $this->addJS('http' . ($_SERVER['HTTPS'] ? 's' : '') . '://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', array('head' => true)); $this->addJS('/webapp/portal/myjs/index.php'); $this->addJS('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js'); $this->addJS('/includes/js/jquery-plugins/jquery.multi-ddm.min.js'); $this->addJS('/webapp/my/js/combined.js'); $this->addJS('/app/core/js/behavior.js'); $this->addJS('/webapp/my/js/behavior.js'); $this->assign('js_init', $params['js_callback']); $params['template_vars'] = $this->get_template_vars(); if ($_GET['output_method'] == 'js' || $_GET['output'] == 'js') { \Channel::out('callback', $params); } else { \Channel::out('html', $params); } } //end if }