OddThinking

A blog for odd things and odd thoughts.

Compact Monthly Archive Widget – 1.0 Released

The Compact Monthly Archive Widget has just been released at 1.0.

This widget has been on the sidebar on the left of OddThinking for 9 months, but now it is available for you own WordPress blog.

Everything you need to know is on the plug-in’s home page.


The exciting part is not the widget itself, but the fact that it is hosted by WordPress – that’s a big change from EmailShroud and CRCRLF which are only hosted here.

That meant learning Subversion (which has been on my list for a while).

It also meant learning Trac as a developer, rather than merely a reporter. Note: I haven’t worked out how to get this component added to the Trac component list, so you can’t report bugs that way, yet. πŸ™

Finally, it meant learning the WordPress/BB Readme.txt format, which I still haven’t nailed because the screenshot included with the readme is 404ing. πŸ™


Comments

  1. DonÒ€ℒt get used to Subversion. Move up to something better before it rots your brain too much.

  2. Aristotle: Svn is the evolution of old Cvs.
    Did you invent a newer, more advanced, system? πŸ˜›

  3. hi. Thanks for plugin

    perfect.

    regards

  4. This is a great plugin

  5. Hi. I like the plugin. I want to ask you 2 things:

    1) How I can use the plugin when I’m not using sidebar widgets. I mean, Is it possible to use the plugin in an “old school” way?

    2) Is it possible to use a timestamp different from my locale language?.

    Thanks in advance! (sorry for my bad english).

  6. Matias,

    I had to look at the code to remember this…

    Sorry,

    1) No, I use the widget framework to look after most of the context, so it can’t run as an old-school plugin. (You are, of course, welcome to adapt it.)

    2) The WordPress locale is used to find out the names of the months. It doesn’t have to be the same locale as the operating system on the server, but it does have to be the same locale as the WordPress instance.

    I’d be interested to hear why you would like it to be different; sounds like an unusual need.

  7. Don’t work with WP 2.3.1 πŸ™
    Please help.

  8. Phil,

    First thing to do is to immediately upgrade to WordPress 2.3.2 to deal with a security issue that was dealt with over 2 years ago.

    Actually, best upgrade to 2.3.3, to deal with the security issues dealt a few months later.

    Now that you have the upgrading process down pat, maybe you should consider upgrading to either 2.5.1, 2.6.5, 2.7.1, 2.8.6 or, best still, 2.9.2? There’s been a lot of progress to WordPress since you last upgraded!

    If you do have some good reason not to upgrade past 2.3.* (Please share what it is, I am curious!), this plugin should still work. Let me know what symptoms you are having. (But, I can’t promise to actually install WP 2.3.1 to test it, sorry.)

  9. Just confirming: it appears to work for WordPress 3.0RC.

  10. Hi – great plugin!
    Is it possible to have the years in reverse order – so as to have 2010 at the top and 2008 at the bottom of the list?

    Cheers

  11. Charlie,

    Excellent question.

    I haven’t got the time at the moment to actually implement and test this out, but I can point to the right area if you are handy with PHP and SQL.

    In the file compactMonthlyArchiveWidget.php, at line 21, there is an SQL query, that finishes: ORDER BY post_date ASC");

    I think you need to replace that last bit with: ORDER BY Year DESC MONTH ASC");

    In the same file, at line 28 it says for ($currentYear = $startYear; $currentYear < = $endYear; $currentYear++).

    You need to replace <= with >= and ++ with --

    This is untested! Good luck.

  12. First of all, thanks a lot for your plugin. It works fine on my website and it makes it really comfortable to organize all the articles.
    Now my question: Is it possible to exclude one special category?
    Thanks, Christian

  13. Christian,

    Interesting question. The short answer seems to be “No”, but let me explain why, because you may have some work-arounds if you are handy with PHP and SQL.

    There are two places that would need to be changed.

    The tough one is working out what pages the month initials should link to. This plug-in doesn’t define the monthly archive pages, it just links to the existing ones provided by WordPress. (The relevant line is 42, where it calls get_month_link(). This function returns the URL to the archive page relevant for that month.) I can’t see (with a cursory search) any variants to the archives to show a page that excludes some categories.

    The other part is the SQL search in line 21, which counts the number of records per month. (If there are no records that month, there is no link provided.) That SQL search might need to be modified to cross-reference against the POST categories tables, so if there were any months which ONLY had posts from excluded categories, it wouldn’t link to an empty page. Is that something that is likely to happen on your blog? This is certainly feasible, but a bit too much effort to get right in the 5 minutes I’ve got to spend on this now – especially given you may not even need this extra nicety, and the other problem is probably a show-stopper.

    Good luck with it; please let me know if you are successful.

Leave a comment

You must be logged in to post a comment.