In an effort to make the content on my blogs easier to find, I decided to create a monthly archive pod for Ray Camden's blogCFC, the software I use for my blogs. BlogCFC is very easy to extend, which makes it the perfect blogging platform for ColdFusion developers. You can download the pod here.
The new pod is simple. It creates a dropdown box containing individual months grouped by year. When a month is selected, a bit of JavaScript reloads the page with the requested content. The dropdown box only contains listings for months that contain blog posts, and it works with multi-blog installations as well.
There are a few things to note. First, because the pod is setup for internationalization, you need to add the following to your /includes/main_en_US.properties file (or equivalent):
Next, copy the new pod file, monthlyarchives.cfm to your pods directory, usually /includes/pods/. Once you've done that, add an include for the pod in your layout.cfm file (or other layout file if you've customized your implementation).
If you look at the code for the pod itself, you'll see that I included an inline query. Ideally, this should be moved inside blog.cfc itself, but since this is an extension to the core blog, I've left it in the pod for now.
If you find this pod useful, let Ray know and he might include it as part of a future blogCFC release.
Also, I had to remove all of the dbo. from your cfquery statement, I'm on MySQL not MSSQL. :)
The pod is still showing an error, but I don't have time to keep researching it right now. I'll get back later.
I think your other issue with mySQL may come from the function I used for the month and year. I'll investigate that as well.
The dropdown doesn't really work for the current month, not does it stay in the selected month after switching. Those are two basic tweaks I'd recommend.
Cheers
-Rob
My version is here:
http://tinyurl.com/dgaex
Rob, I'll try to add your suggestions in tomorrow as well.
Thanks`-`
I got this to work.
John