Calendar Plugin 0+5i
Calendar's been updated.
User-visible Interesting Changes, in rough order by interestingness:
- On single-article pageviews, create a calendar for the date of the article (this only works in dynamic mode currently, requires a Blosxom change to give full $path_info support in static mode)
- requires Blosxom
2.0rc1 2.0rc2 or newer
- uses the built-in templating system, including any template plugin that's installed
- cached layouts are keyed based on flavour, so if you have template files that vary by flavour it will actually work now
- variables in templates can be interpolated with ${name} as well as $name
- with the default templates, the current day/month is only a link if there are stories for it
- this_day template split into this_day_link and this_day_nolink
- this_month template split into this_month_link and this_month_nolink
- the default templates are in the 'error' flavour rather than 'html', so they're used for any flavours that don't override them (the same effect was achieved a different way in 0+4i)
- cache is only enabled if the available Storable supports lock_retrieve
- the cache is flushed every time a story is added, not once a day -- this is required for the this_day_link and this_month_link support
Things I'd like to be able to do, but can't reasonably without Blosxom changes:
- use the built-in interpolation system, including any interpolate plugin that's installed
- create months for appropriate dates in static mode
To install:
- download and unzip the plugin.
- Copy it to your plugins directory. Make sure it's world-readable.
- Modify a
head or foot file to include $calendar::calendar, $calendar::month_calendar or $calendar::year_calendar
- Try it out — load your blog in your browser. If you see a category tree, great!
- Look at your error log. Verify you have an 'enabled' line.
- If you're wanting to verify caching is working, load the page again, and now look for an error log line "calendar debug 1: Using cached state"
- Once you're satisfied it's working, edit the
$debug_level configuration variable to 0. There are a couple other configuration variables you may wish to change, too.
- Drop me a note to let me know you're using it; if you're having problems, let me know and I might be able to help. If everything's working okay, please let me know that, too.
Molelog is running this, with some customized templates and stylesheets.
Stylesheet:
.calendar { }
.month-calendar, .year-calendar {
border-collapse: collapse;
}
.month-calendar-head, .year-calendar-head {
font-size: 110%;
font-weight: bold;
}
.month-calendar-day-head, .year-calendar-subhead {
font-weight: normal;
/* font-size: 80%; */
}
.month-calendar-day-noday,
.month-calendar-day-link, .year-calendar-month-link,
.month-calendar-day-nolink, .year-calendar-month-nolink,
.month-calendar-day-this-day, .year-calendar-this-month,
.month-calendar-day-future, .year-calendar-month-future {
text-align: center;
font-family: "Georgia", "New Century Schoolbook", "Times", serif;
}
.month-calendar-day-future, .year-calendar-month-future {
color: #83660F;
}
.Saturday, .Sunday {
background: #f5deb3;
}
.month-calendar-day-this-day, .year-calendar-this-month {
background: #a5e4ff;
}
calendar.calendar.html:
<div align="center" class="calendar">
<table>
<tr>
<td colspan="2">$calendar::month_calendar</td>
<td> </td>
<td colspan="2">$calendar::year_calendar</td>
</tr>
<tr>
<td align="left">$prev_month_link</td>
<td align="right">$next_month_link</td>
<td> </td>
<td align="left">$prev_year_link</td>
<td align="right">$next_year_link</td>
</tr>
</table>
</div>
calendar.month_head.html:
<table class="month-calendar">
<caption class="month-calendar-head">
<a title="$monthname $year" href="$url">$monthname</a>
</caption>
calendar.year_head.html:
<table class="year-calendar">
<caption class="year-calendar-head">
<a title="$year" href="$url">$year</a>
</caption>
<tr>
<th class="year-calendar-subhead" colspan=$months_per_row>
Months
</th>
</tr>
calendar.next_month_link.html:
<span class="text-align: right">
<a title="$monthname $year" href="$url">$monthabbr →</a>
</span>
calendar.next_month_nolink.html:
<span class="text-align: right">→</span>
calendar.next_year_link.html:
<span class="text-align: right">
<a title="$year" href="$url">'$year2digit →</a>
</span>
calendar.next_year_link.html:
<span class="text-align: right">→</span>
calendar.prev_month_link.html:
<span class="text-align: left">
<a title="$monthname $year" href="$url">← $monthabbr</a>
</span>
calendar.prev_month_nolink.html:
<span class="text-align: left">←</span>
calendar.prev_year_link.html:
<span class="text-align: left">
<a title="$year" href="$url">← '$year2digit</a>
</span>
calendar.prev_year_nolink.html:
<span class="text-align: left">←</span>
2003-03-24 05:40:00
| Comments (1)
| TrackBack (0)
|
Computers::Internet::Web::Blosxom::Plugins::Calendar