Reminder-Talk

Summary: Talk page for the Reminder recipe
Maintainer: Petko

You add your comments about the Reminder recipe here. Please post new question at the bottom. --Petko April 19, 2008, at 11:06 PM

Refactored answers to questions

How to display an event happening every Tuesday and every Wednesday?

You can:
* w2 This will show every Tuesday
* w3 This will show every Wednesday
* w23 This will show every Tuesday and every Wednesday

How to change to Month/Day format instead of Day/Month?

Set in config.php $ReminderDayMonth = "m/d"; Note that the examples in the documentation are currently in the "d/m" format.

Is it possible for a user to have his own tasks and to also see all events from a "community" calendar?

Yes. In a user's wiki page, use this markup:
(:rem:)
#include Main.CommunityCalendar

[below the user's own events]
* w2 18h Soccer practice Tuesdays.
(:remend:)

Please help. I installed as it is written, but the names of the months shown incorrectly - another encoding. My site is in UTF-8 encoding. Where can I look at that and correct?

  • You need to enable the utf8 locale. Add in config.php something like:
    setlocale(LC_TIME, 'kk_KZ.UTF-8'); # Kazakh, -or-
    setlocale(LC_TIME, 'ru_RU.UTF-8'); # Russian, -or-
    setlocale(LC_TIME, 'en_US.UTF-8'); # English/USA
    See the function setlocale for more information. --Petko September 25, 2009, at 08:16 AM
    • It did not help. Are there more options?
  • On some systems it may work fine without ".UTF-8" (only 'ru_RU'), or with lowercase ".utf8" instead. On Windows could be tried other codes [1]. If it still doesn't work, you could use just numeric dates, by setting the $ReminderDateFormat variable in config.php:
    $ReminderDateFormat = '%d/%m/%Y';

You can learn about the %d, %m, etc. variables here. --Petko October 01, 2009, at 01:30 PM


mwaychoff? August 29, 2011, at 02:37 PM
idea: when we include reminders from other pages can we put a prefix on these reminders on the new list?
in other words:

  • 2011-09-01 10 am Soccer

would show something like:
NathanCalendar: 10 am Soccer

Not a prefix, as the beginning of a line has some meaning to Reminder, but with the new version you can have a suffix. --Petko August 29, 2011, at 05:13 PM

excellant. super appreciate this new function! --mwaychoff? September 01, 2011, at 09:15 AM


mwaychoff? August 29, 2011, at 02:48 PM
idea: would be great if an include could carry across pages.
in other words:
the ability to nest includes.
(:rem FamilyCalendar)

#include NathanCalendar
#include SoccerCalendar

Done -- nested includes should have worked before, but were broken. --Petko August 29, 2011, at 05:13 PM

gotcha. thanks for fixing so quickly. --mwaychoff? September 01, 2011, at 09:15 AM


mwaychoff? September 01, 2011, at 09:15 AM
idea: perhaps it would make sense to only show expired reminders that are within the pastdays= parameter.
that is what i would prefer anyway.

Dates starting with = indicate fixed one-time reminders that will not repeat and need to be deleted when they expire. If you use a date like 1/9/2011 instead of =1/9/2011, your reminder will show within "pastdays" then hide for a year: you probably edit the page more often and could do some cleanup of your expired reminders.

I have first a section for temporary reminders at the beginning of my page, then a section for monthly reminders, then 12 sections for yearly reminders (birthdays...). It is easy to edit the most often changing dates at the top of the page and to once in a while add a yearly reminder at its section further below. --Petko September 01, 2011, at 03:26 PM


simon March 26, 2013, at 07:26 PM
Is it possible to have reminders with the date format

  • 2013-07-23 Club night speaker on the native flora and fauna of the Auckland islands
    and an update on the new Kime Hut

As long as it is on a single line in the wiki source, yes. Also, if you don't need yearly repetition and count, use * =2013-07-23 for a one-time sticky reminder. --Petko March 27, 2013, at 01:29 AM


denningservices February 11, 2016, at 12:38 PM CST
How can we set Saturday as the seventh day?

Yes, use $ReminderWeeklyFix = 1;. --Petko February 11, 2016, at 03:37 PM


Ugo July 31, 2018, at 07:32 PM

Please help, I installed the recipe as written and when I tried a few birthdays to test it (in the Wikisandbox page, pmwiki version 2.2.109) I get the following errors:

Deprecated: Function create_function() is deprecated in /var/www/html/pmwiki.php on line 484
Deprecated: Function create_function() is deprecated in /var/www/html/pmwiki.php on line 484
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/cookbook/reminder.php on line 223
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/cookbook/reminder.php on line 256

Please test the latest version, just released. --Petko July 31, 2018, at 05:45 PM

Yes, this solved the error messages. Thank you for a great recipe! Ugo


1.

 page shows - Version: 20190908, whereas, script shows
 $RecipeInfo['Reminder']['Version'] = '20180908';

2.
Just wondering if onemonth=4 feature could do output(optional) in month-tabular format as a new feature in comming version.
VKrishn February 14, 2020, at 01:27 PM

1. Date fixed in $RecipeInfo. 2. It is already possible to have custom CSS to make it tabular, something like this in pub/css/local.css after the code in the documentation:

.tabular, .tabular * {  box-sizing: border-box; }
.tabular ul.reminder > li.date { 
  display: inline-block; width: calc( 14% - .4rem ); height: 5rem; 
  overflow: auto; border: 1px solid #ddd; margin: 0 .4rem .4rem 0; 
}
.tabular ul.reminder > li.date.w1:first-child {margin-left:  0%; }
.tabular ul.reminder > li.date.w2:first-child {margin-left: 14%; }
.tabular ul.reminder > li.date.w3:first-child {margin-left: 28%; }
.tabular ul.reminder > li.date.w4:first-child {margin-left: 42%; }
.tabular ul.reminder > li.date.w5:first-child {margin-left: 56%; }
.tabular ul.reminder > li.date.w6:first-child {margin-left: 70%; }
.tabular ul.reminder > li.date.w0:first-child {margin-left: 84%; }
then in the page use
>>tabular<<
(:reminder OtherPage onemonth=4 datefmt="%d.%m":)
>><<

If you are in a place where Sunday is usually the first column of the table, you need to shift down a line the w1, w2... and move w0 to the top so that the line with w0 ends with 0% and the line with w6 ends with 84%. --Petko February 14, 2020, at 02:40 PM

Nice!, would be better if added in a section tips and tricks on Cookbook.Reminder page for users.
Already started using it :), thanks.
VKrishn February 14, 2020, at 06:06 PM

1. Does enabling Callout affect the way

 (:rem.. markup works ?

VKrishn February 14, 2020, at 10:03 PM

Apparently Callout has CSS classname .reminder which is applied broadly and in our case also to the Reminder list. You may be able to overcome this by adding to config.php after the inclusion of callout.php unset($WikiStyle['reminder']); and in pub/css/local.css ul.reminder {background: none;}. --Petko February 15, 2020, at 06:21 AM


1. if the year is written, is it possible to not display the (<y diff>) ?
maybe a SDV option
2. with opt onemonth=, is it possible to suppress the expired info ?
VKrishn February 15, 2020, at 03:35 PM

With the latest version, in config.php set $EnableReminderDiff to 0. You can disable the expired entries with expired=0 in the directive. --Petko February 16, 2020, at 10:36 AM

Use case of onemonth= with newer options, making a monthly medicine intake chart
Thanks! VKrishn February 16, 2020, at 01:12 PM

BTW you could just omit the "year" part from the event entry, that way it would not calculate a yearly difference, and would not print a year. --Petko February 16, 2020, at 01:20 PM

Yes, that should be the way if all weekly meds are same, but if they differ week/month date-wise, they need to have that specific full-date, plus I need to feed that data in git repo as separate yearly-wise wiki-page, thereby preserving what was administered. But still open to suggestions.
Thanks. VKrishn February 16, 2020, at 01:39 PM


1. Is there a way to add a reminder to repeat every 4weeks(exactly, 28days)
if not, syntax could be like w2+r<n>. i.e repeat n days starting Tuesday
OR w2|day|date...+r<n>, if it seems useful.
VKrishn February 23, 2020, at 12:41 PM

I do not have enough "free" time at the moment so this would be unlikely. In the meantime, I'd try inputting the actual dates and loops in LibreOffice Calc or another spreadsheet, then paste them in your Reminder page. Or, if you regularly require something like this, drop the wiki and simply use the spreadsheet. Alternatively, this may be possible with Google Calendar (which at one point could be embedded in your wiki with Ape). --Petko February 23, 2020, at 12:53 PM

I do not require it often, but having it would reduce the input texts, kinda, write once use the whole year :-), currently I write '=m/d' and let reminder do the ROS thing, then modify+copy-paste in coming months. Thanks. VKrishn February 23, 2020, at 03:10 PM

1. Can reminder display two or more months using onemonth=? format ?
I am trying the following markup, but month Feb kinda not displaying ok. Pls have a look.

!!! Reminders
[[#r1]]
(:rem pastdays=4 futuredays=4 emptydays=0 :)
Monthly reminders:

* w0 A 
* w1 -&nbsp;
* w2 C
* w3 -&nbsp;
* w4 E
* w5 -&nbsp;
* w6 F

(:remend:)
[[#r1end]]

>>tabular<<
!!!Feb
(:reminder Main.WikiSandbox2#r1 onemonth=2 datefmt="%d/%m":)
>><<
>>tabular<<
!!!March
(:reminder Main.WikiSandbox2#r1 onemonth=3 datefmt="%d/%m":)
>><<

VKrishn March 01, 2020, at 06:05 PM

This is by design, see section Reminder#notes: The "monthly mode" displays the "current or next" April: if it is April 2008, displays the current month; in May 2008 the same page will display April 2009. So today is March 1st 2020 so onemonth=2 displays February 2021 -- if you set datefmt="%d/%m/%y" you will see this. --Petko March 01, 2020, at 07:24 PM

Thanks, that should be ok. VKrishn March 01, 2020, at 08:00 PM

If you want to show the current and next 2 months (regardless of the month), use a MarkupExpression like this:

!!!{(ftime '%B %Y')}
(:reminder {$FullName}#r1 onemonth={(ftime '%m')} datefmt="%d/%m/%y":)
!!!{(ftime '%B %Y' '+1 month')}
(:reminder {$FullName}#r1 onemonth={(ftime '%m' '+1 month')} datefmt="%d/%m/%y":)
!!!{(ftime '%B %Y' '+2 months')}
(:reminder {$FullName}#r1 onemonth={(ftime '%m' '+2 months')} datefmt="%d/%m/%y":)

Alternatively, you can use a taller tabular section with -30..+60 days like this:

>>tabular<<
(:reminder {$FullName}#r1 pastdays=30 futuredays=60 datefmt="%d/%m/%y":)
>><<

The past days will appear faded out, however the months will not be separated. --Petko March 01, 2020, at 08:59 PM

Yes, this is better!, thanks! VKrishn March 01, 2020, at 10:22 PM

Talk page for the Reminder recipe (users).