Click to search Andy Jarrett.co.uk RSS feed

Loading Twitter

My blog has moved

Please update your bookmarks and feeds for my site.

I now have a Mango Blog at:

http://www.andyjarrett.com/blog

Feed URL: http://feeds.feedburner.com/andyjarrett

Comments Comments (0) | Print Print | Send Send | 1264 Views

Reading Flickr RSS feed

This is nothing great, and it uses Ray Camden RSS.cfc to read and execute your Flickr feed.

<!--- Your feed (this is mine) --->
         <cfset myRssFeed = "http://www.flickr.com/services/feeds/photos_public.gne?id=38904643@N00&format=rss_200" />
         <cfhttp method="get" url="#myRssFeed#"></cfhttp>
         <cfset flickr_rss         = cfhttp.FileContent />
         <cfscript>
            feed       = flickr_rss;
            rss       = createObject("component", "rss");
            entries = rss.getEntries(feed);
         </cfscript>      
         
         <cfdump var="#entries#" />

Comments Comments (0) | Print Print | Send Send | 4865 Views

Flickr HTML form upload

Below is a Flickr upload script i've been playing around with. You'll notice that im using <CFHTTP> to post the data. This is so that you can insert the fields into another form, otherwise if you want you can post the form fields direct to http://www.flickr.com/tools/uploader_go.gne.

For more information on the Flickr Upload Api click here.

<cfset flickrEmail = "" />
<cfset flickrPassword = "" />


<cfif NOT isDefined("form.photo")>
   <form action="flickr.cfm" method="post" enctype="multipart/form-data">
   
      <table border="1">
         <tr><td>photo:</td><td><input type="file" name="photo"></td></tr>
         <tr><td>title:</td><td><input type="text" name="title"> (optional)</td></tr>
         <tr><td>description:</td><td><input type="text" name="description"> (optional)</td></tr>
         <tr><td>tags:</td><td><input type="text" name="tags"> (optional)</td></tr>
         <tr><td>is_public:</td><td><input type="text" name="is_public"> (optional 1 or 0)</td></tr>
         <tr><td>is_friend:</td><td><input type="text" name="is_friend"> (optional 1 or 0)</td></tr>
      
         <tr><td>is_family:</td><td><input type="text" name="is_family"> (optional 1 or 0)</td></tr>
         <tr><td>&nbsp;</td><td><input type="checkbox" name="async" value="1"> Async Mode</td></tr>
         <tr><td>&nbsp;</td><td><input type="submit" value="post it"></td></tr>
      </table>
      
   </form>
<cfelse>
   <cftry>
      <cfhttp url="http://www.flickr.com/tools/uploader_go.gne" method="post">
         <cfhttpparam name="email" value="#flickrEmail#" type="formfield" />
         <cfhttpparam name="password" value="#flickrPassword" type="formfield" />
         <cfhttpparam name="photo" file="#form.photo#" type="file" />
         <cfhttpparam name="title" value="#form.title#" type="formfield" />
         <cfhttpparam name="description" value="description" type="formfield" />
         <cfhttpparam name="tags" value="#form.tags#" type="formfield" />
         <cfhttpparam name="is_public" value="#form.is_public#" type="formfield" />
         <cfhttpparam name="is_friend" value="#form.is_friend#" type="formfield" />
         <cfhttpparam name="is_family" value="#is_family#" type="formfield" />
      </cfhttp>
      <!--- The returned XML --->
      <cfdump var="#xmlParse(cfhttp.FileContent)#" />
      <cfcatch>
         <!--- If there was a problem --->
         <cfdump var="#cfcatch#" />
      </cfcatch>
   </cftry>
</cfif>

Comments Comments (1) | Print Print | Send Send | 4666 Views

BlogCFC, Flickr and HTML image upload

Well it looks like people are slowly migrating to some small CF conference but honestly there is no bitterness about me being in the UK :o) Anyway i've been working with Flickr recently and thinking about integrating it with BlogCFC. The question is how??
  1. A separate pod were you simply upload images and it displays them on the side (personally i don't like this)
  2. The ability to add the photo when you add a new post i.e. add a few extra fields to the editor.cfm form which when you submit appends the image and href to the bottom of the post.
  3. Using your Flickr RSS feed at the bottom of the entry form add a drop down where you select the image you want to add into the post and again the image and href to the bottom of the post.

There's probably more ways but I haven't had much experience with other blog software to see how they deal with such integration.

How do you think they should be tied together?

I'll be post the Flickr code i've been playing around in a couple of extra posts.

Comments Comments (0) | Print Print | Send Send | 2186 Views

BlogCFC by Raymond Camden + Twitter @AndyJ + ColdFusion jobs + Contact Me + Snippets/Downloads + RSS .