Exemplo n.º 1
0
/**
* Called when HTML meta, CSS and JS tags may be output
*
function theme_meta(){
	ob_start();
	module_hook('meta');
	$data = ob_get_contents();
	ob_end_clean();
	return $data;
}

/**
* Called when a page title should be generated, for example the site name in a header
* @param int $count Header level.  Use 1 for primary title and 2 for a quip or subtitle.
*
function theme_title($count){
	return "SSC";
}

/**
* Called when one of 'n' sidebar locations is created.
* @param int $count Number of the sidebar.  Used to decide which module
* 					'mini' output versions should be shown
*/
function theme_side($count)
{
    global $ssc_database;
    $result = $ssc_database->query("SELECT filename, args FROM #__module, #__sidebar WHERE #__module.id = #__sidebar.module AND location = %d ORDER BY #__sidebar.weight ASC", $count);
    if ($ssc_database->number_rows() < 1) {
        return '&nbsp;';
    }
    $ret = array();
    while ($data = $ssc_database->fetch_assoc($result)) {
        $dat = module_hook('widget', $data['filename'], explode(',', $data['args']));
        if ($dat) {
            $ret[] = theme_template('widget', $dat);
        }
    }
    return implode("\n", $ret);
}
Exemplo n.º 2
0
 function theme_template_partial($name, $prefix = '')
 {
     return theme_template('partial' . DIRECTORY_SEPARATOR . $name, $prefix);
 }