public function render($type = 'html', $options = array()) { ob_start(); switch ($type) { case 'pretty_html': // header and footer so plain contnet can be rendered nicely. $display_mode = get_display_mode(); // addition - woah! we pass this through to the template module for re-rending again: ob_start(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>{PAGE_TITLE}</title> {FAVICON} {AUTOMATIC_STYLES} {AUTOMATIC_SCRIPTS} <style type="text/css"> body{ margin:0; } </style> </head> <body> <div class="pretty_content_wrap"> {CONTENT} </div> </body> </html> <?php /*$c = $this->replace_content(); if(!$this->wysiwyg){ //$c = nl2br($c); } echo $c;*/ module_template::init_template('external_template', ob_get_clean(), 'Used when displaying the external content such as "External Jobs" and "External Invoices" and "External Tickets".', 'code', array('CONTENT' => 'The inner content', 'PAGE_TITLE' => 'in the <title> tag', 'FAVICON' => 'if the theme specifies a favicon it will be here', 'AUTOMATIC_STYLES' => 'system generated stylesheets', 'AUTOMATIC_SCRIPTS' => 'system generated javascripts')); ob_start(); ?> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> css/desktop.css" type="text/css"> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> css/print.css" type="text/css" media="print"> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> css/styles.css" type="text/css"> <link type="text/css" href="<?php echo _BASE_HREF; ?> css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" /> <?php module_config::print_css(); ?> <?php $css = ob_get_clean(); ob_start(); ?> <script type="text/javascript" src="<?php echo _BASE_HREF; ?> js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="<?php echo _BASE_HREF; ?> js/jquery-ui-1.9.2.custom.min.js"></script> <script type="text/javascript" src="<?php echo _BASE_HREF; ?> js/timepicker.js"></script> <script type="text/javascript" src="<?php echo _BASE_HREF; ?> js/cookie.js"></script> <script type="text/javascript" src="<?php echo _BASE_HREF; ?> js/javascript.js?ver=2"></script> <?php module_config::print_js(); ?> <?php $scripts = ob_get_clean(); $external_template = self::get_template_by_key('external_template'); $external_template->assign_values(array('CONTENT' => $this->replace_content(), 'PAGE_TITLE' => $this->page_title ? $this->page_title : module_config::s('admin_system_name'), 'FAVICON' => module_theme::get_config('theme_favicon', '') ? '<link rel="icon" href="' . htmlspecialchars(module_theme::get_config('theme_favicon', '')) . '">' : '', 'AUTOMATIC_STYLES' => $css, 'AUTOMATIC_SCRIPTS' => $scripts)); echo $external_template->render('raw'); break; case 'html': default: $c = $this->replace_content(); if ($this->wysiwyg) { //$c = nl2br($c); } echo $c; break; } return ob_get_clean(); }
<link rel="stylesheet" href="<?php echo _BASE_HREF; ?> includes/plugin_theme/themes/metis/css/custom-theme/jquery-ui-1.10.3.custom.css"> <!--[if lt IE 9]> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> includes/plugin_theme/themes/metis/css/jquery.ui.1.10.3.ie.css"> <![endif]--> <?php module_config::print_css(_SCRIPT_VERSION); ?> <script language="javascript" type="text/javascript"> // by dtbaker. var ajax_search_ini = ''; var ajax_search_xhr = false; var ajax_search_url = '<?php echo _BASE_HREF; ?> ajax.php'; </script>
</title> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> css/styles.css?ver=5" type="text/css" /> <link rel="stylesheet" href="<?php echo _BASE_HREF; ?> css/desktop.css?ver=5" type="text/css" /> <link type="text/css" href="<?php echo _BASE_HREF; ?> css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" /> <?php module_config::print_css(); ?> <script language="javascript" type="text/javascript"> <?php switch (strtolower(module_config::s('date_format', 'd/m/Y'))) { case 'd/m/y': $js_cal_format = 'dd/mm/yy'; break; case 'y/m/d': $js_cal_format = 'yy/mm/dd'; break; case 'm/d/y': $js_cal_format = 'mm/dd/yy';