Calendar Plugin 0+3i
Update: There are newer versions available; please use the newest version unless you have a particular reason not to.
Calendar has been updated. Changes:
- Configurable day of week names
- Configurable number of months per row
- styles to identify months and days in the future
- styles identify days of the week
- Most of class names changed; if you've customized a stylesheet, you'll need to update it. Hopefully that won't happen again. (Yes, I said that last time, too. Turns out "_" isn't valid in class names.)
- If you have Storable installed, the tree data and partial results can be cached. It's not completely clear whether this is a win or not; it will depend on things like the number of stories, the speed of your disks relative to your CPU, and the like. If you're concerned about it, you should benchmark it on your own system.
- Other stuff too, I think.
- POD documentation is included
Things still to do:
- Keep better track of people who deserve thanks. Mea culpa.
- Keep better track of changes, or release often enough that it's not too painful to sort through the diffs
To install:
- download and unzip the plugin.
- Copy it to your plugins directory. Make sure it's world-readable.
- Modify a
headorfootfile to include$calendar::calendar,$calendar::month_calendaror$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 some lines like the following:
calendar debug 1: start() called, enabled calendar debug 1: filter() called calendar debug 1: head() called calendar debug 1: head() done, length($month_calendar, $year_calendar, $calendar) = 3174 1228 4488
The numbers will be different, but the rest shouldn't be. If none of them are there, the plugin isn't getting invoked at all for some reason -- is it in the right place? Is it named "calendar"? Is it readable?
- 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_levelconfiguration variable to0. 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.
You can see a sample if you like. The stylesheet being used there is:
.calendar { }
.month-calendar, .year-calendar {
border-collapse: collapse;
}
.month-calendar-head, .year-calendar-head {
font-family: "Trebuchet MS",Verdana,Geneva,Arial,Sans-serif;
font-size: 110%;
font-weight: bold;
}
.month-calendar-day-head, .year-calendar-subhead {
font-family: "Trebuchet MS",Verdana,Geneva,Arial,Sans-serif;
font-weight: normal;
}
.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;
}
.Saturday, .Sunday {
background: #f5deb3;
}
.month-calendar-day-this-day, .year-calendar-this-month {
background: #e9967a;
}
.month-calendar-day-future, .year-calendar-month-future {
color: #808080;
}
2003-03-01 18:11:00 | Comments (0) | TrackBack (0) | Computers::Internet::Web::Blosxom::Plugins::Calendar