예제 #1
0
 /**
  * html
  *
  * Outputs the channel in the default channel html
  *
  * @since		version 2.0.0
  * @param  	string $text Text to output
  * @param   mixed $params Parameters to be appended to the JS callback
  */
 public function html($text, $params = false)
 {
     include_once 'PSUTemplate.class.php';
     $GLOBALS['NEW_STYLE'] = true;
     $tpl = new PSUTemplate();
     $tpl->channel_container = true;
     foreach ((array) $params['template_vars'] as $key => $value) {
         $tpl->assign($key, $value);
     }
     //end foreach
     if ($params['title']) {
         $tpl->assign('app_title', $params['title']);
     }
     $tpl->assign('output', $text);
     $tpl->assign('js_init', stripslashes($params['js_callback']));
     $tpl->addCSS('/webapp/my/templates/override.css');
     $tpl->addCSS('/webapp/my/templates/channels.css');
     ob_start();
     $tpl->display('/web/pscpages/webapp/portal/channel/templates/main.tpl');
     $text = ob_get_clean();
     return $text;
 }
 function display($resource_name = 'index.tpl', $wrap = true, $cache_id = null, $compile_id = null)
 {
     // search-related template vars
     $this->assign('search_term', $_SESSION['ape_search_identifier']);
     if ($_SESSION['ape_search_type']) {
         $this->assign('search_' . $_SESSION['ape_search_type'], 'selected="1"');
     } else {
         $this->assign('search_name', 'selected="1"');
     }
     parent::display($resource_name, $wrap, $cache_id, $compile_id);
 }