Site Info

Author Page in WordPress

I was working on a site and wanted to create author pages for all registered wordpress user on the site. After looking at the documatation at I came up with this code. It will show the author info as well as last 5 post and last 5 comments. You can see the code in action at my author page.

NextGEN Gallery

I am working on porting over my photos from my coldfusion site this morning. After looking around for a good wordpress plugin to do what I wanted I settled on NextGEN Gallery. Great plugin out the box. I did a little tinkering with the album-compact.php to make my own template. I did not like the linking structure it creates out the box. I really wanted to replicate the links I had on my old coldfusion site (/photos/album name) I created a new album-damon.php and inserted the following code:

<!– List of galleries –>
<?php foreach ($galleries as $gallery) : ?>

<div class=”ngg-album-compact”>
<div class=”ngg-album-compactbox”>
<div class=”ngg-album-link”>
<a class=”Link” href=”/photos/<?php echo str_replace(” “, “”,strtolower($gallery->title)) ?>”>
<img class=”Thumb” alt=”<?php echo $gallery->title ?>” src=”<?php echo $gallery->previewurl ?>”/>
<h4><a class=”ngg-album-desc” title=”<?php echo $gallery->title ?>” href=”/photos/<?php echo str_replace(” “, “”,strtolower($gallery->title)) ?>”><?php echo $gallery->title ?></a></h4>
<p><strong><?php echo $gallery->counter ?></strong> <?php _e(‘Photos’, ‘nggallery’) ?></p>

<?php endforeach; ?>

Now I call this template on my Album page using:

[ album id=x template=damon] (no space before of course)

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”>

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

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.

Blog roll for BlogCFC

I have been playing around with Ray Camden’s BlogCFC for the past few weeks. I am planning on moving over from BlogCFM. One think that I really wanted with my new blog was the ability to easily update links in my blog roll. BlogCFC did not have this out the box, but I came up with a very easy whay of doing this. Using BlogCFC’s Textblocks feature I created a textblok called “blog roll”. Next I created a pod called blogroll.cfm and called my blog roll text block using

FROM dbo.tblblogtextblocks
WHERE LABEL = ‘Blog Roll’


Now all I have to do is update the links in my blog roll textblock, refresh blog cache and my blog roll is updated.

CFChart not working with Coldfusion 7.0.2

I installed Coldfusion 7.0.2 and my TSX Avg MPG chart would not display in IE. It would display fine in FireFox and Safari. After doing some searching I found a trick that worked for me, under your web root create a folder named CFIDE inside of it create a folder called Scripts. Do a search on your hard drive for cf_runactivecontent.js and copy it to the CFIDE/Scripts folder you created. It is working like a charm for me now.

Farcry CMS – Friendly URLS

I have been playing around a good bit with Farcry CMS a content management system for coldfusion. I have it up and running at (not really much up there mostly a domain that I use to play with stuff for the time being) I have now set it up successively with both mollio and the friendly url plugin under IIS 6. Mollio was pretty straight forward using the directions here. As for the friendly URL plugin it was a little more work. I started by following all the directions here, but they leave out one important point you need to install an ISAPI Rewrite plugin under IIS. I just installed this per the directions at the site here and created an IsapiRewrite4.ini file in the same directory as the plugin and added this code:

# friendly url rules
RewriteRule ^/go/(.*)$ /go.cfm?path=/go/$1 [L,PT]

That was it, seems to be working like a champ now. You can check it out at

Mileage Tutorial

Here is the code as well as a download with a Microsoft Access database of my little TSX Avg Mpg page. A couple of people from acurazine asked about it so I decided to put it up. Anyone is welcomed to use this code on your site the only thing I ask is that you link back to me. You will have to make a couple of adjustments to the code to get it to work. Enjoy!

No Older Posts →
← No Newer Posts