Currently, the RSS feed will only take you to the thumbnail view of the photos. I understand the reasoning behind this due to the different display modes, but in my case I'm just using the standard mode, so I wanted the rss link to take me directly to the photo instead of the thumbnail list. Below are the code changes that I made to accomplish this.
It would be cool if this was added into a module setting or something of that nature, that is if you find it to be useful. Let me know what you think.
Here is a sample of the updated Rss - http://www.estesfam.net/DesktopModules/SimpleGallery/Rss.aspx?t=375&m=770&tm=500&MaxCount=10&portalid=15
Rss.aspx.vb line 156
For Each objPhoto As PhotoInfo In objPagedDataSource
'*************************************** Dim slideshowURL As String slideshowURL = "mid=" & objPhoto.ModuleID & "&ctl=SlideShow&itemID=" & objPhoto.PhotoID '***************************************
writer.WriteStartElement("item") writer.WriteElementString("title", objPhoto.Name)
If (_albumID = Null.NullInteger) Then writer.WriteElementString("link", NavigateURL(_tabID, "", slideshowURL)) Else writer.WriteElementString("link", NavigateURL(_tabID, "", "AlbumID=" & _moduleID.ToString() & "-" & _albumID, slideshowURL)) End If
writer.WriteElementString("linkThumbnail", "http://" & System.Web.HttpContext.Current.Request.Url.Host & Me.ResolveUrl("ImageHandler.ashx?width=" & GetPhotoWidth(CType(objPhoto, Object)) & "&height=" & GetPhotoHeight(CType(objPhoto, Object)) & "&HomeDirectory=" & Server.UrlEncode(Me.ResolveUrl("~/Portals/" & objModule.PortalID.ToString & "/") & objPhoto.HomeDirectory) & "&fileName=" & Server.UrlEncode(objPhoto.FileName) & "&portalid=" & objModule.PortalID.ToString)) writer.WriteElementString("dc:creator", objPhoto.AuthorUserName) writer.WriteElementString("description", objPhoto.Description) writer.WriteElementString("pubDate", objPhoto.DateApproved.ToString("r")) writer.WriteEndElement()
Next
|