t('left sidebar'),
'right' => t('right sidebar')
);
}
function chameleon_page($content, $show_blocks = TRUE) {
$language = $GLOBALS['locale'];
if (theme_get_setting('toggle_favicon')) {
drupal_set_html_head('');
}
drupal_add_css(path_to_theme() .'/common.css', 'theme');
$title = drupal_get_title();
// Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
$blocks_left = theme_blocks('left');
$blocks_right = theme_blocks('right');
$output = "\n";
$output .= "\n";
$output .= "
\n";
$output .= " ". ($title ? strip_tags($title) ." | ". variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") ." | ". variable_get("site_slogan", "")) ."\n";
$output .= drupal_get_html_head();
$output .= drupal_get_css();
$output .= drupal_get_js();
$output .= "";
$output .= "\n";
$output .= " \n";
$primary_links = theme('links', menu_primary_links(), array('class' => 'links', 'id' => 'navlist'));
$secondary_links = theme('links', menu_secondary_links(), array('class' => 'links', 'id' => 'subnavlist'));
if (isset($primary_links) || isset($secondary_links)) {
$output .= ' ';
if (isset($primary_links)) {
$output .= $primary_links;
}
if (isset($secondary_links)) {
$output .= $secondary_links;
}
$output .= "
\n";
}
$output .= " \n";
$output .= " \n";
if ($show_blocks && !empty($blocks_left)) {
$output .= " \n";
}
$output .= " \n";
if ($title) {
$output .= theme("breadcrumb", drupal_get_breadcrumb());
$output .= "$title";
}
if ($tabs = theme('menu_local_tasks')) {
$output .= $tabs;
}
$output .= theme('help');
$output .= theme('status_messages');
$output .= "\n\n";
$output .= $content;
$output .= drupal_get_feeds();
$output .= "\n\n";
if ($footer = variable_get('site_footer', '')) {
$output .= " \n";
}
$output .= " | \n";
if ($show_blocks && !empty($blocks_right)) {
$output .= " \n";
}
$output .= "
\n";
$output .= "
\n";
$output .= theme_closure();
$output .= " \n";
$output .= "\n";
return $output;
}
function chameleon_node($node, $teaser = 0, $page = 0) {
$output = "status) ? ' node-unpublished' : '') ."\">\n";
if (!$page) {
$output .= "
". ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."
\n";
}
$output .= "
\n";
if ($teaser && $node->teaser) {
$output .= $node->teaser;
}
else {
$output .= $node->body;
}
$output .= "
\n";
if (theme_get_setting("toggle_node_info_$node->type")) {
$submitted['node_submitted'] = array(
'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
'html' => TRUE,
);
}
else {
$submitted['node_submitted'] = array();
}
$terms = array();
if (module_exists('taxonomy')) {
$terms = taxonomy_link("taxonomy terms", $node);
}
$links = array_merge($submitted, $terms);
if ($node->links) {
$links = array_merge($links, $node->links);
}
if (count($links)) {
$output .= '
'. theme('links', $links, array('class' => 'links inline')) ."
\n";
}
$output .= "
\n";
return $output;
}
function chameleon_comment($comment, $links = "") {
$submitted['comment_submitted'] = array(
'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))),
'html' => TRUE,
);
$output = "\n";
return $output;
}
function chameleon_help() {
if ($help = menu_get_active_help()) {
return ''. $help .'
';
}
}
". l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") ."
\n"; $output .= "