SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Calendar Event Reminder

Started by HoverClub, January 28, 2011, 06:48:03 PM

Previous topic - Next topic


Link to Mod

Allows users to set a reminder for any calendar event.

Adds an drop-down reminder menu icon (alarm clock) to events in the calendar and on post with linked events.

The reminder menu allows users to select pre-set reminder periods from 1 day to 8 weeks.  They will be send an email reminder the selected period before any event.

Required Settings:
The calendar must be enabled in the admin control panel.
If you are also using my Event Registration mod mod then this mod MUST be installed AFTER installing the event registration mod.

Languages Support:
British English
.. and the utf8 versions of all of them....

Install bug in Italian language file
fixed undefined error when event has been deleted but reminder still set
include_once used to avoid PHP redeclare errors if code used in a portal block
Won't send out reminders for events that have alerady started
Schedule changed to once daily @ 1:10am (to avoid other midnight tasks)
fixed emailtemplate error for unsupported languages
removed some debug code that was preventing emails being sent
added support for utf8 languages.
Fixed issue that stopped reminders being sent at times.
Now handles reminders correctly if the event date is changed AFTER a reminder has been set
fixed template errors caused by attempting support for non-english language for email
fixed language undefined errors in scheduled task
changed redirect in calreminder.php to return to home page if topic # is undefined
reminder menu no longer visible to guests
reminder icon reduced in size
Menu no longer available on same day as event (it's too late!)
... etc.


This mod looks good.

Would be ideal for my forum as it is for the local community and makes heavy use of the Calendar.

However on line 158 of my display template file I have this error.

Undefined Inex: View Week.

$url = '<li><a href="' . $scripturl . '?action=calreminder;eventid=' . $event['id'] . ';eventstart=' . $event['start_timestamp'] . (isset($context['current_year']) ? ';year=' . $context['current_year'] : '') . (isset($context['current_month']) ? ';month=' . $context['current_month'] : '') . (isset($context['current_day']) ? ';day=' . $context['current_day'] : '') . ($context['view_week'] ? ';viewweek' : '') . ';' . $context['session_var'] . '=' . $context['session_id'] . ';reminder=';


Edit the display template line 158 and replace:




.. I'll fix it at the next update (although it does work OK with the curve theme on RC4  ;D)


Will do it this afternoon.

Another thing I have noticed is not all the events have the image next to them.

The calendar is open to guests if ya wanna take a peep.


Getting these errors now.

Apply Filter: Only show the errors with the same message
2: in_array() [<a href=''></a>]: Wrong datatype for second argument

Apply Filter: Only show the errors from this file
File: /home/xxxxxpublic_html/xxxxx/Themes/default/Calendar.template.php
Line: 383
Apply Filter: Only show the errors with the same message
8: Undefined variable: rems_done
Apply Filter: Only show the errors from this file
File: /home/xxxxx/public_html/xxxx/Themes/default/Calendar.template.php
Line: 383
/* The events are made up of:
title, href, is_last, can_edit (are they allowed to?), and modify_href. */
foreach ($day['events'] as $event)
==>383:    if (!in_array($event['id'],$rems_done))
384:    {
echo make_reminder_menu($event,null);
387:    }
// If they can edit the event, show a star they can click on....

Hmm since the suggested edit was applied I now see the following on the page.

Parse error: syntax error, unexpected ')' in /home/xxx/public_html/xxxxx/Themes/default/Display.template.php on line 158


Looks like you mis-edited the template.  Do a search and replace by copying the text from the post above.

Guests can't see the reminder icon in the calendar as, being guests, they haven't got an email address to recieve a reminder.


Here is the Dutch translation:

$txt['reminder_mod_title'] = ' stuur mij een email voordat dit evenement begint';
$txt['reminder_mod_hours'] = 'uren';
$txt['reminder_mod_day'] = 'dag';
$txt['reminder_mod_days'] = 'dagen';
$txt['reminder_mod_week'] = 'week';
$txt['reminder_mod_weeks'] = 'weken';
$txt['reminder_noremind'] = 'geen reminder';
$txt['reminder_emailsubject'] = 'Evenement Reminder!';

I'm not shure if this part is correct. Could you place that in context for me?

$txt['reminder_mod_title'] = ' stuur mij een email voordat dit evenement begint';


Embarrassingly, it's not actually used anywhere - I'll remove it next update  :-[


Ok, then that is the Dutch translation ;) Have fun with it  :)


Im getting the same (log) errors as Brack1 with a clean install on rc4 or rc5 with no errors during package setup and no manual edits.

Adds up to about 200-300 errors per day.


2: in_array() [<a href=''></a>]: Wrong datatype for second argument

File: /home2/************/public_html/events/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 383


8: Undefined variable: rems_done

File: /home2/************/public_html/events/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 383



These aren't fatal errors - they should be fixed in the latest release though (05).


That was quick .... reminder5

Seems like 1 error gone but still getting this one:


8: Undefined variable: rems_done

File: /home2/*********/public_html/events/Themes/default/Calendar.template.php (main sub template - eval?)
Line: 379


Is there any way to set events to default to send emails to all members or individuals? We use calendar events for amongst other things recording who is on the swimming pool life guard rota and it would be great to be able to default to sending an email the day before each individuals "watch". Similarly we have some club events such as talk that we send a reminder about to our membership a couple of days before the event. It would be great if we could automate this via the forum.

Thanks for a useful mod.


It would probably be possible to send a bulk reminder email to all members but that's a guaranteed way to get listed as a spam site ::)

Why not set a reminder for yourself using this mod, then send a newsletter "reminder" (Admin->Main->News and Newsletters->Newsletters) to specific groups?


Thanks for the quick reply. I take your point about spam. In our case we have a restricted and small membership(a dive club) who actively want to be reminded about talks etc. H#ll try your suggestion about setting a reminder for myself as a prompt to email people.

In pool marshall rota is more of an issue for us as its a pain when someone forgets to turn up. I'll try taking a look at Outlook(shiver), although it sort duplicates enties somewhat.


I haven't tested this MOD out, just wondering of their is a PM reminder option, instead of sending an email?


Quote from: hcfwesker on March 06, 2011, 04:18:04 PM
I haven't tested this MOD out, just wondering of their is a PM reminder option, instead of sending an email?

Nope - it's really the same thing as most people elect to get email reminders of a PM

72 454

Nice mod! Glad to see some interest in improving the Calendar/Events features. Tnx!  :)
SMF 2.0.11


Non-fatal error almost completely gone now ... I get an error when a guest selects a reminder from the calendar page - thats about it.

Adding to this post that one of my main uses for this mod is that the icon on the calendar splits up the events rather well - improves the standard calendar layout which makes it hard to see where one event title ends and the other begins - just the comma in small wrapped linked text. So it would be nice it it stayed rather than made invisible to guests...


I deleted my 0.7 but 2.0 cannot be installed right now on my RC4 ?!!!!