IncludeUpcoming
The trick to combine Include with MonthCalendar for blogging is great. I was thinking in using the same combination for getting an "Upcoming events" section in the main page of a wiki. The idea was placing the events in a MonthCalendar and use the Include to make the next, say, 5 events appear in the main page. However I realized that this requires the notion of "today" to select the event from today on. I couldn't find a way to call Include and make it know about what day was today. So I just hacked in a really dirty fashion the Include macro to create
IncludeUpcoming2-v0.3.py ugly fix for nested dl
IncludeUpcoming-v0.2.py small fix for MoinMoin 1.6.1
Syntax
For most arguments see HelpOnMacros/Include.
Unlike Include, avoid using regular expressions in the first entry. Just place there the name of a wiki page holding a MonthCalendar:
[[IncludeUpcoming(MeetingsCalendar,,items=5,titlesonly)]]
Try this for a short introduction for each event (until the first occurrence of "----" in the page describing the event):
[[IncludeUpcoming(MeetingsCalendar,,to="^----",items=5)]]
TO-DO
List the events with a description list and use the date as the "term" for the definition. added in v0.1
Decrease heading level to keep js hints in monthcalendar and not so large headings in the summary added in v0.1
Bugs
Wrong HTML
The Macro does not close the <dl> HTML Tag and creating for every single page a new Definition List. On Windows Internet Explorer 7.0 the output looks quite stupid. Firefox on Windows or Linux does not get irritated about this wrong html:
<dl> <dt>2008-03-07</dt> <dd><a href="/Musik/Events/2008-03-07"> Vengeance, Uster </a></dd> <dl> <dt>2008-03-10</dt> <dd><a href="/Musik/Events/2008-03-10">HIM und Paradise Lost, Zürich</a></dd> <dl> <dt>2008-03-11</dt> <dd><a href="/Musik/Events/2008-03-11">Overkill, Zürich</a></dd> ....
Guess, the calls around line 180-208 on the macro formatter.definition_list(0) may has some problems. In my eyes only one <dl> is needed and not for every single included page titles! well, don't know yet how to fix it. -- MarcelHäfner 2008-03-07 16:44:49
I made some ugly fix (just removed the levelstack for the nested code, changed the code that only one <dl> will be used and added some css). IncludeUpcoming2-v0.3.py
Comments
A link to an example page would be nice. -- ThiloPfennig 2006-12-02 19:37:55
Check here. My best examples are into restricted wikis. -- JesusFernandez 2006-12-09 17:46:28
I am working on reorganizing the MacroMarket page to have subpages for each macro. Would you mind me moving this page to MacroMarket/IncludeUpcoming ? -- JordanCronin 2008-01-28 22:35:24
Done. -- JesusFernandez 2008-01-29 09:25:19
Wonderful Macro! Is an update to 1.6 planned? MelaEckenfels - 2008-03-05
Made some small change (see Version 0.2) on my 1.6.1 it works now!
I'm using this for showing upcoming events on my Rock-Blog -- MarcelHäfner 2008-03-05 19:49:42Great. Works on my Moin, also. Thank you! -- 84.163.31.226 2008-03-06 15:01:02