Home Tutorials/How to Links Blog Photos

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

Christmas Day

I spent Christmas Day with the family, Mom, Dorian, and Steven. We had a great time. From the great joke Steven was able to play on my Mom and Dorian. A couple of weeks ago Steven had my Mom wrap a key chain picture frame for my sister. He told her not to tell my sister anything about it. A few days later he tells my sister to wrap a key chain picture frame for Mom. He told her not to tell Mom anything about it. Christmas day he has them open them at the same time. Neither of them had a clue.

We spent the afternoon at the Georgia Aquarium. It was great, for a change it was not packed. Pictures after the jump.

[More]

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

Adobe released Premiere 3.1.1

Adobe released Premiere 3.1.1 for the Macintosh - Mac OS X v10.5 (Leopard) compatibility updates and important bug fixes. Also available is an update for Encore and Soundbooth