BlogCFC 3.7 Released

This post is more than 2 years old.

Lots of changes here, so here we go:

  • The Archives pod now contain category specific RSS links. In the past, the RSS link would automatically change to a category specific link if you were viewing a category. However, this wasn't obvious. This change makes it a heck of a lot more obvious. Thanks to Sean Corfield for the idea.
  • In the same area, the main RSS link no longer changes. If you want a category-specific RSS link, use the Archives pod. We also used to do a RSS feed for one item... which seems a bit silly. That's all gone now.
  • You can now subscribe to a blog. You will get an email for every entry. In the next "point" update, I'll modify the stats page to list the number of folks subscribed, and make it so that if you are logged in, you see a nice list. The default layout.cfm file includes this pod.
  • The properties text file was updated with a few new strings.
  • The unsubscribe file will allow you to unsubscribe from both a blog entry or the blog as a whole.
  • You can now disable comments per entry. Frankly, I think that defeats the whole purpose of a blog. Free speech forever! However - sometimes it can be useful if you have a purely informational post (My blog will be down...) or if a blog thread goes off the deep end.
  • blog.cfc has been updated to support all the crap above.
  • Small bug fixes for the MORE tag, thanks to Matthew Eash for finding the issue.

As always, if you find a bug, it's your fault. Seriously - either post here, or use the support forums. If you love this update, remember my wish list. Also, there will soon be a "proper" BlogCFC homepage. Charlie suggested that and it makes sense.

Edited: You can NOT just copy over files for this update. You must do database updates. See the install scripts for details.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by david posted on 5/17/2005 at 11:27 PM

Installation is as simple as over writing the original blog.cfc file? I have done that and receive an error.

Error:
Unknown column 'tblblogentries.allowcomments' in 'field list'

42S22

Error Executing Database Query.
1054

MySQL is the database.

Thanks

Comment 2 by Raymond Camden posted on 5/17/2005 at 11:31 PM

No, you must update the database. Sorry if that wasn't clear. There is a new tblBlogSubscribers table, and a new column in tblBlogEntries, allowcomments. You can look at the install scripts for details.

Comment 3 by Ian Winter posted on 5/17/2005 at 11:40 PM

You got a typo as well "You can no subscribe", you can now subscribe maybe :)

Otherwise, great release as ever.

Comment 4 by Raymond Camden posted on 5/17/2005 at 11:47 PM

Fixed. Thanks. :)

Comment 5 by Ryan Guill posted on 5/17/2005 at 11:50 PM

Ray, is there any way you could give a link beside comments to subscribe to a thread without posting in it? So even if you don't have something to say but still are interested in what others are saying about a specific post they can still get an email with every new post?

Comment 6 by Raymond Camden posted on 5/17/2005 at 11:52 PM

I could do it - but it will require a db change. Right now the subscription is based on your email being in the comments table. I'd have to move subscription info out of there then.

Comment 7 by Ryan Guill posted on 5/17/2005 at 11:56 PM

I understand, just an idea.

Comment 8 by Raymond Camden posted on 5/17/2005 at 11:58 PM

It would actually be smart since it would cut down on the replication of data, although I'm just replicating one bit. :)

Comment 9 by Jeff Coughlin posted on 5/18/2005 at 12:56 AM

I'm getting an error in index.cfm saying that the local variable "allowcomments" is undefined.

I've got all the DB updates (MSSQL) and file updates (I'm pretty sure I'm not missing anything).

What did I miss?

Comment 10 by Raymond Camden posted on 5/18/2005 at 1:01 AM

Did you refresh the cache? Adding reinit=1 to the URL.

Comment 11 by Jeff Coughlin posted on 5/18/2005 at 1:01 AM

Nevermind. I forgot to refresh the cache :)

Comment 12 by Jeff Coughlin posted on 5/18/2005 at 1:04 AM

Wierd timing (we both posted that at the same time), but yeah it was the cache.

Comment 13 by Ian Winter posted on 5/18/2005 at 6:44 PM

With the DB updates, can I simply add the fields to my existing DB and set with the defaults values? Don't want to drop it all and migrate the data, or, is there another way?

Comment 14 by Raymond Camden posted on 5/18/2005 at 6:48 PM

Yes - WARNING - when you add AllowComments, be sure to default to yes. I did that though and I had to also write a quick SQL statement to update the old data. I think maybe I said null was ok so it didn't default. Anyway, be sure to set all your old entries to 1 or no one will be able to comment.

Comment 15 by IRz posted on 5/19/2005 at 7:38 PM

With MSACCESS Database test

Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 5.

The error occurred in F:\CMSTags\com\blog.cfc: line 543
Called from F:\RayCamdenblogCFC 3.7\client\includes\pods\calendar.cfm: line 53
Called from F:\RayCamdenblogCFC 3.7\client\tags\layout.cfm: line 77
Called from F:\RayCamdenblogCFC 3.7\client\login.cfm: line 33
Called from F:\RayCamdenblogCFC 3.7\client\Application.cfm: line 60
Called from F:\CMSTags\com\blog.cfc: line 543
Called from F:\RayCamdenblogCFC 3.7\client\includes\pods\calendar.cfm: line 53
Called from F:\RayCamdenblogCFC 3.7\client\tags\layout.cfm: line 77
Called from F:\RayCamdenblogCFC 3.7\client\login.cfm: line 33
Called from F:\RayCamdenblogCFC 3.7\client\Application.cfm: line 60

541 :
542 : <cffunction name="getCategories" access="remote" returnType="query" output="false">
543 : <cfset var getC = "">
544 :
545 : <cfquery name="getC" datasource="#instance.dsn#">

--------------------------------------------------------------------------------

SQL select distinct datepart(dd, posted) as posted_day from tblblogentries where posted >= (param 1) and posted <= (param 2) and blog = (param 3) and posted < (param 4)
DATASOURCE blogdev
VENDORERRORCODE -3010
SQLSTATE 07002

Please try the following:

Comment 16 by Raymond Camden posted on 5/19/2005 at 8:46 PM

You forgot to change the dbtype in the ini file to msaccess, or you did, and you forgot to refresh the cache.

Comment 17 by O?uz Demirkap? posted on 5/22/2005 at 2:14 PM

Default charset for mysql script is again "latin1". I just informed before that it must be "utf8" for having unicode support.

Comment 18 by O?uz Demirkap? posted on 5/23/2005 at 5:35 PM

In layout.cfm file we also need "<cfprocessingdirective pageencoding="utf-8">" for Unicode support.

Comment 19 by O?uz Demirkap? posted on 5/23/2005 at 5:36 PM

And my name is still not correct in your blog Ray.

:)

Comment 20 by Raymond Camden posted on 5/23/2005 at 6:31 PM

Added the cfproc tag to layout.cfm. Will have to wait till next release though. Will update the mysql scripts again.

Comment 21 by Kevin Graeme posted on 5/23/2005 at 7:17 PM

I'd recommend using H1-H6 tags for the things like the entry titles instead of using DIVs. This will help significantly for search engine optimization. It's easy enough to fix in the display page, but many people are just going to use it as is.

Cheers.

Comment 22 by Brian posted on 5/24/2005 at 10:09 AM

Question...maybe a stupid one, I'd like to allow multiple users to have login names. I've adden the users to the db(MSACCESS) and can only login w/ admin..Probably stupid, I'm sleepy but I think I'm stuck...

Please help!

Comment 23 by Raymond Camden posted on 5/24/2005 at 6:17 PM

You need to edit the ini file and specify which users have access to the blog. The idea is that if you have N blogs in one db, you need to specify which user has access to what blog.

Comment 24 by Brian posted on 5/24/2005 at 6:34 PM

Thanks Ray!

I finally figured that out...I think I was too tired last night to be working actually! I'm putting this blog together for a local ISP organization we belong to and I'm going to have all the members chip in an get you something from your wish list when we're done!

See I need to allow multiple contributers to this one blog (9 users to be exact from the board of directors).

Another question...How hard would it be to only allow a user to edit posts created by them and not by other contributers?

Thanks again for a great product!

Brian

Comment 25 by Raymond Camden posted on 5/24/2005 at 7:07 PM

Note the code that detects if designmode is on and then prints an edit link next to each entry. Modify that to check the ... um user field - I forget what I called it - but anyway, compare _that_ value to getAuthUser(), and if they are the same, then show the edit link. To be anal, you would also need to edit the second security check in edit.cfm, but you probably don't have to worry about that.

Comment 26 by Andy Clark posted on 5/26/2005 at 9:49 PM

I'm having an intermittent problem on moving to the new version
at http://www.paulmartinsblog.com

Element ROOT is undefined in APPLICATION.

The error occurred in D:\INETPUB\premiersoccerstats\CanadasPM\client\includes\pods\about.cfm: line 3
Called from D:\INETPUB\premiersoccerstats\CanadasPM\client\tags\layout.cfm: line 93
Called from D:\INETPUB\premiersoccerstats\CanadasPM\client\login.cfm: line 33
Called from D:\INETPUB\premiersoccerstats\CanadasPM\client\Application.cfm: line 60

1 : <cfsetting enablecfoutputonly=true>
2 : <cfprocessingdirective pageencoding="utf-8">
3 : <cfmodule template="/#application.root#/tags/podlayout.cfm" title="About">
4 : <cfoutput>

If I try reinit= , I get the same error

If I then revert to the old version I had up previously, likewise accessing in designmode=1, I get the login fields followed by error

The error occurred in D:\INETPUB\premiersoccerstats\CanadasPM\client\tags\layout.cfm: line 78
Called from D:\INETPUB\premiersoccerstats\CanadasPM\client\login.cfm: line 33
Called from D:\INETPUB\premiersoccerstats\CanadasPM\client\Application.cfm: line 59

76 :
77 :
78 : <cfinclude template="/#application.root#/includes/pods/about.cfm">
79 :

Then when I try reinit=1 the page processes correctly

Switching back to the new version ( by renaming directory) I get the allowcomments error but on reinit=1 everythin gi s fine.
However when I try and access the site again some time later the same problem recurs

Comment 27 by Raymond Camden posted on 5/26/2005 at 9:56 PM

Any - the pods no longer use application.root, actually nothing does. You will need to change your code in your pods to match how they are written now.

As for allowcomments, the DB has been updated. You need to modify your tables per the SQL files in the install folder.

Comment 28 by Andy Clark posted on 5/26/2005 at 11:55 PM

Thanks Ray
Changing the code in the old pods seems to have solved the problem.

I had already amended the DB tables so that error was prob occurring as the old version did not refer to them

Thanks as usual

Comment 29 by Jason Sheedy posted on 6/5/2005 at 1:33 PM

Hi Ray, I finally got around to upgrading my blog. Lot's of great updates in there .. For your reference I've posted my experience on my blog.. I've included the mysql update script in there if anyone's interested.

http://www.jmpj.net/jason/i...

- Jason

Comment 30 by Andy Clark posted on 6/6/2005 at 12:29 AM

You'ld think I'd have made every mistake I could but attempting to create a new blog I have run into this error

Data source deafblog could not be found.

Error occurred in blog.cfc line 526

I have attempted to copy the procedure succesfully undertaken before but have slipped up somewhere along the line

in blog.ini
[deaf]
dsn=deafblog
blogDBType=MSACCESS

database name deafblog

in application.cfm
<cfset blogname = "Deaf"> "deaf" also does not work
I also tried changing the cfapplication name without success

mapping
physical site path points to client folder (cf other blogs) named logical path deafblog - you suggest naming org not surewhy as I havent done that before

Comment 31 by Jeff Coughlin posted on 6/6/2005 at 2:13 AM

Andy,

Sorry if this sounds obvious, but do you have a datasource name setup called "deafblog" that points to an Access databse file? Your configuration is setup that way and the error you're getting says that it can't find the datasource.

Comment 32 by Raymond Camden posted on 6/6/2005 at 6:40 PM

Jeff is right - check to make sure you actually have a DSN called that.

Comment 33 by Andy Clark posted on 6/6/2005 at 9:39 PM

Ouch

That will teach me for not playing baseball with the kids longer on a Sunday

Cheers

Comment 34 by Andy Clark posted on 6/9/2005 at 4:51 PM

Anyone come across problem with comment subscribing when using Firefox but not IE?

Comment 35 by Raymond Camden posted on 6/9/2005 at 4:55 PM

I use Firefox to test and not IE - so I definitely haven't seen it. Do you mean subscribing to the blog in general, or subscribe to a comment thread? If you have a place where I can test this, I'll be glad to.