Home Tutorials/How to Links Blog Photos

Coldfusion 8.0.1

Adobe released Coldfusion 8.0.1. I am a little late on this one as I was flying back from Chicago on the day it was released and missed it. I just updated my box and it seems to be working great. If you are going to run this update make sure you get the new extensions for Dreamweaver or Eclipse, as they have introduced a lot of new tag attributes, like an alt attribute for cfimage.

Gravatar

Add your photo next to your blog comments. Not all blogs are using it but it is built into blogcfc. Head over to http://site.gravatar.com/ to create your "globally recognized avatar" and have your photo displayed next to your blog comments.

Previous and Next in Coldfusion

I have done this before when the data was clean and when I only needed to worry about one ID by just adding or subtracting one from the ID value. On my photo album pages I wanted to create a way to view my photos without lytebox. I have 2 IDs photo album and photo. Also my data is not the cleanest for example in my Denver photos I do not have a photo 1. I came up with a solution, not the most elegant I will admit. My work around for this problem includes looping the query to set the row number to a variable than instead of displaying against the photo ID I display against the row number. To create the next and previous I just add or subtract 1 from the row number. I also had to put a cfif to check to make sure my previous row variable was not -1. The code is below. You can see it in action here.

<cfloop query="QPhotos">
<cfif QPhotos.Photo_ID eq URL.PHOTO>
<cfset displayrow = QPhotos.currentrow>
</cfif> </cfloop>
<cfset nextrow = displayrow+1>
<cfset previousrow = displayrow-1>
...
<cfif previousrow GT 0><cfoutput query="QPhotos" startrow="#previousrow#" maxrows="1">
...
<cfoutput query="QPhotos" startrow="#displayrow#" maxrows="1">
...
<cfoutput query="QPhotos" startrow="#nextrow#" maxrows="1">

RSS Feeds

I started out playing with cffeed in Coldfusion 8 about a week ago. I decided to build a RSS feed of each of my photo albums in an attempt to learn more about the tag. After scratching my head for a while and a lot of help from http://validator.w3.org/feed/ I now have an rss feed for each of my photo albums. Check them out at http://www.damonledet.com/photos

Google weirdness

I was talking with someone the other day about google people's names. I used to google my name when I first started blogging just to see what would come up. It had been a while so I decided to google my name today. I am lucky, as Damon Ledet seems to be a pretty unique name combination, so to my knowledge the results usually pertain to me. Any other "Damon Ledet"s out there? I would love to know if someone else has the same name. Back to the google weirdness, It returned 7670 results for a search of "Damon Ledet" I could not see how this was possible, I start going thought the results and at page 91 google stops returning 901-909 of 7670 results. I took a screen shot below. So really I have 909 results but for some reason the index thinks I have 7670. What is up with that?

Google screenshot

Using cfimage to create thumbnails

I have been playing around with the new cfimage tag in coldfusion 8. I am very impressed with the resize capability. Coldfusion 8 seemed to do a great job resizing my images into thumbnails. I created a tutorial here.

Here is a little bit of code to create thumbnails.

<cfimage action="info" structname="imagetemp" source="Path to your image">
<cfset x=min(150/imagetemp.width, 113/imagetemp.height)>
<cfset newwidth = x*imagetemp.width>
<cfset newheight = x*imagetemp.height>
<cfimage action="resize" source="#Path to your image#" width="#newwidth#" height="#newheight#" destination="#thumbnail destination#">

Update: My Using CFIMAGE to Generate Thumbnails tutorial was published at learncf.com

Blog stats after 4 weeks on BlogCFC

Well I have been running blogcfc for four weeks now, and I am still very pleased. I think I got everything configured how I like it now; but a website is always a work in progress in my opinion you are never really done. Now that I have been running it a month I am amazed at how many visits my individual post get. I run google analytics on my site but I never drilled down to the number of visitors per post. I would never have guessed that a post I wrote in February of 2006 would still get over 400 views in 4 weeks. Check out the blog stats page, one of my favorite features of blogcfc.

Export Categories in Blogcfc Google Sitemap

Not anything really fancy but add this little bit of code to your blogcfc googlesitemap.cfm to have google also learn about your categories. The way I figure it you can never tell google too much about your site :)

<cfset cats = application.blog.getCategories()>
<cfoutput query="cats">
<url>
<loc>#application.blog.makeCategoryLink(categoryid)#</loc>
<priority>0.3</priority>
<changefreq>weekly</changefreq>
</url>
</cfoutput>

NTSC Action on Adobe Studio Exchange

My Photoshop NTSC action is now on Adobe Exchange. If you have not check out the Adobe Exchange it is a great place to download tons of mostly free stuff for all of the Adobe products.
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1304020

Moved to BlogCFC

I have been running BlogCFM for sometime now, and it has served me well. I was discouraged when I found out it was "abandonware". I was on a mission to find a new blog engine for blog.damonledet.com. I played with Mango Blog, Machblog, AVBlog, and BlogCFC. I decided on BlogCFC. It seems to be the most mature of the engines and has most of the features I was after.

I ported all my data over from BlogCFM and setup a few 301 redirect (do not want to lose all that google love) and am now happily on BlogCFC. Thanks so much Ray for a wonderful Coldfusion blog engine. You Rock!

More Entries