| 1 |
<?php |
<?php |
| 2 |
// $Id: marvinclassic.theme,v 1.4 2005/03/31 19:53:49 tdobes Exp $ |
// $Id: marvinclassic.theme,v 1.5 2005/04/30 18:42:48 tdobes Exp $ |
| 3 |
|
|
| 4 |
function marvinclassic_features() { |
function marvinclassic_features() { |
| 5 |
return array('logo', 'toggle_primary_links', 'toggle_secondary_links'); |
return array('logo', 'toggle_favicon'); |
| 6 |
|
} |
| 7 |
|
|
| 8 |
|
function marvinclassic_regions() { |
| 9 |
|
return array( |
| 10 |
|
'left' => t('left sidebar'), |
| 11 |
|
'right' => t('right sidebar') |
| 12 |
|
); |
| 13 |
} |
} |
| 14 |
|
|
| 15 |
function marvinclassic_page($content) { |
function marvinclassic_page($content) { |
| 16 |
|
if (theme_get_setting('toggle_favicon')) { |
| 17 |
|
drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />'); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; |
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; |
| 21 |
$output .= "<html>\n"; |
$output .= "<html>\n"; |
| 22 |
$output .= "<head>\n"; |
$output .= "<head>\n"; |
| 34 |
$output .= "</title>\n"; |
$output .= "</title>\n"; |
| 35 |
$output .= theme_get_styles(); |
$output .= theme_get_styles(); |
| 36 |
$output .= "</head>\n"; |
$output .= "</head>\n"; |
| 37 |
$output .= "<body ". theme_onload_attribute() .">\n"; |
$output .= "<body>\n"; |
| 38 |
|
|
| 39 |
$output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n"; |
$output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n"; |
| 40 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 41 |
$output .= " <td>"; |
$output .= " <td>"; |
| 42 |
if ($logo = theme_get_setting('logo')) { |
if ($logo = theme_get_setting('logo')) { |
| 43 |
$output .= "<a href=\"./\" title=\"Home\"><img src=\"$logo\" alt=\"Home\" /></a>"; |
$output .= l('<img src="'. theme_get_setting('logo') .'" alt="'. t('Home') .'" />', '', array('title' => t('Home')), NULL, NULL, FALSE, TRUE); |
| 44 |
} |
} |
| 45 |
$output .= "</td>\n"; |
$output .= "</td>\n"; |
| 46 |
$output .= " <td> " . theme_get_setting('secondary_links') ."</td>\n"; |
$output .= " <td> ". theme('links', menu_secondary_links()) ."</td>\n"; |
| 47 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 48 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 49 |
$output .= " <td colspan=\"2\" style=\"text-align: right;\">". theme_get_setting('primary_links') ."</td>\n"; |
$output .= " <td colspan=\"2\" style=\"text-align: right;\">". theme('links', menu_primary_links()) ."</td>\n"; |
| 50 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 51 |
$output .= "</table>\n"; |
$output .= "</table>\n"; |
| 52 |
|
|
| 89 |
$output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n"; |
$output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n"; |
| 90 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 91 |
$output .= " <td colspan=\"2\" style=\"text-align: center;\">"; |
$output .= " <td colspan=\"2\" style=\"text-align: center;\">"; |
| 92 |
$output .= "<p>". theme_get_setting('primary_links') ."</p><p>". variable_get("site_footer", "") ."</p>\n"; |
$output .= "<p>". theme('links', menu_primary_links()) ."</p><p>". variable_get("site_footer", "") ."</p>\n"; |
| 93 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 94 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 95 |
$output .= "</table>\n"; |
$output .= "</table>\n"; |
| 99 |
return $output; |
return $output; |
| 100 |
} |
} |
| 101 |
|
|
| 102 |
function marvinclassic_node($node, $main = 0, $page = 0) { |
function marvinclassic_node($node, $teaser = 0, $page = 0) { |
| 103 |
|
|
| 104 |
$output = "<div class=\"node\">\n"; |
$output = "<div class=\"node\">\n"; |
| 105 |
if (!$page) { |
if (!$page) { |
| 106 |
$output .= "<h2 class=\"title\">". l($node->title, "node/$node->nid") ."</h2>\n"; |
$output .= "<h2 class=\"title\">". ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."</h2>\n"; |
| 107 |
} |
} |
| 108 |
|
|
| 109 |
if (theme_get_setting("toggle_node_info_$node->type")) { |
if (theme_get_setting("toggle_node_info_$node->type")) { |
| 110 |
$output .= "<div class=\"submitted\">". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) ."</div>"; |
$output .= "<div class=\"submitted\">". t("Submitted by %a on %b", array("%a" => theme('username', $node), "%b" => format_date($node->created, "large"))) ."</div>"; |
| 111 |
} |
} |
| 112 |
|
|
| 113 |
if (module_exist("taxonomy") && ($taxonomy = taxonomy_link("taxonomy terms", $node))) { |
if (module_exist("taxonomy") && ($taxonomy = taxonomy_link("taxonomy terms", $node))) { |
| 116 |
|
|
| 117 |
$output .= "<div class=\"content\">"; |
$output .= "<div class=\"content\">"; |
| 118 |
|
|
| 119 |
if ($main && $node->teaser) { |
if ($teaser && $node->teaser) { |
| 120 |
$output .= $node->teaser; |
$output .= $node->teaser; |
| 121 |
} |
} |
| 122 |
else { |
else { |
| 135 |
|
|
| 136 |
} |
} |
| 137 |
|
|
| 138 |
function marvinclassic_comment($comment, $link = "") { |
function marvinclassic_comment($comment, $links = array()) { |
| 139 |
// Create comment header: |
// Create comment header: |
| 140 |
$output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n"; |
$output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n"; |
| 141 |
$output .= " <tr style=\"background-color: #000000;\">\n"; |
$output .= " <tr style=\"background-color: #000000;\">\n"; |
| 154 |
|
|
| 155 |
// Author: |
// Author: |
| 156 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 157 |
$output .= " <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n"; |
$output .= " <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". theme('username', $comment) ."</td>\n"; |
| 158 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 159 |
|
|
| 160 |
// Date |
// Date |
| 172 |
} |
} |
| 173 |
|
|
| 174 |
// Print bottom link(s): |
// Print bottom link(s): |
| 175 |
$output .= " <tr><td style=\"background-color: #eaeaea; text-align: right;\">$link</td></tr>\n"; |
$output .= " <tr><td style=\"background-color: #eaeaea; text-align: right;\">". theme('links', $links) ."</td></tr>\n"; |
| 176 |
$output .= " </table>\n"; |
$output .= " </table>\n"; |
| 177 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 178 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 183 |
} |
} |
| 184 |
|
|
| 185 |
function marvinclassic_links($links, $delimiter = " · ") { |
function marvinclassic_links($links, $delimiter = " · ") { |
| 186 |
|
if (!is_array($links)) { |
| 187 |
|
return ''; |
| 188 |
|
} |
| 189 |
return implode($delimiter, $links); |
return implode($delimiter, $links); |
| 190 |
} |
} |
| 191 |
|
|
| 194 |
return '<div class="help">'. $help .'</div><hr />'; |
return '<div class="help">'. $help .'</div><hr />'; |
| 195 |
} |
} |
| 196 |
} |
} |
|
|
|
|
?> |
|