[PATCH] pycalendar
Klaus Trainer <klaus.trainer-S0/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
I've just had a little problem with my Pyblosxom's CSS style and needed to add a few lines to the pycalendar plugin to solve it. The problem: If a blog entry has been posted today, I expect the day number to be a member of both CSS classes blosxomCalendarToday _and_ blosxomCalendarBlogged in the HTML code. However the day number is only a member of blosxomCalendarToday. This small patch fixes the inconsistency. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Pyblosxom-devel mailing list Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
pycalendar.diff
(text/x-patch, 641 B)
--- my_pycalendar.py 2008-04-03 23:04:39.000000000 +0200
+++ pycalendar.py 2008-04-03 23:06:27.000000000 +0200
@@ -230,6 +230,12 @@
link = "<a href=\"%s\">%s</a>" % (entry[0], entry[1])
else:
link = strday
+
+ # if it's today and today has been blogged
+ if (self._view[0], self._view[1], day) == self._today[0:3] and \
+ self._entries.has_key(strday):
+ return "<td class=\"blosxomCalendarToday blosxomCalendarBlogged\"> \
+ %s</td>" % link
# if it's today
if (self._view[0], self._view[1], day) == self._today[0:3]: