MonthCalendar Top List MACRO
Contents
Presentation
You can use this macro to generate a list of recent entries from a MonthCalendar data structure.
This is an addition to the MonthCalendar macro (or the MonthCalendarHack one), so you should make yourself familiar with THAT one before trying to understand what this action can do for you.
Call this macro on a base page for a MonthCalendar. It will pack the contents of all tips you get when moving a mouse over some day entry into a simple, clickable list.
If you have comments or want to report bugs, please check the appropriate section at the end of the page.
Installation
Copy the attached file to the /path_to_wiki_instance/data/plugin/macro directory. Rename it MonthCalendarTopList.py. Then check your SystemInfo page to verify that it's correctly installed.
Usage
Using the MonthCalendar macro, you create day entries with a title representing the content of the day entry.
MonthCalendarTopList generates a list from the previous X days indicating the titles and date.
[[MonthCalendarTopList()]]
will display the last 365 days entries
[[MonthCalendarTopList(X)]]
will display the last X days entries.
The page title must be in the form
= Title of the day page =
or
'''Title of the day page'''
The generated content looks like
A title for this day (2007-10-02) Another one for the same day (2007-10-02) One more! (2007-10-02) A title for another day (2007-10-01) Untitled (2007-09-13)
Note that if no identified title exists, the page still appears with its date and named Untitled.
Development information
Authors
The original author is Mark Stier (MSt).
It has been modified and is mantained by EricVeirasGalisson.
History
original unnumbered version / download
version 1.0 / July 2007 / download:
adaptation to MoinMoin 1.5
version 1.1 / September 2007 / download:
- added support of titles in the form:
= title =
'''title'''
if no title exists, the page still appears in the list named Untitled
- added support of titles in the form:
version 1.2 / October 2007 / download:
- back to the previous behaviour allowing several titles
version 1.2.1 / February 2009 / download:
- fixed error using with mod_wsgi (removed useless print statement)
Repository
If you are interested, the Mercurial repository for this macro is located at:
Roadmap
use MoinMoin.formatter methods to generate HTML, see http://docs.moinmo.in/moin/1.8/
- use list for results
- add CSS support
Related links
You can also be interested in the MonthCalendarHack macro.
Bugs / Comments
Old Ones
the macro should not use <BR> tags for the output, using lists (ol/li) would be better (like the fullsearch macro does).
- I added it to the roadmap. Will look at it ASAP.
(about the hack with mod_wsgi) why? I used this macro also and had no problem... also think it's not good to enable debugging on live systems? If there's a bug then it should fixed correctly. I use apache with mod_wsgi, may take a look here: http://wikiwiki.ch/MonthCalendarTopList. well just my 5cents. bye -- MarcelHäfner 2009-02-09 13:24:25
- You use it with mod_wsgi without problem? Interesting information. I just migrate to mod_wsgi and found this problem, haven't time to look at it for the moment, but i'll investigate. Can you give me more information about your own setup:
- are you running mod_wsgi in a separate process (daemon) or not?
do you have this directive WSGIRestrictStdout Off?
This problem is fixed now. An useless print statement was the cause. Thanks for reporting it and for using this macro -- EricVeirasGalisson
- You use it with mod_wsgi without problem? Interesting information. I just migrate to mod_wsgi and found this problem, haven't time to look at it for the moment, but i'll investigate. Can you give me more information about your own setup: