Viewing By Category : blogCFC / Main
July 24, 2006

Over the weekend, I noticed that several of my older blog posts weren't showing up when I searched for them on my site. After a little more digging, I found that several hundred seemed to be missing. I couldn't get to them via a search, by date, or even by their UUID directly in the URL. I checked the database tables, and sure enough they were there.

After a little more digging, it turns out the problem has to do with having upgraded from blogCFC 3.x to 4.x to 5.x. Along the upgrade path, changes there were several additions to the blogCFC database, as well as the core CFC code. One of those changes introduced a new field in the tblBlogEntries table called username. The username is supposed to contain the username of the person making the blog entry. In my case, all "new" blog entries from blog CFC 4.x on had a value in this field. Older entries, from the blogCFC 3.x days didn't. Instead, they were NULL. This caused the main method in blogCFC.cfc to return no results for entries with NULL for the username. You can see why in the WHERE clause for the getEntry method:

where   tblblogentries.id = <cfqueryparam value="#arguments.id#" cfsqltype="CF_SQL_VARCHAR" maxlength="35">
and   tblblogentries.blog = <cfqueryparam value="#instance.name#" cfsqltype="CF_SQL_VARCHAR" maxlength="50">
and   tblblogentries.username = tblusers.username

Once I made an entry in the username column for all of my "legacy" entries, all of the posts started showing up as expected.

July 18, 2006

It took all weekend, but I was finally able to get my blog updated to the (almost) latest version of blogCFC. It looks like I wasn't the only one who had a hard time with the upgrade. Admittedly, my troubles were all self inflicted as I had quite a bit of customization to both the look and feel, and some code I had in place to manage two blogs from a single codebase.

If you don't use WinMerge, I suggest taking a look. Without a diff/merge tool like this, it would have taken me a heck of a lot longer to perform the upgrade.

So far, everything with 5.1 seems to be working ok. I had some errors from the Yahoo slurp spider trying to follow my Print links. Not sure why it's doing that as the links are clearly labeled NOFOLLOW.

January 20, 2006

In case you missed the announcement, Ray Camden released version 4.03 of blogCFC. Included in the point release is an updated stats template I worked on that has the addition of a linked table of contents as well as stats about TrackBacks.

December 8, 2005

If you're a blog CFC user, you're probably aware that you can easily include code snippets in your posts by surrounding the code with <code>...</code>. What you may not be aware of is how auto-formatting is handled within the code blocks. Take the following two examples:

Example 1:

<cfif arraylen(results.len) is 0>
<cfset arrayappend(results.len, 0)>
<cfset arrayappend(results.pos, 0)>
</cfif>

Example 2:

<cfif arraylen(results.len) is 0>
   <cfset arrayappend(results.len, 0)>
   <cfset arrayappend(results.pos, 0)>
</cfif>

At first glance, you're probably thinking "what's the big deal? The first example has no indenting and the second one does". You would be partially right. What isn't obvious at first glance, though, is that both code example I posted DO have indenting. The difference is the first example indents using spaces while the second one uses tabs. The color coding method used by blogCFC will only auto-indent code that's been indented using tabs.

I know people debate the tabs vs. spaces issue all the time. Bottom line here, though, is that if you want to have your code intented in blogCFC, you'll need to make sure your IDE uses tabs and not spaces for indents.

December 7, 2005

Thanks to feedback from Steven Erat Rob Gonda and Jacob Munson, I've made a few updates to the BlogCFC Monthly Archive Pod I released yesterday. So, what's changed? Here's a short list:

  • Removed references to dbo. and {fn} for MySQL compatability. Note that I have only tested the pod on SQL Server, so if you are running it on a different DB platform, let me know if there are any problems.
  • Removed scope chaching as it was interfering with the propper passing of url variables.
  • Added logic to keep selected month displayed in dropdown and made it possible to select current month.
  • Changed /tags path to /blog/tags, not /blogs/tags for generic distribution. My site uses a different layout and directory structure, so for my setup, I had to make changes. I'll try to keep future changes and pods generic for Ray's base implementation.

You can download the latest version here. As always, suggestions are appreciated.

December 6, 2005

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):

archivesbymonth=Archives By Month

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.

November 10, 2005

I just finished upgrading my tech blog to Version 4.0 of Ray Camden's most excellent blogCFC. There are a ton of new, cool features in the new version, some of which I was fortunate enough to be able to contribute.

Some of the new features include:

  • Technorati link
  • del.icio.us link
  • Addition of website field to comments
  • Rearranged links and other meta information for better organization
  • Much, much more

I'm still not totally 100% happy with my CSS, but I'm getting there. Comments/criticisms are welcome.

November 1, 2005

I just upgraded my blog from version 3.8 to the alpha of Ray Camden's excellent blogCFC 4.0. I have a lot of customizations for my site, so it's never a *simple* task. After running the database scripts to add the new tables and constraints, I used WinMerge to diff the new code against my current code base. This helps me see the differences between my modded code and Ray's base code and approve changes on a line by line basis. Very handy.

Nice features in 4.0 include the addition of TrackBacks, RRS 2.0 and lots of other goodies.




Copyright 1995-2008 Rob Brooks-Bilson. All rights reserved.
Aura skin for Raymond Camden's BlogCFC inspired by Joe Rinehart & Steven Erat. This blog is running version 5.5.1.