/[drupal]/contributions/themes/sands_css/template.php
ViewVC logotype

Contents of /contributions/themes/sands_css/template.php

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Apr 6 19:56:39 2006 UTC (3 years, 7 months ago) by samat
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-4-6, DRUPAL-4-7
File MIME type: text/x-php
initial commit
1 <?php
2 function sands_css_breadcrumb($breadcrumb)
3 {
4 return implode(' &raquo; ', $breadcrumb);
5 }
6
7 function sands_css_links($links, $delimiter = ' &bull;&nbsp;')
8 {
9 if (!is_array($links)) {
10 return '';
11 }
12
13 /* Maps a link to it's associated class */
14 $link_to_id = array(
15 t('edit') => 'edit',
16 t('delete') => 'delete',
17 t('Add a new comment to this page') => 'add-comment',
18 t('Share your thoughts and opinions related to this posting') => 'add-comment',
19 t('Jump to the first comment') => 'comment',
20 t('reply') => 'reply',
21 //t('read more') => 'read-more',
22 t('printer-friendly version') => 'print',
23 t('add child page') => 'add-child-page',
24 t('calendar') => 'calendar',
25 );
26
27 $new_links = array();
28
29 foreach ($links as $link) {
30 foreach ($link_to_id as $text => $id) {
31 if (strpos($link, $text)) {
32 $link = str_replace('<a ', "<a class=\"icon-$id\" ", $link);
33 break;
34 }
35 }
36 $new_links[] = $link;
37 }
38
39 return implode($delimiter, $new_links);
40 }
41
42 function sands_css_regions()
43 {
44 return array(
45 'left' => t('left sidebar'),
46 'right' => t('right sidebar')
47 );
48 }
49
50 // vim: et ts=2 sw=2:
51 ?>

  ViewVC Help
Powered by ViewVC 1.1.2