Two years ago I whipped up a quick blog entry demonstrating how to make use of the CFYahoo ColdFusion library to retrieve images related to the 12 Days of Christmas. I was thinking of this entry and thought it would be nice to repost the code and use more current results. So nothing new here, nothing serious, just something a bit cute (imho). The code:

<cfset imageAPI = createObject("component", "CFYahoo.org.camden.yahoo.image")>

<cfset gifts = ["A partridge in a pear tree","Two turtle doves","Three French hens","Four calling birds","Five golden rings","Six geese a-laying", "Seven swans a-swimming","Eight maids a-milking","Nine ladies dancing","Ten lords a-leaping","Eleven pipers piping","Twelve drummers drumming"]>

<cfloop index="x" from="1" to="#arrayLen(gifts)#">

<cfinvoke component="#imageAPI#" method="search" returnVariable="result"> <cfinvokeargument name="query" value="#gifts[x]#"> <cfinvokeargument name="results" value="3"> </cfinvoke>

<cfoutput> <h2>Image search for #gifts[x]#</h2> </cfoutput>

<cfoutput query="result"> <cfif len(thumbnail)> <img src="#thumbnail#" width="#thumbnailwidth#" height="#thumbnailheight#" alt="#title#" style="align:left"> </cfif> <h3>#title#</h3> URL: <a href="#clickurl#">#result.url#</a><br />
Summary: #summary# <br clear="both" style="clear:both">

<p> <hr> </p> </cfoutput> <cfflush>

</cfloop>

Nothing fancy there - just looping over the array and performing the search. I did have to get anal with the BR/clear tag as Chrome did not support br clear=left when I used align="left" in the image. Outside of that though the code worked perfectly well. And here is the result. Enjoy.

Also let me take this opportunity to wish everyone a Merry Christmas!

Image search for A partridge in a pear tree

Partridge in a Pear Tree jpg

Partridge in a Pear Tree jpg

URL: http://www.julesavenuegraphics.com/Partridge_in_a_Pear_Tree.jpg

Summary: Partridge in a pear tree card


12 days partridge pear tree jpg

12 days partridge pear tree jpg

URL: http://www.msgr.ca/msgr-2/12%20days%20partridge%20pear%20tree.jpg

Summary: My true love gave to me A Partridge in a Pear Tree


Partridge In A Pear Tree Pin JPG

Partridge In A Pear Tree Pin JPG

URL: http://www.distinctgiftshop.com/media/Partridge_In_A_Pear_Tree_Pin.JPG

Summary: Partridge In A Pear Tree Pin


Image search for Two turtle doves

12daysofxmas 2 turtle doves jpg

12daysofxmas 2 turtle doves jpg

URL: http://www.deanperry.co.uk/images/seasonalextras/12days/12daysofxmas-2-turtle-doves.jpg

Summary: Three French Hens Two Turtle Doves A Partridge in a Pear Tree


2turtledoves jpg

2turtledoves jpg

URL: http://www.fashion-era.com/images/xmas/xmas_traditions/2turtledoves.jpg

Summary: On the second day of Christmas my true love gave to me Two Turtle Doves and a partridge in a pear tree


dove jpg

dove jpg

URL: http://www.bevo.co.uk/blog/dove.jpg

Summary: 5 58 pm | General Chatter My day has been random Woke up in a strange house fully cloathed scared to death coz I didn t know where I was Went for a walk through the Wellington in a short sleeved shirt saw


Image search for Three French hens

three french hens 2 jpg

three french hens 2 jpg

URL: http://quidnimis.squarespace.com/storage/three_french_hens_2.jpg

Summary: And what about those three hens Help is on the way


3 french hens jpg

3 french hens jpg

URL: http://www.ashmolean.org/assets/images/Shop/larger/3_french_hens.jpg

Summary:


22 threefrenchhens72 jpg

22 threefrenchhens72 jpg

URL: http://www.porterfieldsfineart.com/JohnnyKarwan/images/22-threefrenchhens72.jpg

Summary:


Image search for Four calling birds

1217 day four copy jpg

1217 day four copy jpg

URL: http://www.in-forum.com/gfx/photos/thumbs/1217%20day%20four%20copy.jpg

Summary:


4callingbirds 200 jpg

4callingbirds 200 jpg

URL: http://shopping.originpublishing.com/chart_images/4callingbirds_200.jpg

Summary:


20 fourcallingbirds72 jpg

20 fourcallingbirds72 jpg

URL: http://www.porterfieldsfineart.com/JohnnyKarwan/images/20-fourcallingbirds72.jpg

Summary:


Image search for Five golden rings

3905 JPG

3905 JPG

URL: http://www.rembrandtcharms.com/charm_img/3905.JPG

Summary:


5rings jpg

5rings jpg

URL: http://www.cashbarn.com/gif/5rings.jpg

Summary: PLUS 5 SECOND PLACE PRIZES RETAIL $180 00 EACH FIVE 5 GOLDEN RINGS This diamond band is beautifully crafted in 14K Yellow Gold and includes 13 round diamonds of equal size The shared prong setting allows the maximum amount of light to


5goldrings jpg

5goldrings jpg

URL: http://guy-sports.com/fun_pictures/christmas/5goldrings.jpg

Summary: my true love gave to me Six Geese a laying five golden rings four calling birds three French hens two turtle doves and a partridge in a pear tree


Image search for Six geese a-laying

6 geese a laying jpg

6 geese a laying jpg

URL: http://www.deanperry.co.uk/images/seasonalextras/12days/6-geese-a-laying.jpg

Summary: Eight Maids A Milking Seven Swans A Swimming Six Geese A Laying Five Gold Rings


Six Geese a  laying1 jpg

Six Geese a laying1 jpg

URL: http://www.shanart.com/images%20/Six-Geese-a--laying1.jpg

Summary: Six Geese a Laying


36972 reg jpg

36972 reg jpg

URL: http://www.giftcorral.com/giftcorral/images/items/36972_reg.jpg

Summary: Our Price $7 00 Big Sky Carvers Six Geese A Laying Ornament


Image search for Seven swans a-swimming

seven swans a swimming jpg

seven swans a swimming jpg

URL: http://www.artshole.co.uk/arts/artists/anna%20charity/seven-swans-a-swimming.jpg

Summary: seven swans a swimming


TN seven swans a swimming JPG

TN seven swans a swimming JPG

URL: http://www.artshole.co.uk/arts/artists/anna%20charity/TN_seven-swans-a-swimming.JPG

Summary: seven swans a swimming


X7 Seven swans a swimming l GIF

X7 Seven swans a swimming l GIF

URL: http://www.papersharks.com/lrgxmasImages/X7%20Seven%20swans%20a%20swimming%20l.GIF

Summary:


Image search for Eight maids a-milking

Eight Maids a Milking jpg

Eight Maids a Milking jpg

URL: http://www.artshole.co.uk/arts/artists/April%2006/Jay%20Taylor/Eight-Maids-a-Milking.jpg

Summary: Eight Maids a Milking


TN Eight Maids a Milking JPG

TN Eight Maids a Milking JPG

URL: http://www.artshole.co.uk/arts/artists/April%2006/Jay%20Taylor/TN_Eight-Maids-a-Milking.JPG

Summary: Eight Maids a Milking


8 maids a milking jpg

8 maids a milking jpg

URL: http://www.deanperry.co.uk/images/seasonalextras/12days/8-maids-a-milking.jpg

Summary: and previously Nine Ladies Dancing Eight Maids A Milking Seven Swans A Swimming


Image search for Nine ladies dancing

9ladies jpg

9ladies jpg

URL: http://www.fashion-era.com/images/xmas/xmas_traditions/9ladies.jpg

Summary: On the ninth day of Christmas my true love gave to me Nine Ladies Dancing eight maids a milking seven swans a swimming six geese a laying Five golden rings Four calling birds three French hens two


9 ladies dancing jpg

9 ladies dancing jpg

URL: http://www.deanperry.co.uk/images/seasonalextras/12days/9-ladies-dancing.jpg

Summary: 10 Lords A Leaping click for bigger and previously Nine Ladies Dancing Eight Maids A Milking


thumb 9ladies small jpg

thumb 9ladies small jpg

URL: http://www.jonquathor.co.uk/albums/userpics/10001/thumb_9ladies-small.jpg

Summary: Nine Ladies Dancing 72 viewsFiller art for the Twelve Day of Christmas at The Wotch


Image search for Ten lords a-leaping

Ten Lords A Leaping Thumb jpg

Ten Lords A Leaping Thumb jpg

URL: http://www.coloursdownunder.com.au/shop/images/product_images/Ten-Lords-A-Leaping-Thumb.jpg

Summary:


1993 Ten Lords A Leaping JPG

1993 Ten Lords A Leaping JPG

URL: http://www.thepartyshop.com/Commerce/images/1993%20Ten%20Lords%20A-Leaping.JPG

Summary: 1993 Springtime Bonn > 27 Apr 2005 21 40 57K 1993 TURTLE jpg 14 Jul 2005 08 37 33K 1993 Ten Lords A Lea > 26 May 2005 14 53 28K 1993 Time for Easter > 27 Apr 2005 21 54 100K


36976 reg jpg

36976 reg jpg

URL: http://www.giftcorral.com/giftcorral/images/items/36976_reg.jpg

Summary: Our Price $5 25 Big Sky Carvers Ten Lords A Leaping Ornament


Image search for Eleven pipers piping

xmas11 jpg

xmas11 jpg

URL: http://streamers.com/ideas/xmas11.jpg

Summary: Eleven Pipers piping


11 pipers piping jpg

11 pipers piping jpg

URL: http://www.deanperry.co.uk/images/seasonalextras/12days/11-pipers-piping.jpg

Summary: It s the Penultimate Day of Christmas Woohoo so here s Eleven Pipers Piping click on the image for a full size version The Eleven Pipers represent the eleven Faithful Apostles 1 Simon Peter 2 Andrew 3 James 4 John 5 Philip 6 Bartholomew 7 Matthew 8 Thomas 9 James bar Alphaeus 10 Simon


pipers piping 12 days jpg

pipers piping 12 days jpg

URL: http://www.msgr.ca/msgr-2/pipers%20piping%2012%20days.jpg

Summary: My true love gave to me


Image search for Twelve drummers drumming

Twelve Drummers Drumming300 jpg

Twelve Drummers Drumming300 jpg

URL: http://www.creativedisplays.com/siteresources/modules/webstore/ProdImages/Twelve%20Drummers%20Drumming300.jpg

Summary: Twelve Drummers Drumming Six Feet Tall TDD6 Twelve Drummers Drumming Six Feet Tall animated Large Drums


find the twelve days of christmas 10 jpg

find the twelve days of christmas 10 jpg

URL: http://static.howstuffworks.com/gif/find-the-twelve-days-of-christmas-10.jpg

Summary: View Enlarged Image Find twelve drummers drumming and lots more in this Christmas game


12 drummers drumming jpg

12 drummers drumming jpg

URL: http://christiannewwave.files.wordpress.com/2007/04/12-drummers-drumming.jpg

Summary: German band Twelve Drummers Drumming started in the autumn of 1983 Seizing their name from an English Christmas carol The 12 Days OF Christmas The line up consisted of Rudi Edgar