Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

NextEventAnchor


Events are held on the Events page.

The next event is: Test.Events#noevent

Problem with headings in the middle being shown:

(:include Events#t20060419# lines=4:)
19.04.200615.00Teatime
May 2006
01.05.200620.00Pizzaeating
04.05.2006 Holiday

Even with display=none there is a small (invisible without tableborders) line.

%define=monat display=none%
(:include Events#t20060419# lines=4:)
19.04.200615.00Teatime
May 2006
01.05.200620.00Pizzaeating
04.05.2006 Holiday

Find the next event:

(:include {Events$NextEventAnchor} :)

Print the remaining calendar:

(:include {Events$NextEventAnchor}# :)

Print only the next three events:

(:include {Events$NextEventAnchor}# lines=3:)

Here's the code for the {$NextEventAnchor} page variable:

$FmtPV['$NextEventAnchor'] = 'NextEventAnchor($pn)';

function NextEventAnchor($pagename) {
  global $Now;
  $npat = '[[:alpha:]][-\\w]*';
  $page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);

  $todayanchor = strftime('#t%Y%m%d', $Now);
  if ($page
      && preg_match_all("/\\[\\[(#$npat)\\]\\]/", $page['text'], $alist)) {
    foreach($alist[1] as $a)
      if ($a >= $todayanchor) { return "$pagename$a"; }
  }
  return "$pagename#noevent";
}
Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.07 00.05 MarkupToHTML begin
 3: 00.07 00.05 MarkupToHTML begin
 4: 00.08 00.07 MarkupToHTML end
 5: 00.08 00.07 MarkupToHTML begin
 6: 00.09 00.07 MarkupToHTML end
 7: 00.09 00.07 MarkupToHTML begin
 8: 00.09 00.08 MarkupToHTML end
 9: 00.09 00.08 MarkupToHTML begin
10: 00.10 00.08 MarkupToHTML end
11: 00.10 00.08 MarkupToHTML begin
12: 00.10 00.09 MarkupToHTML end
13: 00.13 00.11 MarkupToHTML end
14: 00.14 00.12 MarkupToHTML begin
15: 00.16 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
16: 00.17 00.15 ReadApprovedUrls SiteAdmin.ApprovedUrls end
17: 00.19 00.17 MarkupToHTML end
18: 00.19 00.17 MarkupToHTML begin
19: 00.20 00.18 MarkupToHTML end
20: 00.21 00.19 now