', theme_linktree(), '
', $txt['months_titles'][$context['current_month']], ' ', $context['current_year'], ' | ||||||
', $txt['days'][$day], ' | '; echo '||||||
';
// Skip it if it should be blank - it's not a day if it has no number.
if (!empty($day['day']))
{
// Should the day number be a link?
if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
echo '
', $day['day'], '';
else
echo '
', $day['day'];
// Is this the first day of the week? (and are we showing week numbers?)
if ($day['is_first_day'])
echo ' - ', $txt['calendar51'], ' ', $week['number'], '';
// Are there any holidays?
if (!empty($day['holidays']))
echo '
', $txt['calendar5'], ' ', implode(', ', $day['holidays']), ' ';
// Show any birthdays...
if (!empty($day['birthdays']))
{
echo '
', $txt['calendar3'], ' ';
/* Each of the birthdays has:
id, name (person), age (if they have one set?), and is_last. (last in list?) */
foreach ($day['birthdays'] as $member)
echo '
', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', ';
echo '
';
}
// Any special posted events?
if (!empty($day['events']))
{
echo '
', $txt['calendar4'], '';
/* The events are made up of:
title, href, is_last, can_edit (are they allowed to?), and modify_href. */
foreach ($day['events'] as $event)
{
// If they can edit the event, show a star they can click on....
if ($event['can_edit'])
echo '
* ';
echo '
', $event['link'], $event['is_last'] ? '' : ', ';
}
echo '
';
}
}
echo '
| ';
}
echo '