| 1 |
<?php |
<?php |
| 2 |
// $Id: slurpee.theme,v 1.20 2005/04/30 18:42:48 tdobes Exp $ |
// $Id: slurpee.theme,v 1.21 2005/08/25 21:00:54 dries Exp $ |
| 3 |
|
|
| 4 |
function slurpee_features() { |
function slurpee_features() { |
| 5 |
return array('toggle_name', 'toggle_mission', 'toggle_primary_links', 'toggle_search'); |
return array('toggle_name', 'toggle_mission', 'toggle_search', 'toggle_favicon'); |
| 6 |
|
} |
| 7 |
|
|
| 8 |
|
function slurpee_regions() { |
| 9 |
|
return array( |
| 10 |
|
'left' => t('left sidebar'), |
| 11 |
|
'right' => t('right sidebar') |
| 12 |
|
); |
| 13 |
} |
} |
| 14 |
|
|
| 15 |
function slurpee_page($content) { |
function slurpee_page($content) { |
| 16 |
global $base_url; |
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"; |
| 30 |
$output .= ($slogan = variable_get("site_slogan", "")) ? " - $slogan" : ""; |
$output .= ($slogan = variable_get("site_slogan", "")) ? " - $slogan" : ""; |
| 31 |
} |
} |
| 32 |
$output .= "</title>\n"; |
$output .= "</title>\n"; |
|
$output .= " <link rel=\"shortcut icon\" href=\"" . $base_url . "/favicon.ico\" type=\"image/x-icon\" />\n"; |
|
| 33 |
$output .= theme_get_styles(); |
$output .= theme_get_styles(); |
| 34 |
$output .= "\n</head>\n\n"; |
$output .= "\n</head>\n\n"; |
| 35 |
|
|
| 36 |
$output .= "<body bgcolor=\"#FFFFFF\"" . theme_onload_attribute() . ">\n"; |
$output .= "<body bgcolor=\"#FFFFFF\">\n"; |
| 37 |
$output .= " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; |
$output .= " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; |
| 38 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 39 |
$output .= " <td bgcolor=\"#958BF3\" height=\"30\">\n"; |
$output .= " <td bgcolor=\"#958BF3\" height=\"30\">\n"; |
| 56 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 57 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 58 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 59 |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 60 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 61 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 62 |
$output .= " <td bgcolor=\"#5666D1\" height=\"40\" class=\"slurpee-pagetitle\">\n"; |
$output .= " <td bgcolor=\"#5666D1\" height=\"40\" class=\"slurpee-pagetitle\">\n"; |
| 63 |
$output .= " "; |
$output .= " "; |
| 64 |
if (theme_get_setting('toggle_name')) { |
if (theme_get_setting('toggle_name')) { |
| 65 |
$output .= l(variable_get("site_name", "drupal"), "", array("title" => t("Return to the main page."), "style" => "color: white; text-decoration: none")) . "\n"; |
$output .= l(variable_get("site_name", "drupal"), "", array("title" => t("Home"), "style" => "color: white; text-decoration: none;")) . "\n"; |
| 66 |
} |
} |
| 67 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 68 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 69 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 70 |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 71 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 72 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 73 |
$output .= " <td bgcolor=\"#B0E6ED\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#B0E6ED\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 74 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 75 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 76 |
$output .= " <td bgcolor=\"#61CCDA\" height=\"8\" align=\"center\">\n"; |
$output .= " <td bgcolor=\"#61CCDA\" height=\"8\" align=\"center\">\n"; |
| 77 |
$output .= " ". theme_get_setting('primary_links') ."\n"; |
$output .= " ". theme('links', menu_primary_links()) ."\n"; |
| 78 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 79 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 80 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 81 |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 82 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 83 |
$output .= " </table>\n"; |
$output .= " </table>\n"; |
| 84 |
|
|
| 115 |
|
|
| 116 |
$output .= " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; |
$output .= " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; |
| 117 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 118 |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 119 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 120 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 121 |
$output .= " <td bgcolor=\"#B0E6ED\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#B0E6ED\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 122 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 123 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 124 |
$output .= " <td bgcolor=\"#61CCDA\" height=\"8\" align=\"center\">\n"; |
$output .= " <td bgcolor=\"#61CCDA\" height=\"8\" align=\"center\">\n"; |
| 125 |
$output .= " ". theme_get_setting('primary_links') ."\n"; |
$output .= " ". theme('links', menu_primary_links()) ."\n"; |
| 126 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 127 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 128 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 129 |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"" . path_to_theme() . "/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
$output .= " <td bgcolor=\"#000000\" height=\"1\"><img src=\"". base_path() . path_to_theme() ."/images/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\n"; |
| 130 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 131 |
$output .= " </table>\n\n"; |
$output .= " </table>\n\n"; |
| 132 |
|
|
| 143 |
return $output; |
return $output; |
| 144 |
} |
} |
| 145 |
|
|
| 146 |
function slurpee_node($node, $main = 0, $page = 0) { |
function slurpee_node($node, $teaser = 0, $page = 0) { |
| 147 |
if (module_exist("taxonomy")) { |
if (module_exist("taxonomy")) { |
| 148 |
$terms = taxonomy_link("taxonomy terms", $node); |
$terms = taxonomy_link("taxonomy terms", $node); |
| 149 |
} |
} |
| 154 |
$output .= " <table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" style=\"text-align : left;\" class=\"slurpee-box\">\n"; |
$output .= " <table width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" style=\"text-align : left;\" class=\"slurpee-box\">\n"; |
| 155 |
if ($page == 0) { |
if ($page == 0) { |
| 156 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 157 |
$output .= " <td class=\"slurpee-centreboxtitle\"" . $colspan . ">" . l($node->title, "node/$node->nid") . "</td>\n"; |
$output .= " <td class=\"slurpee-centreboxtitle\"" . $colspan . ">". ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."</td>\n"; |
| 158 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 159 |
} |
} |
| 160 |
if (count($terms) || theme_get_setting("toggle_node_info_$node->type")) { |
if (count($terms) || theme_get_setting("toggle_node_info_$node->type")) { |
| 173 |
} |
} |
| 174 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 175 |
$output .= " <td class=\"slurpee-centreboxcontent\"" . $colspan . ">\n"; |
$output .= " <td class=\"slurpee-centreboxcontent\"" . $colspan . ">\n"; |
| 176 |
if ($main && $node->teaser) { |
if ($teaser && $node->teaser) { |
| 177 |
$output .= " " . $node->teaser . "\n"; |
$output .= " " . $node->teaser . "\n"; |
| 178 |
} |
} |
| 179 |
else { |
else { |
| 194 |
} |
} |
| 195 |
|
|
| 196 |
|
|
| 197 |
function slurpee_comment($comment, $link = "") { |
function slurpee_comment($comment, $links = array()) { |
| 198 |
$output = " <table width=\"100%\" border=\"0\">\n"; |
$output = " <table width=\"100%\" border=\"0\">\n"; |
| 199 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 200 |
$output .= " <td class=\"slurpee-commentheader\">\n"; |
$output .= " <td class=\"slurpee-commentheader\">\n"; |
| 212 |
if ($link) { |
if ($link) { |
| 213 |
$output .= " <tr>\n"; |
$output .= " <tr>\n"; |
| 214 |
$output .= " <td align=\"right\">\n"; |
$output .= " <td align=\"right\">\n"; |
| 215 |
$output .= " [ " . $link . " ]\n"; |
$output .= " [ ". theme('links', $links) ." ]\n"; |
| 216 |
$output .= " </td>\n"; |
$output .= " </td>\n"; |
| 217 |
$output .= " </tr>\n"; |
$output .= " </tr>\n"; |
| 218 |
} |
} |
| 239 |
} |
} |
| 240 |
|
|
| 241 |
function slurpee_links($links, $delimiter = " · ") { |
function slurpee_links($links, $delimiter = " · ") { |
| 242 |
|
if (!is_array($links)) { |
| 243 |
|
return ''; |
| 244 |
|
} |
| 245 |
return implode($delimiter, $links); |
return implode($delimiter, $links); |
| 246 |
} |
} |
| 247 |
|
|
| 265 |
return '<div class="help">'. $help .'</div><hr />'; |
return '<div class="help">'. $help .'</div><hr />'; |
| 266 |
} |
} |
| 267 |
} |
} |
|
|
|
|
?> |
|