\n"; $output .= "". variable_get(site_name, "drupal") ."background\" text=\"$this->foreground\">"; $output .= "
"; print $output; $this->box(t("Navigation"), @implode("
", link_page())); theme_blocks("all", $this); print "
"; } function links($links, $delimiter = " | ") { return implode($delimiter, $links); } function image($name) { return "misc/$name"; } function node($node, $main) { if (function_exists("taxonomy_node_get_terms")) { foreach (taxonomy_node_get_terms($node->nid) as $term) { $terms[] = l($term->name, array("or" => $term->tid), "index"); } } $output = "". check_output($node->title) ." by ". format_name($node) ."
"; if (count($terms)) { $output .= "(". $this->links($terms) .")
"; } if ($main && $node->teaser) { $output .= strip_tags(check_output($node->teaser, 1)); } else { $output .= check_output($node->body, 1); } if ($links = link_node($node, $main)) { $output .= "
[ ". $this->links($links) ." ]"; } $output .= "
"; print $output; } function box($subject, $content, $region = "main") { $output = "". check_output($subject) ."
". check_output($content) ."

"; print $output; } function footer() { $output = "

"; $output .= ""; print $output; } } function theme_mark() { /* ** Return a marker. Used to indicate new comments or required form ** fields. */ return "*"; } function theme_error($message) { /* ** Return an error message. */ return "
$message
"; } function theme_list() { static $list; if (!$list) { $list = array(); $result = db_query("SELECT * FROM system where type = 'theme' AND status = '1' ORDER BY name"); while ($theme = db_fetch_object($result)) { if (file_exists($theme->filename)) { $list[$theme->name] = $theme; } } } return $list; } function theme_init() { global $user; $themes = theme_list(); $name = $user->theme ? $user->theme : variable_get("theme_default", 0); if (is_object($themes[$name])) { include_once($themes[$name]->filename); $theme_class = "Theme_$name"; @$obj =& new $theme_class; return $obj; } @$obj =& new BaseTheme; return $obj; } function theme_blocks($region, &$theme) { global $user, $PHP_SELF; $result = db_query("SELECT * FROM blocks WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = '%s' " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1); while ($result && ($block = db_fetch_object($result))) { if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match("|$block->path|", $PHP_SELF))) { $block_data = module_invoke($block->module, "block", "view", $block->delta); if ($block_data["content"]) { $theme->box($block_data["subject"], $block_data["content"], $region); } } } } function theme_invoke() { global $theme; $args = func_get_args(); $function = array_shift($args); if (method_exists($theme, $function)) { return call_user_method_array($function, $theme, $args); } else { return call_user_func_array($function, $args); } } ?>