CopyPasteCalendar-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
PKHG July 9 , 2014 I get using the recipe this (warning) message Parse error: syntax error, unexpected T_DNUMBER in /customers/5/4/b/pkhg.nl/httpd.www/Achilles/pmwiki.php(455) : runtime-created function on line 1 Warning: Cannot modify header information - headers already sent by (output started at /customers/5/4/b/pkhg.nl/httpd.www/Achilles/pmwiki.php(455) : runtime-created function:1) in /customers/5/4/b/pkhg.nl/httpd.www/Achilles/pmwiki.php on line 1216
As I'm not getting this error I can only guess, but maybe you are somehow exceeding your maximum number of includes with this recipe? Copy Paste Calendar has a little more than 30 include directives. Could it be that you are using additional ones elsewhere in your Wiki page? StefCT July 9, 2014
Update: I've tested the recipe in many different PmWiki installations, but nowhere am I getting this kind of error. I've tested it with most of the skins installed on pmwiki.org as well. I haven't tried CopyPasteCalendar with much older versions of PmWiki though, maybe that's the problem? Or maybe there is an incompatibility with some of your recipes or config settings? StefCT July 15, 2014
Making a single wikipage app
- Just wondering if it would be convenient and possible to have subsection like
[[#LargeCalendar]]
...etc, much like available options/themes, on PLCalDemo.CopyPasteCalendar. The subsection would have pagelist markup withname={$FullName}
. Users can just drop in the page and do(:include PLCalDemo.CopyPasteCalendar#LargeCalendar:)
. Advanced users can always use pagelist. - Also if useful to move the docs to PLCalDemo.CopyPasteCalendar#docs.
option is PLCalDemo.CopyPasteCalendar-Docs.
license/info in multiline (:comment:)
on top would be desirable.
VKrishn April 23, 2014, at 08:14 AM
- I had already considered adding GPL license to the recipe, but was wondering whether this would be appropriate for a "markup only" project (I guess it could be appropriate though)
- going to think about the other suggestions...
StefCT April 23, 2014
- I notice page loading a little faster if I add
name='PLCalDemo.CopyPasteCalendar'
to pagelist call. - Also a slight less memory usage.
eg. (:pagelist name='PLCalDemo.CopyPasteCalendar' fmt=PLCalDemo.CopyPasteCalendar#calinclude ....
Hope this change would be ok ?
VKrishn April 22, 2014, at 05:12 AM
- for some reason this doesn't work if I add
name='PLCalDemo.CopyPasteCalendar'
to the page list directives in Cookbook.CopyPasteCalendar - I've now tried
name={$FullName}
instead; this seems to work - is it maybe faster because of page list cache? In this case a page variable like
name={$FullName}
might not do the trick
StefCT April 22, 2014
- I am getting same results for both
name={$FullName} and name=PLCalDemo.CopyPasteCalendar
. - I think a Test.CopyPasteCalendar page could be set with diagnostics enabled to see the differences.
VKrishn April 22, 2014, at 01:29 PM
- for clarification:
name=PLCalDemo.CopyPasteCalendar
works for me too if I put it directly into the page list directive inPLCalDemo.CopyPasteCalendar
. However, if I include the calendar into another wiki page via page list, I'm getting the aforementioned results (no calendar displayed at all)
StefCT April 22, 2014
- the results of the performance tests at
- Test.CopyPasteCalendar (without any
name=
parameter), - Test.CopyPasteCalendar2 (with
name={$FullName}
parameter) and - Test.CopyPasteCalendar3 (with
name=Text.CopyPasteCalendar3
parameter)
- Test.CopyPasteCalendar (without any
name={$FullName}
to the Calendar page list directive
- Thank you to VKrishn for the idea and to Petko for enabling peak memory usage testing in the
Test
page group!
StefCT April 23, 2014
One interesting addition would be clicking on month's date link to open page showing days event page. eg.
- Each hour having a link like 20140401-100
(:div2 style="height: 200px; width: 450px; overflow: auto;" :) (:pagelist fmt={$FullName}#a1 count=9 request=1 leading='0' :) (:pagelist fmt={$FullName}#a1 count=9 request=1 leading='1' :) (:pagelist fmt={$FullName}#a1 count=3 request=1 leading='2' :) (:div2end:) (:if false:) [[#a1]] (:template default:) (:template first:) (:div3 class="" style="border:1px solid #ddd; background-color:#eee;":)[+{$$leading}0.00+] (:div4 style="background-color:#fff;":){$$leading}0.15 (:div4 style="background-color:#fff;":){$$leading}0.30 (:div4 style="background-color:#fff;":){$$leading}0.45 (:div4end:) (:div3end:) (:template each:) (:div3 class="" style="border:1px solid #ddd; background-color:#eee;":)[+{$$leading}{$$PageCount}.00+] (:div4 style="background-color:#fff;":){$$leading}{$$PageCount}.15 (:div4 style="background-color:#fff;":){$$leading}{$$PageCount}.30 (:div4 style="background-color:#fff;":){$$leading}{$$PageCount}.45 (:div4end:) (:div3end:) [[#a1end]] (:ifend:) |
00.00
00.15
00.30
00.45
01.00
01.15
01.30
01.45
02.00
02.15
02.30
02.45
03.00
03.15
03.30
03.45
04.00
04.15
04.30
04.45
05.00
05.15
05.30
05.45
06.00
06.15
06.30
06.45
07.00
07.15
07.30
07.45
08.00
08.15
08.30
08.45
09.00
09.15
09.30
09.45
10.00
10.15
10.30
10.45
11.00
11.15
11.30
11.45
12.00
12.15
12.30
12.45
13.00
13.15
13.30
13.45
14.00
14.15
14.30
14.45
15.00
15.15
15.30
15.45
16.00
16.15
16.30
16.45
17.00
17.15
17.30
17.45
18.00
18.15
18.30
18.45
19.00
19.15
19.30
19.45
20.00
20.15
20.30
20.45
21.00
21.15
21.30
21.45
22.00
22.15
22.30
22.45
23.00
23.15
23.30
23.45
|
VKrishn April 20, 2014, at 03:57 AM
Hi VKrishn,
This looks pretty cool! The idea of using the page list count
feature for this purpose hadn't occurred to me yet.
Your approach might be even more useful if you don't store date/time information in the page name, but in page text variables instead. The pages to be listed can be determined with another page list directive using if date...
markup. This would probably require adding a leading zero to single-digit hours using conditional markup and strlen
markup expression.
On the other hand, abundant use of page lists might slow down the wiki. For a large number of calendar entries, the page name=date/time approach might therefore be preferable.
I have modified and added it as a calendar(pim) app to Qnote/Notebook,
Would try to put a demo with next release of Qnotes.
- One can further break the event list in personal and public event list.
- example meeting at 5:15 with client A (personal)
- example meeting at 5:15 with client B (personal, same time, using telepresence) :-))
- Public event list can be broken into personal/general event list.
- example Bob's birthday (personal public)
- example football match at 5:15, a vs. b (public public)
VKrishn April 20, 2014, at 02:56 PM
Calendar in qnote(sneek preview)
VKrishn April 23, 2014, at 03:21 PM
13th Feb.2014 Hi, i'not sure if i'm here at the right place to ask for an option: would it be possible to show a list of calendar entries below the calendar? Regards Markus (not registered as user here)
Hi Markus,
You can achieve this without making any changes to the original calendar markup. Just add a second pagelist directive to the first one, like the two options shown here (one for all entries of the current month and one for all future entries): CopyPasteCalendarPLwithList
Of course, for this to be really useful, the page text variable Summary:
should be set in the calendar pages.
In the three (:pagelist:)
directives it is assumed that your calendar group is named PLCalDemo. If your group is named differently, please change the directives accordingly.
My earlier idea (which requires some changes to the calendar markup) was the following:
Hope this helps!
StefCT, 13 Feb 2014
There is a mailing list discussion in which VKrishn suggests another customization:
http://www.pmichaud.com/pipermail/pmwiki-users/2014-February/062059.html
StefCT, Feb 2014
The #calendarbox section at the end of the markup can be tweaked in various ways, e.g. to list all calendar pages named YYYYMMDD-* (as suggested by Crisses).
The following code will display a separate ">>" link to each page named YYYYMMDD-* for any given day (changed parts are bold). In order to display a page summary as well, the #callinks
page list template could be modified accordingly.
StefCT, Feb 2014
(:if false:) [[#calendarbox]] (:if2 [ equal {(ftime fmt="%w" when={$$ListDate}{$$CalDay})} 0 && equal "{$$CalStartWeek}" "Sun" ]:) (:cellnr style="{$$CalBoxStyle}":) (:elseif2 [ equal {(ftime fmt="%w" when={$$ListDate}{$$CalDay})} 1 && equal "{$$CalStartWeek}" "Mon" ]:) (:cellnr style="{$$CalBoxStyle}":) (:else2:) (:cell style="{$$CalBoxStyle}":) (:if2end:)
(:if2 date {(substr {$$ListDate} 0 6)}{$$CalDay}:) (:div style="font-weight:bold;":) (:else2:) (:div style="font-weight:normal;":) (:if2end:) (:pagelist name={$Group}/{$$ListDate}{$$CalDay}* list=normal fmt={$FullName}#caldays count=1 order=time \ ListDate={$$ListDate} CalDay={$$CalDay} CalGroup={$Group}:) (:if2 exists {$Group}/{$$ListDate}{$$CalDay}*:) (:pagelist name={$Group}/{$$ListDate}{$$CalDay}* list=normal fmt={$FullName}#callinks order=time:) (:if2end:) (:divend:) [[#calendarboxend]] (:ifend:) (:if false:) [[#callinks]] [--[[{=$Group}/{=$Name}|>>]]--] [[#callinksend]] (:ifend:) (:if false:) [[#caldays]] [[{=$Group}/{=$Name}|{$$CalDay}]] (:template none:) [[{$$CalGroup}/{$$ListDate}{$$CalDay}?action=browse|{$$CalDay}]] [[#caldaysend]] (:ifend:)
Update:
If you'd like to use the page names as link text, use the following markup for #callinks
page list template:
(:if false:) [[#callinks]] [--[[{=$Group}/{=$Name}|{(substr "{=$Name}" 9)}>>]]--] [[#callinksend]] (:ifend:)
Add a summary as well with:
(:if false:) [[#callinks]] [--[[{=$Group}/{=$Name}|{(substr "{=$Name}" 9)} {=$:Summary}>>]]--] [[#callinksend]] (:ifend:)
StefCT, July 2014
(:if false:) [[#calendarbox]] (:if2 [ equal {(ftime fmt="%w" when={$$ListDate}{$$CalDay})} 0 && equal "{$$CalStartWeek}" "Sun" ]:) (:cellnr style="{$$CalBoxStyle}":) (:elseif2 [ equal {(ftime fmt="%w" when={$$ListDate}{$$CalDay})} 1 && equal "{$$CalStartWeek}" "Mon" ]:) (:cellnr style="{$$CalBoxStyle}":) (:else2:) (:cell style="{$$CalBoxStyle}":) (:if2end:)
(:if2 date {(substr {$$ListDate} 0 6)}{$$CalDay}:) (:div style="font-weight:bold;":) (:else2:) (:div style="font-weight:normal;":) (:if2end:) (:pagelist name={$Group}/{$$ListDate}{$$CalDay}* list=normal fmt={$FullName}#caldays count=1 order=time \ ListDate={$$ListDate} CalDay={$$CalDay} CalGroup={$Group}:) (:if2 exists {$Group}/{$$ListDate}{$$CalDay}*:) (:pagelist name={$Group}/{$$ListDate}{$$CalDay}* list=normal fmt={$FullName}#callinks order=time:) (:if2end:) (:divend:) [[#calendarboxend]] (:ifend:) (:if false:) [[#callinks]] [--[[{=$Group}/{=$Name}|{(substr "{=$Name}" 9)} {=$:Summary}>>]]--] [[#callinksend]] (:ifend:) (:if false:) [[#caldays]] [[{=$Group}/{=$Name}|{$$CalDay}]] (:template none:) [[{$$CalGroup}/{$$ListDate}{$$CalDay}?action=browse|{$$CalDay}]] [[#caldaysend]] (:ifend:)
Talk page for the Copy Paste Calendar recipe (users).