Enhanced Calendar

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

Previous topic - Next topic

lexhair

Fantastic! Thank you for the mod.

SWTrisha

just checkin to see if you had time to go over my calender.php to see why I can't get your mod to install. I know your a very busy guy. Just checking :)

Daniel15

Yeah, I'm very busy at the moment. I'll try to look at it as soon as possible.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Jim R

It installed great for me, still using 1.1 rc3, and it's a great look.  I know others here have bigger fish to fry, like getting it installed, but are there any plans to provide tags or categories to events, coupled with some SSI code to enable the posting of different events based on the tag or category?

:)

[Lucien]

Quote from: Zwerko on February 03, 2007, 04:14:17 AM
Quote from: Daniel15 on January 30, 2007, 08:13:08 PM
Quote from: thefley on January 30, 2007, 11:14:50 AM
I am getting an error installing it,

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification - Modification parse error

can you tell me what I am doing wrong?
Make sure your Packages directory is CHMODded to 0777. Try creating a 'temp' directory inside the Packages directory, and CHMOD it to 0777

Hi,
I still getting same error when I installing it. I have done all u suggested, and SMF is 1.1.1.  I have attached screenshot. 

I have the same problem :( The only thing i changed in the calendar are the colors of the letters..
But that's should'nt be a problem i hope?
I'm using SMF 2.0.2 and SimplePortal 2.3.4

Jiveturkey

It installed fine for me but the the default calendar is still showing up.  Am I missing a simple step here?

I'm running 1.1.1

Here's the other mods that I'm running.

1.     Googlebot & Spiders Mod      2.0.2      
2.    Users Online Today Mod    1.4.0    
4.    Lots_o_Smileys    1.0    
5.    Spam Me Not Mod    1.02    
6.    Enhanced Calendar    1.0    
7.    Enchanced post template    1.0.2    
8.    nwsw.nwswAdminAttachAnything

jonasrafe

Any idea if Kindred's showcal mod for Joomla would interfere with the enhanced calendar?  I'm running Joomla 1.0.12, SMF 1.1.1, and Orstio's bridge 1.1.6, and would be interested in using this mod.

tarsia

Hi,

for everbody who is getting the 'Modification parse error'. The error occurres in some (many) other mods, too.
As far as i know it depends on the php-version. => php 4 is ok , php 5 not.

I didn't found a workaround yet. In my point of view it is a SMF bug, but the SMF-Development-Team seems not to be interrestet in it (as far as i read in other topics).

tarsia
SMF 1.1

Daniel15

Quotebut are there any plans to provide tags or categories to events, coupled with some SSI code to enable the posting of different events based on the tag or category?
I don't have time to do this, although someone else might :). Make a post in the Mods Request board.

QuoteIt installed fine for me but the the default calendar is still showing up.  Am I missing a simple step here?
If you're not using the default theme, does your custom theme have a Calendar.template.php file? If so, try copying the Calendar.template.php file from Themes/default/Calendar.template.php to Themes/[name of your theme]/Calendar.template.php.

QuoteAny idea if Kindred's showcal mod for Joomla would interfere with the enhanced calendar?
No idea, sorry (I haven't tested it)

Quotefor everbody who is getting the 'Modification parse error'. The error occurres in some (many) other mods, too.
As far as i know it depends on the php-version. => php 4 is ok , php 5 not.

I didn't found a workaround yet. In my point of view it is a SMF bug, but the SMF-Development-Team seems not to be interrestet in it (as far as i read in other topics).
The SMF Development Team are currently working on fixing this issue. It doesn't seem to occur for everyone, however (I use PHP 5.2.0 and have not experienced this issue).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

jonasrafe

I tried installing the mod, and got the following error:


2.   Execute Modification   ./Themes/default/Calendar.template.php   Test failed


I don't have anything in SMF that should have altered my calendar template, so it seems as if there is a compatibility issue with the Joomla integration.

Jiveturkey

Freakin' sweet. 

Moving the php files from default did it.  It still doesn't look as slick but that's probably because of the template that I'm using.

Achilles991

Hello all, i have truble with this mod because i have language where Thursday begins with character Č and i think that cause problem check it here http://www.schoolnparty.com/forum/index.php?action=calendar
Please tell me how can i fix it. As fast as possible. Thanks

Achilles991

In IE i see this ļ/td> and in Opera i see

Daniel15

Quote from: Achilles991 on February 10, 2007, 07:19:46 PM
Hello all, i have truble with this mod because i have language where Thursday begins with character Č and i think that cause problem check it here http://www.schoolnparty.com/forum/index.php?action=calendar
Please tell me how can i fix it. As fast as possible. Thanks
All the days of the month appear properly for me (Opera 9.10, Windows XP):
Quote
Ponedeljak   Utorak   Sreda   Četvrtak   Petak   Subota   Nedelja
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Achilles991

Quote from: Daniel15 on February 10, 2007, 07:46:35 PM
Quote from: Achilles991 on February 10, 2007, 07:19:46 PM
Hello all, i have truble with this mod because i have language where Thursday begins with character Č and i think that cause problem check it here http://www.schoolnparty.com/forum/index.php?action=calendar
Please tell me how can i fix it. As fast as possible. Thanks
All the days of the month appear properly for me (Opera 9.10, Windows XP):
Quote
Ponedeljak   Utorak   Sreda   Četvrtak   Petak   Subota   Nedelja

Yes that is ok, but in small month calendars, next to the bigger one, is problem.
You can see there
QuoteP U S Č P S N
but Č is bugged! check that please.

Achilles991

#35
That is not character "I", that is bug. Check same page in IE, there you will see part of HTML code like ļ/td> that looks like part of table.

Daniel15

It looks like you have the encoding type set to UTF-8 rather than ISO-8859-9, which could be what's causing this (my test installation uses ISO-8859-9, and it works fine).

Please try this:
In Themes/default/Calendar.template.php, find:

substr($txt['days'][$day], 0, 1)


Replace with:

htmlentities(substr($txt['days'][$day], 0, 1))


This should work for you :)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Achilles991

I see different but only in one month, but still not working. I edited calendar.template.php as you said and still no results. <?php// Version: 1.1; Calendar// The main calendar - January, for example.function template_main(){ global $context, $settings, $options, $txt, $scripturl, $modSettings; 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">', 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">', htmlentities(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">', 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'], '">', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</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'], '">', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</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'], '">&#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'] . ' &#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(/&#/g, "&#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>';}?>
This is how my calendar.template.php looks like...

Daniel15

The code I mentioned appears a few times - Make sure you edit all of them ;)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Achilles991

ok i will, but i am not sure that it will fix the problem.

Advertisement: