<% On Error Resume Next '------ Global Variables: Dim iPICSPERPAGE Dim iPAGE Dim sDEFAULTSET Dim sPHOTOSET Dim sPAGE Dim sPHOTOSET_TOTALPAGES Dim sPHOTOSET_TITLE Dim sPHOTOSET_DESCRIPTION '------ Global Settings: iPICSPERPAGE = 6 sDEFAULTSET = "72157605258728697" '------ Process Query String: sPHOTOSET = Request("set") if sPHOTOSET = "" then sPHOTOSET = sDEFAULTSET sPAGE = Request("page") if sPAGE = "" then iPAGE = 1 else iPAGE = CInt(sPAGE) end If if Request("per") <> "" then iPICSPERPAGE = CInt(Request("per")) end if '------ Read XML From Flickr '------------------------------------------------------------ '------------------------------------------------------------ '------ Get Photoset Properties: '------------ This will return photoset name and description. '------------ This is only called on the 1st page to save lookup time on subsequent as '------------ as the description is only on page 1 and we will pass the title along in query string. Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlHttp.Open "GET", "http://www.flickr.com/services/rest/?method=flickr.photosets.getInfo&api_key=471cca2567766626f423f265c4aa97cf&photoset_id=" & sPHOTOSET, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = False xmlDOM.validateOnParse = False xmlDom.resolveExternals = False If not xmlDOM.LoadXml(RSSXML) Then ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage End If Set xmlHttp = Nothing ' clear HTTP object Set Node = xmlDom.documentElement.selectSingleNode("//photoset/title") sPHOTOSET_TITLE = Node.text Set Node = xmlDom.documentElement.selectSingleNode("//photoset/description") sPHOTOSET_DESCRIPTION = Node.text '------ Get Photoset Photos: '------------ This will return each of the photos within the set. '------------ In addition, it will return the number of photos and the pictures for set (based on the current page) sPHOTOSET_TOTALPAGES = "" While sPHOTOSET_TOTALPAGES = "" Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlHttp.Open "GET", "http://www.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=471cca2567766626f423f265c4aa97cf&user_id=24945361@N04&photoset_id=" & sPHOTOSET & "&per_page=" & iPICSPERPAGE & "&page=" & iPAGE, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = False xmlDOM.validateOnParse = False xmlDom.resolveExternals = False If not xmlDOM.LoadXml(RSSXML) Then ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage End If Set xmlHttp = Nothing ' clear HTTP object Set Node = xmlDom.documentElement.selectSingleNode("//photoset") sPHOTOSET_TOTALPAGES = Node.GetAttribute("pages") WEnd If sPHOTOSET_TOTALPAGES = "" Then Response.Write "We are having trouble loading these pictures. Please try again." Response.End End If Set NodeList = xmlDom.documentElement.selectNodes("//photoset/photo") sPicLeft = "" sPicRight = "" sDesc = "" '------ Output HTML Response.Write "
" '------ Add Header Response.Write "" '------ Add Photos For Each Node In NodeList sTitle = Node.GetAttribute("title") sID = Node.GetAttribute("id") sServer = Node.GetAttribute("server") sSecret = Node.GetAttribute("secret") sFarm = Node.GetAttribute("farm") aPicData = Split(GetPicData(sID, sServer, sFarm, sSecret), "|") sSmallURL = aPicData(0) sLargeURL = aPicData(1) sDescription = aPicData(2) fVideo = aPicData(3) ' Special Cases Here Select Case sDescription Case "Smita_dance_link" sDescription = "


This is the video of our Bollywood dance, choreographed by the talented and beautiful bride!" End Select sDesc = "" & sTitle & "" If sDescription <> "" Then sDesc = sDesc & " - " & sDescription End If If fVideo Then Response.Write "" Else Response.Write "" End If Next Response.Write "
" & sPHOTOSET_TITLE & "

" If (iPAGE = 1) Then Response.Write sPHOTOSET_DESCRIPTION & "

" End If Response.Write "
" & sSmallURL & "
" & sDesc & "

" & "
" & sDesc & "

" if iPAGE > 1 Then Response.Write " <<" & " " End If Response.Write " Page " if iPAGE < Int(sPHOTOSET_TOTALPAGES) Then Response.Write " >>" & " " End If Response.Write "
Pages: " For iCounter = 1 To Int(sPHOTOSET_TOTALPAGES) if iPAGE = iCounter Then Response.Write iCounter & " " else Response.Write "" & iCounter & " " end if Next %>

Photos - 2008/2007 - 2006 - 2005 - 2004 - 2003 - 2002 - 2001 - 2000

Home | About Us | Photos | News | Links | Guestbook

Email: DeeDee@DeeDee.com
<% ' Function GetPicData ' ' This call will do an additional lookup to get additional information on the picture (ie, Description). ' In addition, it will generate the proper links to the images based upon the parameters. ' ' Parameters: ' sID: ID of picture ' sServer: ServerName that picture is hosted on. ' sFarm: ServerFarm that picture is hosted on. ' sSecret: Secret Code for picture ' ' Function GetPicData(sID, sServer, sFarm, sSecret) On Error Resume Next sOriginalSecret = "" While sOriginalSecret = "" Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlHttp.Open "GET", "http://www.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=471cca2567766626f423f265c4aa97cf&photo_id=" & sID, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = False xmlDOM.validateOnParse = False xmlDom.resolveExternals = False If not xmlDOM.LoadXml(RSSXML) Then ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage End If Set xmlHttp = Nothing ' clear HTTP object Set Node = xmlDom.documentElement.selectSingleNode("//photo/description") sDescription = Node.text Set Node = xmlDom.documentElement.selectSingleNode("//photo") sType = Node.GetAttribute("media") sOriginalSecret = Node.GetAttribute("originalsecret") WEnd ' Build | Deliminated List: Small_URL, Large_URL, DESC, VIDEO if sType <> "video" then GetPicData = "http://farm" & sFarm & ".static.flickr.com/" & sServer & "/" & sID & "_" & sSecret & ".jpg" &_ "|" &_ "http://farm" & sFarm & ".static.flickr.com/" & sServer & "/" & sID & "_" & sOriginalSecret & "_o.jpg" &_ "|" &_ sDescription &_ "|False" else GetPicData = GetEmbeddedURL(sID) &_ "|" &_ GetEmbeddedURL(sID) &_ "|" &_ sDescription &_ "|True" end if End Function ' Function GetEmbeddedURL ' ' This call will format a pictureID into the proper HTML source code ' to embed a video into a page. ' ' Parameters: ' picid: ID of picture ' ' Function GetEmbeddedURL (picid) GetEmbeddedURL = "" &_ "" &_ "" &_ "" &_ "" &_ "" &_ "" End Function %>