/[drupal]/contributions/themes/goofy/goofy.theme
ViewVC logotype

Diff of /contributions/themes/goofy/goofy.theme

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.21, Sat Apr 30 18:42:47 2005 UTC revision 1.22, Sun Mar 5 09:13:56 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: goofy.theme,v 1.20 2005/03/31 19:53:48 tdobes Exp $  // $Id: goofy.theme,v 1.21 2005/04/30 18:42:47 tdobes Exp $
3    
4  function goofy_features() {  function goofy_features() {
5    return array('logo', 'toggle_primary_links', 'toggle_node_user_picture', 'toggle_comment_user_picture');    return array('logo', 'toggle_node_user_picture', 'toggle_comment_user_picture', 'toggle_favicon');
6    }
7    
8    function goofy_regions() {
9      return array(
10           'left' => t('left sidebar'),
11           'right' => t('right sidebar')
12      );
13  }  }
14    
15  function goofy_settings() {  function goofy_settings() {
# Line 12  function goofy_settings() { Line 19  function goofy_settings() {
19  }  }
20    
21  function goofy_page($content) {  function goofy_page($content) {
22      if (theme_get_setting('toggle_favicon')) {
23        drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
24      }
25    
26    $colspan = 1;    $colspan = 1;
27    if ($blocksleft = theme("blocks", "left")) {    if ($blocksleft = theme("blocks", "left")) {
28      $colspan++;      $colspan++;
# Line 40  function goofy_page($content) { Line 51  function goofy_page($content) {
51    $output .= theme_get_styles();    $output .= theme_get_styles();
52    $output .= '    $output .= '
53    </head>    </head>
54    <body' . theme_onload_attribute() . '>    <body>
55      <table border="0" cellspacing="3" cellpadding="0" style="width: 100%;" class="goofy">      <table border="0" cellspacing="3" cellpadding="0" style="width: 100%;" class="goofy">
56       <tr>       <tr>
57        <td colspan="' . $colspan . '" style="width: 100%;"><table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy"><tr><td>';        <td colspan="' . $colspan . '" style="width: 100%;"><table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy"><tr><td>';
58    if ($logo = theme_get_setting('logo')) {    if ($logo = theme_get_setting('logo')) {
59      $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);
60    }    }
61    $output .= '</td><td style="text-align: right;">';    $output .= '</td><td style="text-align: right;">';
62    $logo2 = variable_get('goofy_default_logo2', 1) ? (path_to_theme() .'/drupal.png') : variable_get('goofy_logo2', '');    $logo2 = variable_get('goofy_default_logo2', 1) ? (base_path() . path_to_theme() .'/drupal.png') : variable_get('goofy_logo2', '');
63    if ($logo2) {    if ($logo2) {
64      $output .= '<img src="'. $logo2 .'" alt="" />';      $output .= '<img src="'. $logo2 .'" alt="" />';
65    }    }
66    $output .= '</td></tr></table>    $output .= '</td></tr></table>
67  ' . goofy_linksbar() . '  ' . goofy_linksbar(($primary_links = theme('links', menu_primary_links())) ? $primary_links : '&nbsp;') . '
68        </td>        </td>
69       </tr>       </tr>
70       <tr>       <tr>
# Line 97  function goofy_page($content) { Line 108  function goofy_page($content) {
108    $output .= '     </tr>    $output .= '     </tr>
109       <tr>       <tr>
110        <td colspan="' . $colspan . '">        <td colspan="' . $colspan . '">
111  ' . goofy_linksbar() . '  ' . goofy_linksbar(($primary_links = theme('links', menu_primary_links())) ? $primary_links : '&nbsp;') . '
112        </td>        </td>
113       </tr>       </tr>
114     </table>     </table>
# Line 109  function goofy_page($content) { Line 120  function goofy_page($content) {
120    return $output;    return $output;
121  }  }
122    
123  function goofy_linksbar() { // helper function to prevent double code  function goofy_linksbar($links) { // helper function to prevent double code
124      $img_path = base_path() . path_to_theme() .'/images/';
125    return '       <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy">    return '       <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy">
126          <tr>          <tr>
127           <td><img src="' . path_to_theme() . '/images/lg-ul.png" alt="" style="display: block;" /></td>           <td><img src="'. $img_path .'lg-ul.png" alt="" style="display: block;" /></td>
128           <td class="lgu" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>           <td class="lgu" style="width: 100%;"><img src="'. $img_path .'null.gif" alt="" /></td>
129           <td><img src="' . path_to_theme() . '/images/lg-ur.png" alt="" style="display: block;" /></td>           <td><img src="'. $img_path .'lg-ur.png" alt="" style="display: block;" /></td>
130          </tr>          </tr>
131          <tr>          <tr>
132           <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>           <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
133           <td class="lgcnt" style="width: 100%; /* vertical-align: top; */"><div style="text-align: center;">'. (($links = theme_get_setting('primary_links')) ? $links : '&nbsp;') .'</div></td>           <td class="lgcnt" style="width: 100%; /* vertical-align: top; */"><div style="text-align: center;">'. $links .'</div></td>
134           <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>           <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
135          </tr>          </tr>
136          <tr>          <tr>
137           <td><img src="' . path_to_theme() . '/images/lg-dl.png" alt="" style="display: block;" /></td>           <td><img src="'. $img_path .'lg-dl.png" alt="" style="display: block;" /></td>
138           <td class="lgd" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>           <td class="lgd" style="width: 100%;"><img src="'. $img_path .'null.gif" alt="" /></td>
139           <td><img src="' . path_to_theme() . '/images/lg-dr.png" alt="" style="display: block;" /></td>           <td><img src="'. $img_path .'lg-dr.png" alt="" style="display: block;" /></td>
140          </tr>          </tr>
141         </table>';         </table>';
142  }  }
143    
144  function goofy_node($node, $main = 0, $page = 0) {  function goofy_node($node, $teaser = 0, $page = 0) {
145      $img_path = base_path() . path_to_theme() .'/images/';
146    $output = "\n<!-- node: \"". check_plain($node->title) ."\" -->\n";    $output = "\n<!-- node: \"". check_plain($node->title) ."\" -->\n";
147    $title = l($node->title, "node/$node->nid");    $title = ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title));
148    $subleft = theme_get_setting("toggle_node_info_$node->type") ? t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) : '';    $subleft = theme_get_setting("toggle_node_info_$node->type") ? t("Submitted by %a on %b", array("%a" => theme('username', $node), "%b" => format_date($node->created, "large"))) : '';
149    
150    if (module_exist("taxonomy")) {    if (module_exist("taxonomy")) {
151      $terms = taxonomy_link("taxonomy terms", $node);      $terms = taxonomy_link("taxonomy terms", $node);
# Line 148  function goofy_node($node, $main = 0, $p Line 161  function goofy_node($node, $main = 0, $p
161      $body .= $picture;      $body .= $picture;
162    }    }
163    
164    if ($main && $node->teaser) {    if ($teaser && $node->teaser) {
165      $body .= $node->teaser;      $body .= $node->teaser;
166    }    }
167    else {    else {
# Line 162  function goofy_node($node, $main = 0, $p Line 175  function goofy_node($node, $main = 0, $p
175    $output .= '    $output .= '
176  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy node'. ($node->sticky ? ' sticky' : '') .'">  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy node'. ($node->sticky ? ' sticky' : '') .'">
177   <tr>   <tr>
178    <td><img src="' . path_to_theme() . '/images/or-ul.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ul.png" alt="" style="display: block;" /></td>
179    <td class="oru" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="oru" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" alt="" /></td>
180    <td><img src="' . path_to_theme() . '/images/or-ur.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ur.png" alt="" style="display: block;" /></td>
181   </tr>   </tr>
182   <tr>   <tr>
183    <td class="orl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orl"><img src="'. $img_path .'null.gif" alt="" /></td>
184    <td class="orcnt" style="width: 100%; vertical-align: top;" colspan="2">' . $title . '</td>    <td class="orcnt" style="width: 100%; vertical-align: top;" colspan="2">'. $title .'</td>
185    <td class="orr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orr"><img src="'. $img_path .'null.gif" alt="" /></td>
186   </tr>   </tr>
187   <tr>   <tr>
188    <td class="orl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orl"><img src="'. $img_path .'null.gif" alt="" /></td>
189    <td class="orcnt" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" height="5" alt="" /></td>    <td class="orcnt" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" height="5" alt="" /></td>
190    <td class="orr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orr"><img src="'. $img_path .'null.gif" alt="" /></td>
191   </tr>   </tr>
192   <tr>   <tr>
193    <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
194    <td class="lgcnt" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" height="4" alt="" /></td>    <td class="lgcnt" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" height="4" alt="" /></td>
195    <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
196   </tr>   </tr>
197   <tr>   <tr>
198    <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
199    <td class="lgcnt"><small>' . $subleft . '</small></td>    <td class="lgcnt"><small>'. $subleft .'</small></td>
200    <td class="lgcntnw" style="text-align: right;">' . $subright . '</td>    <td class="lgcntnw" style="text-align: right;">'. $subright .'</td>
201    <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
202   </tr>   </tr>
203   <tr>   <tr>
204    <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
205    <td class="lgcnt" style="width: 100%;" colspan="2"><hr />' . $body . '</td>    <td class="lgcnt" style="width: 100%;" colspan="2"><hr />'. $body .'</td>
206    <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
207   </tr>   </tr>
208   <tr>   <tr>
209    <td><img src="' . path_to_theme() . '/images/lg-dl.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dl.png" alt="" style="display: block;" /></td>
210    <td class="lgd" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgd" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" alt="" /></td>
211    <td><img src="' . path_to_theme() . '/images/lg-dr.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dr.png" alt="" style="display: block;" /></td>
212   </tr>   </tr>
213  </table>  </table>
214  <br />  <br />
# Line 205  function goofy_node($node, $main = 0, $p Line 218  function goofy_node($node, $main = 0, $p
218  }  }
219    
220    
221  function goofy_comment($comment, $link = '') {  function goofy_comment($comment, $links = array()) {
222      $img_path = base_path() . path_to_theme() .'/images/';
223    $output = "\n<!-- comment: \"$comment->subject\" -->\n";    $output = "\n<!-- comment: \"$comment->subject\" -->\n";
224    $subject = $comment->subject;    $subject = $comment->subject;
225    $author = "<strong>" . format_name($comment) . "</strong>";    $author = "<strong>" . theme('username', $comment) . "</strong>";
226    $date = format_date($comment->timestamp);    $date = format_date($comment->timestamp);
227    $body = $comment->comment ."<hr /><div style=\"text-align: right;\">[ $link ]</div>";    $body = $comment->comment ."<hr /><div style=\"text-align: right;\">[ ". theme('links', $links) ." ]</div>";
228    $picture = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '';    $picture = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '';
229    
230  $output .= '  $output .= '
231  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy comment">  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy comment">
232   <tr>   <tr>
233    <td><img src="' . path_to_theme() . '/images/or-ul.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ul.png" alt="" style="display: block;" /></td>
234    <td class="oru" style="width: 100%;" colspan="2"></td>    <td class="oru" style="width: 100%;" colspan="2"></td>
235    <td><img src="' . path_to_theme() . '/images/or-ur.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ur.png" alt="" style="display: block;" /></td>
236   </tr>   </tr>
237   <tr>   <tr>
238    <td class="orl"></td>    <td class="orl"></td>
# Line 226  $output .= ' Line 240  $output .= '
240     <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;" class="goofy">     <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;" class="goofy">
241      <tr>      <tr>
242       <td style="width: 5%; vertical-align: top;"><div style="text-align: right;">' . t("Subject") . ':&nbsp;</div></td>       <td style="width: 5%; vertical-align: top;"><div style="text-align: right;">' . t("Subject") . ':&nbsp;</div></td>
243       <td class="left" style="width: 80%;"><strong>' . $subject . '</strong></td>       <td class="left" style="width: 80%;"><strong>'. $subject .'</strong></td>
244       <td rowspan="3" style="vertical-align: middle; width: 15%;">'. $picture .'</td>       <td rowspan="3" style="vertical-align: middle; width: 15%;">'. $picture .'</td>
245      </tr>      </tr>
246      <tr>      <tr>
247       <td style="vertical-align: top;"><div style="text-align: right;">' . t("Author") . ':&nbsp;</div></td>       <td style="vertical-align: top;"><div style="text-align: right;">' . t("Author") . ':&nbsp;</div></td>
248       <td class="left">' . $author . '</td>       <td class="left">'. $author .'</td>
249      </tr>      </tr>
250      <tr>      <tr>
251       <td><div style="text-align: right;">' . t("Date") . ':&nbsp;</div></td>       <td><div style="text-align: right;">' . t("Date") . ':&nbsp;</div></td>
252       <td class="left">' . $date . '</td>       <td class="left">'. $date .'</td>
253      </tr>      </tr>
254     </table>     </table>
255    </td>    </td>
# Line 243  $output .= ' Line 257  $output .= '
257   </tr>   </tr>
258   <tr>   <tr>
259    <td class="orl"></td>    <td class="orl"></td>
260    <td class="orcnt" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" height="5" alt="" /></td>    <td class="orcnt" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" height="5" alt="" /></td>
261    <td class="orr"></td>    <td class="orr"></td>
262   </tr>   </tr>
263   <tr>   <tr>
264    <td class="lgl"></td>    <td class="lgl"></td>
265    <td class="lgcnt" style="width: 100%;" colspan="2"><img src="' . path_to_theme() . '/images/null.gif" height="4" alt="" /></td>    <td class="lgcnt" style="width: 100%;" colspan="2"><img src="'. $img_path .'null.gif" height="4" alt="" /></td>
266    <td class="lgr"></td>    <td class="lgr"></td>
267   </tr>   </tr>
268   <tr>   <tr>
# Line 257  $output .= ' Line 271  $output .= '
271    <td class="lgr"></td>    <td class="lgr"></td>
272   </tr>   </tr>
273   <tr>   <tr>
274    <td><img src="' . path_to_theme() . '/images/lg-dl.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dl.png" alt="" style="display: block;" /></td>
275    <td class="lgd" style="width: 100%;" colspan="2"></td>    <td class="lgd" style="width: 100%;" colspan="2"></td>
276    <td><img src="' . path_to_theme() . '/images/lg-dr.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dr.png" alt="" style="display: block;" /></td>
277   </tr>   </tr>
278  </table>  </table>
279  <br />  <br />
# Line 268  $output .= ' Line 282  $output .= '
282  }  }
283    
284  function goofy_box($subject, $content, $region = 'main') {  function goofy_box($subject, $content, $region = 'main') {
285      $img_path = base_path() . path_to_theme() .'/images/';
286    return '    return '
287  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy">  <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;" class="goofy">
288   <tr>   <tr>
289    <td><img src="' . path_to_theme() . '/images/or-ul.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ul.png" alt="" style="display: block;" /></td>
290    <td class="oru" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="oru" style="width: 100%;"><img src="'. $img_path .'null.gif" alt="" /></td>
291    <td><img src="' . path_to_theme() . '/images/or-ur.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'or-ur.png" alt="" style="display: block;" /></td>
292   </tr>   </tr>
293   <tr>   <tr>
294    <td class="orl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orl"><img src="'. $img_path .'null.gif" alt="" /></td>
295    <td class="orcnt" style="width: 100%; vertical-align: top;">'. ($subject ? $subject : '&nbsp;') .'</td>    <td class="orcnt" style="width: 100%; vertical-align: top;">'. ($subject ? $subject : '&nbsp;') .'</td>
296    <td class="orr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orr"><img src="'. $img_path .'null.gif" alt="" /></td>
297   </tr>   </tr>
298   <tr>   <tr>
299    <td class="orl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orl"><img src="'. $img_path .'null.gif" alt="" /></td>
300    <td class="orcnt" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" height="5" alt="" /></td>    <td class="orcnt" style="width: 100%;"><img src="'. $img_path .'null.gif" height="5" alt="" /></td>
301    <td class="orr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="orr"><img src="'. $img_path .'null.gif" alt="" /></td>
302   </tr>   </tr>
303   <tr>   <tr>
304    <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
305    <td class="lgcnt" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" height="4" alt="" /></td>    <td class="lgcnt" style="width: 100%;"><img src="'. $img_path .'null.gif" height="4" alt="" /></td>
306    <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
307   </tr>   </tr>
308   <tr>   <tr>
309    <td class="lgl"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgl"><img src="'. $img_path .'null.gif" alt="" /></td>
310    <td class="lgcnt" style="width: 100%;">'. $content .'</td>    <td class="lgcnt" style="width: 100%;">'. $content .'</td>
311    <td class="lgr"><img src="' . path_to_theme() . '/images/null.gif" alt="" /></td>    <td class="lgr"><img src="'. $img_path .'null.gif" alt="" /></td>
312   </tr>   </tr>
313   <tr>   <tr>
314    <td><img src="' . path_to_theme() . '/images/lg-dl.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dl.png" alt="" style="display: block;" /></td>
315    <td class="lgd" style="width: 100%;"><img src="' . path_to_theme() . '/images/null.gif" width="150" height="1" alt="" /></td>    <td class="lgd" style="width: 100%;"><img src="'. $img_path .'null.gif" width="150" height="1" alt="" /></td>
316    <td><img src="' . path_to_theme() . '/images/lg-dr.png" alt="" style="display: block;" /></td>    <td><img src="'. $img_path .'lg-dr.png" alt="" style="display: block;" /></td>
317   </tr>   </tr>
318  </table>  </table>
319  <br />  <br />
# Line 317  function goofy_help() { Line 332  function goofy_help() {
332      return '<div class="help">'. $help .'</div><hr />';      return '<div class="help">'. $help .'</div><hr />';
333    }    }
334  }  }
   
 ?>  

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.2