/[drupal]/contributions/theme-engines/phptal/template.php
ViewVC logotype

Contents of /contributions/theme-engines/phptal/template.php

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


Revision 1.1 - (show annotations) (download) (as text)
Thu Feb 1 21:38:11 2007 UTC (2 years, 9 months ago) by olav
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Port to Drupal-5; Integrated with olav-theme
1 <?php
2 /**
3 *
4 */
5 function phptal_created(&$node) {
6 return t('by %a on %b', array(
7 '%a' => theme('username', $node), '%b' => format_date($node->created)));
8 }
9
10 function phptal_node_class($sticky, $zebra, $status, $teaser, $type='node') {
11 $class = 'node ' . $type;
12 $class .= $sticky ? '-sticky' : '';
13 $class .= $zebra == 'odd' ? ' odd' : ' even';
14 $class .= !$status ? " node-unpublished" : '';
15 $class .= $teaser ? " node-teaser" : '';
16
17 return $class;
18 }
19
20 function phptal_block_class($block) {
21 return "region-$block->region block block-$block->module";
22 }
23
24 function phptal_block_id($block) {
25 return "block-$block->module-$block->delta";
26 }
27
28 function phptal_permalink($node_url) {
29 return sprintf('<a href="%s" title="%s">#</a>', $node_url,
30 check_plain(t('Copy this link as the URL of this article')));
31 }
32
33 function phptal_comment_class($new) {
34 return 'comment' . ($new ? ' comment-new' : '');
35 }
36

  ViewVC Help
Powered by ViewVC 1.1.2