News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Enhanced Calendar

Started by Daniel15, January 29, 2007, 11:54:55 PM

Previous topic - Next topic

erlend_sh

1) Is this mod compatible with 1.1.3?
2) Has someone else picked up the development of this mod yet since Daniel15 left it?

JoannaGlass

Quote from: Sadr on August 04, 2007, 02:20:46 PM
1) Is this mod compatible with 1.1.3?
2) Has someone else picked up the development of this mod yet since Daniel15 left it?

Ditto?

Tony Reid

Quote from: JoannaGlass on August 21, 2007, 10:41:16 AM
Quote from: Sadr on August 04, 2007, 02:20:46 PM
1) Is this mod compatible with 1.1.3?
2) Has someone else picked up the development of this mod yet since Daniel15 left it?

Ditto?

This mod runs fine on 1.1.3
Tony Reid

ES23

#83
I'm using SMF 1.1.3 with Mambo 4.6.2,using SMF-Mambo Bridge 1.1 by Orstio.I have clear out quite alot of errors already but it's reported on my smf forum log some of the following errors:

http://www.website.com/forums/index.php?option=com_smf&Itemid=4&Itemid=4&action=calendar&year=2006&month=9&a
2: Invalid argument supplied for foreach()
File: /var/www/html/forums/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 256

http://www.website.com/forums/index.php?option=com_smf&Itemid=4&Itemid=4&action=calendar&year=2009&month=12&w
8: Undefined offset: 1
File: /var/www/html/forums/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 250

http://www.website.com/forums/index.php?option=com_smf&Itemid=4&Itemid=4&action=calendar&year=2006&month=1&wee
8: Undefined offset: 6
File: /var/www/html/forums/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 248

http://www.website.com/forums/index.php?option=com_smf&Itemid=4&Itemid=4&action=calendar&year=2005&month=12&we
8: Undefined offset: 1
File: /var/www/html/forums/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 250

http://www.website.com/forums/index.php?option=com_smf&Itemid=4&Itemid=4&action=calendar&year=2005&month=12&we
8: Undefined offset: 48
File: /var/www/html/forums/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 250

Here is my calendar.template.php file:

<?php// Version: 1.1; Calendar// The main calendar - January, for example.function template_main(){ global $context, $settings, $options, $txt, $scripturl, $modSettings, $func; echo ' <div style="padding: 3px;">', theme_linktree(), '</div> <table cellspacing="4" cellpadding="2" width="100%"> <tr> <td valign="top"> <table cellspacing="1" cellpadding="2" width="100%">'; // The previous month if (isset($context['previous_calendar'])) { echo ' <tr> <td> <table class="bordercolor" cellspacing="1" cellpadding="2" width="100%"> <tr class="titlebg"> <td align="center" colspan="8" style="padding: 5px;"> ', $txt['months_titles'][$context['current_month_prev']], ' ', $context['current_year_prev'], ' </td> </tr> <tr> <td class="titlebg2">&nbsp;</td>'; // Show each day of the week. foreach ($context['week_days'] as $day) echo ' <td class="titlebg2" width="14%" align="left">', $func['substr']($txt['days'][$day], 0, 1), '</td>'; echo ' </tr>'; /* Each week in weeks contains the following: days (a list of days), number (week # in the year.) */ foreach ($context['prevMonthWeeks'] as $week) { echo ' <tr> <td class="titlebg2"><a href="', $week['week'], '">&raquo;</a></td>'; /* Every day has the following: day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), holidays, events, birthdays. (last three are lists.) */ foreach ($week['days'] as $day) { // If this is today, make it a different color and show a border. echo ' <td valign="top" align="right" style="height: auto; padding: 2px;" class="', $day['is_today'] ? 'calendar_today' : (empty($day['day']) ? 'windowbg3' : 'windowbg'), '">'; // Skip it if it should be blank - it's not a day if it has no number. if (!empty($day['day'])) echo $day['day']; echo ' </td>'; } echo ' </tr>'; } echo ' </table> </td> </tr> <tr> <td>&nbsp;</td> </tr>'; } // Current month echo ' <tr> <td> <table class="bordercolor" cellspacing="1" cellpadding="2" width="100%">'; echo' <tr class="titlebg"> <td align="center" colspan="8" style="padding: 5px;"> ', $txt['months_titles'][$context['current_month']], ' ', $context['current_year'], ' </td> </tr> <tr> <td class="titlebg2">&nbsp;</td>'; // Show each day of the week. foreach ($context['week_days'] as $day) echo ' <td class="titlebg2" width="14%" align="center">', $func['substr']($txt['days'][$day], 0, 1), '</td>'; echo ' </tr>'; /* Each week in weeks contains the following: days (a list of days), number (week # in the year.) */ foreach ($context['weeks'] as $week) { // This is used to highlight the current week. $currentWeek = isset($_REQUEST['week']) && $_REQUEST['week'] == $week['number']; echo ' <tr class="bordercolor" cellspacing="1" cellpadding="2"> <td class="titlebg2"><a href="', $week['week'], '">&raquo;</a></td>'; /* Every day has the following: day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), holidays, events, birthdays. (last three are lists.) */ foreach ($week['days'] as $day) { // If this is today, make it a different color and show a border. echo ' <td valign="top" align="right" style="height: auto; padding: 2px;" class="', $day['is_today'] ? 'calendar_today' : (empty($day['day']) ? 'windowbg3' : ($currentWeek ? 'windowbg2' : 'windowbg')), '">'; // Skip it if it should be blank - it's not a day if it has no number. if (!empty($day['day'])) echo $day['day']; echo ' </td>'; } echo ' </tr>'; } echo ' </table> </td> </tr>'; if (isset($context['next_calendar'])) { echo ' <tr> <td>&nbsp;</td> </tr> <tr> <td> <table class="bordercolor" cellspacing="1" cellpadding="2" width="100%">'; echo' <tr class="titlebg"> <td align="center" colspan="8" style="padding: 5px;"> ', $txt['months_titles'][$context['current_month_next']], ' ', $context['current_year_next'], ' </td> </tr> <tr> <td class="titlebg2">&nbsp;</td>'; // Show each day of the week. foreach ($context['week_days'] as $day) echo ' <td class="titlebg2" width="14%" align="center">', $func['substr']($txt['days'][$day], 0, 1), '</td>'; echo ' </tr>'; /* Each week in weeks contains the following: days (a list of days), number (week # in the year.) */ foreach ($context['nextMonthWeeks'] as $week) { echo ' <tr> <td class="titlebg2"><a href="', $week['week'], '">&raquo;</a></td>'; /* Every day has the following: day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), holidays, events, birthdays. (last three are lists.) */ foreach ($week['days'] as $day) { // If this is today, make it a different color and show a border. echo ' <td valign="top" align="right" style="height: auto; padding: 2px;" class="', $day['is_today'] ? 'calendar_today' : ((empty($day['day']) || isset($_REQUEST['week']) && $week['week'] == $_REQUEST['week']) ? 'windowbg3' : 'windowbg'), '">'; // Skip it if it should be blank - it's not a day if it has no number. if (!empty($day['day'])) echo $day['day']; echo ' </td>'; } echo ' </tr>'; } echo ' </table> </td> </tr>'; } echo' </table> </td> <td width="80%" valign="top"> <table cellspacing="1" cellpadding="2" width="100%" class="bordercolor">'; if (isset($_REQUEST['week']) && (int) $_REQUEST['week'] <= 53 && (int)$_REQUEST['week'] > 0) { // Set the vars used for prev and next week vars if ($_REQUEST['week'] == 1 && isset($context['prevMonthWeeks'][53]['week'])) { $prevWeek = 53; $prevWeeks = isset($context['weeks'][$prevWeek]['week']) ? 'weeks' : 'prevMonthWeeks'; } elseif ($_REQUEST['week'] == 1 && isset($context['weeks'][52]['week'])) { $prevWeek = 52; $prevWeeks = isset($context['weeks'][$prevWeek]['week']) ? 'weeks' : 'prevMonthWeeks'; } else { $prevWeek = $_REQUEST['week'] - 1; $prevWeeks = isset($context['weeks'][$prevWeek]['week']) ? 'weeks' : 'prevMonthWeeks'; } // Next week vars if ($_REQUEST['week'] == 52 && isset($context['weeks'][53]['week'])) { $nextWeek = 53; $nextWeeks = 'weeks'; } elseif ($_REQUEST['week'] == 53) { $nextWeek = 1; $nextWeeks = isset($context['weeks'][$nextWeek]['week']) ? 'weeks' : 'nextMonthWeeks'; } else { $nextWeek = $_REQUEST['week'] + 1; $nextWeeks = isset($context['weeks'][$nextWeek]['week']) ? 'weeks' : 'nextMonthWeeks'; } echo ' <tr class="titlebg"> <td style="font-size: large;" align="center" colspan="7"> <a href="', $context[$prevWeeks][$prevWeek]['week'], '">&laquo;</a> &nbsp;', $txt['months_titles'][$context['current_month']], ' ', $context['current_year'], '&nbsp; <a href="', $context[$nextWeeks][$nextWeek]['week'], '">&raquo;</a> </td> </tr>'; // This var is used to determine if the first day of week is sunday or monday $weekOffset = !empty($options['calendar_start_day']) ? $options['calendar_start_day'] : 0; foreach ($context['weeks'][$_REQUEST['week']]['days'] as $day) { echo ' <tr class="windowbg3"> <td style="padding: 5px; font-size: small; font-weight: bold;" colspan="2"> <div style="text-align: left; margin: 0;"> ', $txt['days'][$weekOffset], ' ', !empty($day['day']) ? '<span style="float: right;"><a href="' . $scripturl . '?action=calendar;sa=post;month=' . $context['current_month'] . ';year=' . $context['current_year'] . ';day=' . $day['day'] . ';sesc=' . $context['session_id'] . '">' . $txt['calendar23'] . '</a></span>' : '', ' </div> </td>'; echo ' </tr>'; echo ' <tr class="windowbg2"> <td width="5%" align="center" class="', empty($day['day']) ? 'windowbg2' : 'windowbg', '" style="padding: 4px; font-size: small;"> ', empty($day['day']) ? '&nbsp;' : $day['day'], ' </td> <td width="95%">'; // Are there any holidays? if (!empty($day['holidays'])) echo ' <div class="smalltext" style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ', $day['holidays']), '</div>'; // Show any birthdays... if (!empty($day['birthdays'])) { echo ' <div class="smalltext"> <span style="color: #', $modSettings['cal_bdaycolor'], ';">', $txt['calendar3'], '</span> '; /* 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 ' <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', (!empty($member['color']) ? '<span style="color:'.$member['color'].';">' : ''), $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', (!empty($member['color']) ? '</span>' : ''), '</a>', $member['is_last'] ? '' : ', '; echo ' </div>'; } // Any special posted events? if (!empty($day['events'])) { echo ' <div class="smalltext"> <span style="color: #', $modSettings['cal_eventcolor'], ';">', $txt['calendar4'], '</span>'; /* 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 ' <a href="', $event['modify_href'], '" style="color: #FF0000;">*</a> '; echo ' ', $event['link'], $event['is_last'] ? '' : ', '; } echo ' </div>'; } echo ' </td> </tr>'; if ($context['last_day'] == $day['day']) echo ' <tr class="titlebg2"> <td height="10" colspan="2"></td> </tr>'; // This is used to set the offset between days depending if a week starts on sunday or monday $weekOffset++; if ($weekOffset == 7) $weekOffset = 0; } } else { echo ' <tr>'; // Show each day of the week. foreach ($context['week_days'] as $day) echo ' <td class="titlebg2" width="14%" align="center">', $txt['days'][$day], '</td>'; echo ' </tr>'; /* Each week in weeks contains the following: days (a list of days), number (week # in the year.) */ foreach ($context['weeks'] as $week) { echo ' <tr>'; /* Every day has the following: day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), holidays, events, birthdays. (last three are lists.) */ foreach ($week['days'] as $day) { // If this is today, make it a different color and show a border. echo ' <td valign="top" style="height: 100px; padding: 2px;" class="', $day['is_today'] ? 'calendar_today' : (empty($day['day']) ? 'windowbg3' : 'windowbg'), '">'; // 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 ' <a href="', $scripturl, '?action=calendar;sa=post;month=', $context['current_month'], ';year=', $context['current_year'], ';day=', $day['day'], ';sesc=', $context['session_id'], '">', $day['day'], '</a>'; else echo ' ', $day['day']; // Is this the first day of the week? (and are we showing week numbers?) if ($day['is_first_day']) echo ' <span class="smalltext"> - ', $txt['calendar51'], ' ', $week['number'], '</span>'; // Are there any holidays? if (!empty($day['holidays'])) echo ' <div class="smalltext" style="color: #', $modSettings['cal_holidaycolor'], ';"> ', $txt['calendar5'], ' ', implode(', ', $day['holidays']), ' </div>'; // Show any birthdays... if (!empty($day['birthdays'])) { echo ' <div class="smalltext"> <span style="color: #', $modSettings['cal_bdaycolor'], ';">', $txt['calendar3'], '</span> '; /* 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 ' <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', (!empty($member['color']) ? '<span style="color:'.$member['color'].';">' : ''), $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', (!empty($member['color']) ? '</span>' : ''), '</a>', $member['is_last'] ? '' : ', '; echo ' </div>'; } // Any special posted events? if (!empty($day['events'])) { echo ' <div class="smalltext"> <span style="color: #', $modSettings['cal_eventcolor'], ';">', $txt['calendar4'], '</span>'; /* 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 ' <a href="', $event['modify_href'], '" style="color: #FF0000;">*</a> '; echo ' ', $event['link'], $event['is_last'] ? '' : ', '; } echo ' </div>'; } } echo ' </td>'; } echo ' </tr>'; } } echo ' </table> </td> </tr> </table> <form action="', $scripturl, '?action=calendar" method="post" accept-charset="', $context['character_set'], '"> <table cellspacing="0" cellpadding="3" width="100%" class="tborder" style="border-top: 0;"> <tr class="titlebg2"> <td>'; // Is there a calendar for last month to look at? if (isset($context['previous_calendar'])) echo ' <b><a href="', $context['previous_calendar']['href'], '">&#38;#171; ', $txt['months_short'][$context['previous_calendar']['month']], ' ', $context['previous_calendar']['year'], '</a></b>'; echo ' </td> <td align="center">'; // Show a little "post event" button? if ($context['can_post']) echo ' <a href="', $scripturl, '?action=calendar;sa=post;month=', $context['current_month'], ';year=', $context['current_year'], ';sesc=', $context['session_id'], '">', create_button('calendarpe.gif', 'calendar23', 'calendar23', 'align="middle"'), '</a>'; echo ' </td> <td align="center"> <select name="month">'; // Show a select box with all the months. foreach ($txt['months'] as $number => $month) echo ' <option value="', $number, '"', $number == $context['current_month'] ? ' selected="selected"' : '', '>', $month, '</option>'; echo ' </select>&nbsp; <select name="year">'; // Show a link for every year..... for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) echo ' <option value="', $year, '"', $year == $context['current_year'] ? ' selected="selected"' : '', '>', $year, '</option>'; echo ' </select>&nbsp; <input type="submit" value="', $txt[305], '" /> </td> <td align="center">'; // Show another post button just for symmetry. if ($context['can_post']) echo ' <a href="', $scripturl, '?action=calendar;sa=post;month=', $context['current_month'], ';year=', $context['current_year'], ';sesc=', $context['session_id'], '">', create_button('calendarpe.gif', 'calendar23', 'calendar23', 'align="middle"'), '</a>'; echo ' </td> <td align="', !$context['right_to_left'] ? 'right' : 'left', '">'; // Is there a calendar for next month? if (isset($context['next_calendar'])) echo ' <b><a href="', $context['next_calendar']['href'], '">' . $txt['months_short'][$context['next_calendar']['month']] . ' ' . $context['next_calendar']['year'] . ' &#38;#187;</a></b>'; echo ' </td> </tr> </table> </form>';}// Template for posting a calendar event.function template_event_post(){ global $context, $settings, $options, $txt, $scripturl, $modSettings; // Start the javascript for drop down boxes... echo ' <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; function generateDays() { var days = 0, selected = 0; var dayElement = document.getElementById("day"), yearElement = document.getElementById("year"), monthElement = document.getElementById("month"); monthLength[1] = 28; if (yearElement.options[yearElement.selectedIndex].value % 4 == 0) monthLength[1] = 29; selected = dayElement.selectedIndex; while (dayElement.options.length) dayElement.options[0] = null; days = monthLength[monthElement.value - 1]; for (i = 1; i <= days; i++) dayElement.options[dayElement.length] = new Option(i, i); if (selected < days) dayElement.selectedIndex = selected; } function toggleLinked(form) { form.board.disabled = !form.link_to_board.checked; } function saveEntities() { document.forms.postevent.evtitle.value = document.forms.postevent.evtitle.value.replace(/&#38;#/g, "&#38;#38;#"); } // ]]></script> <form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="', $context['character_set'], '" onsubmit="submitonce(this);saveEntities();" style="margin: 0;"> <table width="55%" align="center" cellpadding="0" cellspacing="3"> <tr> <td valign="bottom" colspan="2"> ', theme_linktree(), ' </td> </tr> </table>'; if (!empty($context['event']['new'])) echo ' <input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />'; // Start the main table. echo ' <table border="0" width="55%" align="center" cellspacing="1" cellpadding="3" class="bordercolor"> <tr class="titlebg"> <td>', $context['page_title'], '</td> </tr> <tr> <td class="windowbg"> <table border="0" cellpadding="3" width="100%">'; if (!empty($context['post_error']['messages'])) { echo ' <tr> <td></td> <td> ', $context['error_type'] == 'serious' ? '<b>' . $txt['error_while_submitting'] . '</b>' : '', ' <div style="color: red; margin: 1ex 0 2ex 3ex;"> ', implode('<br />', $context['post_error']['messages']), ' </div> </td> </tr>'; } echo ' <tr> <td align="right"> <b', isset($context['post_error']['no_event']) ? ' style="color: red;"' : '', '>', $txt['calendar12'], '</b> </td> <td class="smalltext"> <input type="text" name="evtitle" maxlength="30" size="30" value="', $context['event']['title'], '" style="width: 90%;" /> </td> </tr><tr> <td></td> <td class="smalltext"> <input type="hidden" name="calendar" value="1" />', $txt['calendar10'], '&nbsp; <select name="year" id="year" onchange="generateDays();">'; // Show a list of all the years we allow... for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) echo ' <option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '</option>'; echo ' </select>&nbsp; ', $txt['calendar9'], '&nbsp; <select name="month" id="month" onchange="generateDays();">'; // There are 12 months per year - ensure that they all get listed. for ($month = 1; $month <= 12; $month++) echo ' <option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>'; echo ' </select>&nbsp; ', $txt['calendar11'], '&nbsp; <select name="day" id="day">'; // This prints out all the days in the current month - this changes dynamically as we switch months. for ($day = 1; $day <= $context['event']['last_day']; $day++) echo ' <option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '</option>'; echo ' </select> </td> </tr>'; // If events can span more than one day then allow the user to select how long it should last. if (!empty($modSettings['cal_allowspan'])) { echo ' <tr> <td align="right"><b>', $txt['calendar54'], '</b></td> <td class="smalltext"> <select name="span">'; for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++) echo ' <option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '</option>'; echo ' </select> </td> </tr>'; } // If this is a new event let the user specify which board they want the linked post to be put into. if ($context['event']['new']) { echo ' <tr> <td align="right"><b>', $txt['calendar_link_event'], '</b></td> <td class="smalltext"> <input type="checkbox" class="check" name="link_to_board" checked="checked" onclick="toggleLinked(this.form);" /> </td> </tr> <tr> <td align="right"><b>', $txt['calendar13'], '</b></td> <td class="smalltext"> <select id="board" name="board" onchange="this.form.submit();">'; foreach ($context['event']['boards'] as $board) echo ' <option value="', $board['id'], '"', $board['id'] == $context['event']['board'] ? ' selected="selected"' : '', '>', $board['cat']['name'], ' - ', $board['prefix'], $board['name'], '</option>'; echo ' </select> </td> </tr>'; } echo ' <tr align="center"> <td colspan="2"> <input type="submit" value="', empty($context['event']['new']) ? $txt[10] : $txt[105], '" />'; // Delete button? if (empty($context['event']['new'])) echo ' <input type="submit" name="deleteevent" value="', $txt['calendar22'], '" onclick="return confirm(\'', $txt['calendar_confirm_delete'], '\');" />'; echo ' <input type="hidden" name="sc" value="', $context['session_id'], '" /> <input type="hidden" name="eventid" value="', $context['event']['eventid'], '" /> </td> </tr>'; echo ' </table> </td> </tr> </table> </form>';}?>

I've checked with Orstio and he replied me that most probably it's the calendar mod error rather than the bridge error so I posted here.Can someone pls advise?Thanks :)

stummihouse

hello.

it seems it dont work on  1.1.4

jdvarner

love this calendar. has anyone figured out how to extend the events past 14 days? some events like tournaments go longer then 14 days. just curious if this has been done.

perplexed

Quote from: jdvarner on December 03, 2007, 09:15:13 PM
love this calendar. has anyone figured out how to extend the events past 14 days? some events like tournaments go longer then 14 days. just curious if this has been done.

you can do that in calendar settings in the Admin panel

evulness

does anyone know how to get the current month calendar to display correctly?
not index.php?action=calendar, thats fine.... i want the mini current month calendar in a tinyportal block.  i'm trying to use:

if (isset($context['current_month']))
{
echo '<table cellspacing="1" cellpadding="2" width="100%">';
// Current month
echo '
<tr>
<td>
<table class="bordercolor" cellspacing="1" cellpadding="2" width="100%">';
echo'
<tr class="titlebg">
<td align="center" colspan="8" style="padding: 5px;">
', $txt['months_titles'][$context['current_month']], ' ', $context['current_year'], '
</td>
</tr>
<tr>
<td class="titlebg2"> </td>';


// Show each day of the week.
foreach ($context['week_days'] as $day)
echo '
<td class="titlebg2" width="14%" align="center">', $func['substr']($txt['days'][$day], 0, 1), '</td>';

echo '
</tr>';

/* Each week in weeks contains the following:
days (a list of days), number (week # in the year.) */
foreach ($context['weeks'] as $week)
{
// This is used to highlight the current week.
$currentWeek = isset($_REQUEST['week']) && $_REQUEST['week'] == $week['number'];

echo '
<tr class="bordercolor" cellspacing="1" cellpadding="2">
<td class="titlebg2"><a href="', $week['week'], '">»</a></td>';


/* Every day has the following:
day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?),
holidays, events, birthdays. (last three are lists.) */
foreach ($week['days'] as $day)
{
// If this is today, make it a different color and show a border.
echo '
<td valign="top" align="right" style="height: auto; padding: 2px;" class="', $day['is_today'] ? 'calendar_today' : (empty($day['day']) ? 'windowbg3' : ($currentWeek ? 'windowbg2' : 'windowbg')), '">';

// Skip it if it should be blank - it's not a day if it has no number.
if (!empty($day['day']))
echo
$day['day'];

echo '
</td>';
}

echo '
</tr>';
}

echo '
</table>';
}

i get no errors, but my block is empty, except 100%wide alternate colored cells....


i have my own calendar script i wrote for a diferent website, but it doesn't use a database, and i'm not editing it to work for smf, when i should be able to display a mini calendar like used on the default template.

CrazyHorse80

Is it possible to modify this to show events highligting days in small calendars in the left?
Bye,
PS

denzil69

is there a way of showing events on the calendar for guests, but when they click on the event, if they are not members they are sent to a log in page?

ie, they view the calendar, shows XXXX event over a few days, they click on event but cannot view it until they sign up.

its probably a no brainer but i cannot remember where to find the option to use it this way.

cheers gang

Moondust

Does this mod work in version 1.1.8? Is there another enhanced calendar mod available?

Tiribulus

Quote from: Moondust on March 29, 2009, 04:18:46 PM
Does this mod work in version 1.1.8? >>>

Does for me, straight install, no edits and I have about 1000 mods installed already

Ammoratti

Verified:  Mod installed flawlessly on version 1.1.11.

GarfieldP

really good mod! I like it alot

Advertisement: