/[drupal]/contributions/modules/birthdays/birthdays-block.tpl.php
ViewVC logotype

Contents of /contributions/modules/birthdays/birthdays-block.tpl.php

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


Revision 1.2 - (show annotations) (download) (as text)
Wed Oct 8 15:59:24 2008 UTC (13 months, 2 weeks ago) by maartenvg
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-0-RC1, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +8 -6 lines
File MIME type: text/x-php
Added preprocessed template for the birthdays page, to help customizing.
1 <?php
2 // $Id: birthdays-block.tpl.php,v 1.1 2008/10/08 12:08:31 maartenvg Exp $
3
4 /**
5 * @file birthdays-block.tpl.php
6 * Display the users that are having their birthday, as requested by one of the
7 * blocks.
8 *
9 * Available variables:
10 * - $no_birthdays: Boolean indicating whether there are birthdays.
11 * - $show_starsigns: Boolean indication whether to show the star sign.
12 * - $amount: Number of days or users to be shown in the block (depends
13 * on the type of block).
14 * - $block_type: Which block is shown? Either 'by_days' or 'by_birthdays'.
15 * - $more: Themed link to the Birthdays page.
16 * - $birthdays: Associative array with the following data:
17 * - 'username': Themed username with link to account.
18 * - 'age': Age the user will be after his/her birthday, shown
19 * depending on the settings of the module or the user's
20 * preference.
21 * - 'date': Month and day of birth of the user, formatted according
22 * the system's "short date format".
23 * - 'account': Entire account, for user pictures and other ways to
24 * improve the birthdays block.
25 * - 'starsign': Themed star sign.
26 */
27 ?>
28 <?php if ($no_birthdays): ?>
29 <p><?php print t('There are no birthdays soon.'); ?></p>
30 <?php else: ?>
31 <table>
32 <?php foreach($birthdays as $birthday): ?>
33 <tr>
34 <td>
35 <?php print $birthday['username'] ?>
36 <?php if ($birthday['show_age']): ?>
37 &nbsp;<small>(<?php print $birthday['age'] ?>)</small>
38 <?php endif; ?>
39 </td>
40 <td><?php print $birthday['date'] ?></td>
41 </tr>
42 <?php endforeach; ?>
43 </table>
44 <?php endif; ?>
45
46 <? print $more; ?>

  ViewVC Help
Powered by ViewVC 1.1.2