Calendar
Last Updated on Saturday December 29, 2007
mdp_Calendar allows you to create a calendar of live articles for a certain month. The calendar itself is a small table of dates and links to the articles. Different months can be navigated to by the user, or only a particular month can be shown. Both a large version of the calendar, which links to all articles, and a more compact version are available.
Usage
To place a calendar, place a <txp:mdp_calendar_[small/large] [options] /> tag where you wish it to appear. The options are available in the included plugin documentation.
Quick *note*: Depending upon your timezone offset and server's local time, the small calendar may produce incorrect URL's. This is an issue internal to Textpattern and its' date handling. If this issue exists, there are some workaround's available.
Example
| < | February 2010 | > |
|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | 1 | 2 | 3 | 4 | 5 | 6 |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | | | | | | |
v1.1 2007-12-16
- Bug Fix: The today class will only be applied to the current year.
- Update: spandays option, for those of you using versions of Textpattern that can handle expiration dates on articles. This option will put a link to the article on everyday that it is active.
- Bug Fix: Locale support should be better, and probably a few other things have been changed.
v1.0 2006-03-05
- Bug Fix: The time zone and offset problems should be taken care of.
- Change: The “time” attribute has been added, you can use it to control which articles should be displayed. “any”, “past” (default), and “future” are the possible values.
- Update: If when using the small calendar you are getting an empty list after clicking on a day, check that you set the “time” attribute of the txp:article tag to “any”. You might need to use some conditional statements to get this to work as you really want.
v0.5 2005-09-24
- Bug fix: Time zone and not appearing articles should be all licked. Make sure you have the right “GMT Offset” in the Textpattern preferences.
- Warning: When using the small calendar, the article list may not work properly. I will look into producing these URL’s using the year/month/day format if sgb_url_handler is available.
v0.4.3 2005-06-01
- Bug Fix: Removed the feature that didn’t allow articles posted within the first nine days of the month to show.
- Bug Fix: Character encoding problems, which resulted in non ASCII characters becoming question marks, are now fixed.
- New: Small calendar links now have a title which corresponds to the standard date format for your locale (example for the US: mm/dd/yyyy).
v0.4.2 2005-05-29
- Bug Fix: Calendar now produces correct output for the starting day of the week
- Bug Fix: class attribute works.
- Bug Fix: Dual “hasarticle” class removed. The “hasarticle” class only applies to the table cell.
- Bug Fix: Day names are now internationalized. If using a custom date format, convert it to strftime format!
- Bug Fix: Table not having assigned class
- Compatibility Fix: ?date=yyyy-mm-dd URL’s now changed into ?month. Allows older links to work
- New: links to articles now have title attribute set
v0.4 2005-05-13
- Mostly complete rewrite, very few front-end changes however
- mdp_calendar_large and mdp_calendar_small are now the way to make a large (display titles of articles) and small (days only) calendar. They accept the same options.
- “firstday” attribute, you can change the first day of the week. “0” is Sunday, “6” is Saturday.
- “dayformat” attribute, changes how the days of the month header are displayed. ABBR is abbreviated (Mon), FULL is entire day (Monday). Also accepts any strftime formats.
- Internalionization of month and day names
- No hacking of the code required for the small format links to output a specific day or month.
- The <span class="permalink"> is now <div class="permalink">
- Using the id attribute, indepentent navigation of a calendar is allowed. So you can now have multiple calendars on a page, and the user can change the month/year of only a specific calendar.
v0.3 2004-07-15
- Much improved smallformat.
- Bug fixes, especially with time offsets.
- v0.3 requires “mdp_lib”/projects/mdp-lib
v0.2.4 2004-06-10
- Fixed Notice and warnings when server is setup to display all notice’s
v0.2.3 2004-06-01
- Fixed bug when Textpattern is in a subdirectory
v0.2.2 2004-05-26
- Fixed bug with Clean URL’s
- Fixed bug with hasarticle and smallformat calendar’s
Tell your story. And listen to the stories of others — Markuz Wernli Saitô.