New BlogEngine.NET Extension - SlideShow Photo Gallery

Update: New version posted 3/14/2008 - fixed bug related to titles over 5 characters, limit is now 128 characters.

I've wanted to build a BlogEngine.NET extension to display a photo gallery since I first starting using this product.  Vertigo has made my job easier with Slide.Show, a rich Silverlight application that provides an elegant and simple photo sharing user experience.  It also supports direct Flickr integration that I have included as a part of this extension.  All you have to do is change one configuration value in the configuration.xml and you are all set to hook into your Flickr account.

A live demo can be found at http://dannydouglass.com/page/photogallery.aspx.  My website offers a popup version of this gallery (click the "photos" tab above) that I would be glad to explain in a follow-up post if there is any interest. [Requires Silverlight 1.0]

The "slideshow/configuration.xml" file contains all of the settings used to display the player skins as well.  You can find more information on skinning options at the Slide.Show CodePlex Project.

BlogEngine.NET Extension Installation Steps

  1. Download Silverlight 1.0 at http://www.microsoft.com/silverlight/install.aspx
  2. Copy the file "SlideShow.cs" into your project's "App_Code/Extensions" directory
  3. Edit the "slideshow/configuration.xml" file and replace ##USERNAME## with your Flickr username.
  4. Copy the "slideshow" directory into the root of your website project
  5. Create a new page and enter it's name in the extension settings - this is where your photo gallery will display.

Album View
imgSlideShowAlbumView

Image View
imgSlideShowPictureView 

Download SlideShow.zip (38.02 kb)

[dnk:http://dannydouglass.com/post/2008/02/New-BlogEngine-Extension-SlideShow-Photo-Gallery.aspx]

$DNK$

  • Permanent link to this post Permalink 
  • Share this post! Share It! 
  • View this post's comments Comments (36) 
  • RSS Feed for this post's comments Comment RSS
  •    


Comments

Posted on 02.11.2008 13:08 PM #

Luke Foust

Luke Foust us
Nice plugin! I did, however, make one change to how you determine whether or not to display the gallery. The way you were doing it did not allow spaces in the name of the page I wanted to include my gallery on. I wanted to display "Photo Gallery" instead of "PhotoGallery" so I changed the check of the page title from:
if( page.Title.ToLower() == settings.GetSingleValue( "pagename" ).ToLower().Trim() )

to

if(page.Title.Equals(settings.GetSingleValue("pagename"), StringComparison.CurrentCultureIgnoreCase))

This seemed to fix it for me.

Posted on 02.11.2008 16:08 PM #

Danny

Danny us
Thanks Luke - I'll make that change to allow for spaces...

I'm guessing it was comparing "Photo Gallery" to "Photo%20Gallery", which is why it was failing.

Posted on 02.11.2008 16:46 PM #

Danny

Danny us
Updated: Fixed Issue for Page Titles that contains spaces

Posted on 02.15.2008 03:28 AM #

helloshp

helloshp cn
nice

Posted on 02.17.2008 08:11 AM #

Dan Atkinson

Dan Atkinson gb
Hi there!

Sadly, when I open this in my version of Firefox (2.0.0.12), I get just a black screen. I can confirm that Silverlight is both installed and working correctgly, as evidenced by other Silverlight sites.

Just thought I'd let you know this anyhoo!

Posted on 02.18.2008 09:41 AM #

Euo

Euo us
Nice. I am looking forward, though, to allow a visitor to enter comments on photo. Smile

Posted on 02.18.2008 09:42 AM #

Victor

Victor us
Hi,

I have a problem with setting up the page name in the extension setting page. seems like the page name can't go any longer than 5 letters (like photo) is that right, or i didn't setting it up correctly?

Posted on 02.18.2008 20:24 PM #

Danny

Danny us
@Dan,
I'm not 100% sure why it is not showing up in that version of Firefox. I'm using Firefox 3 Beta 3 (which isn't supported by Silverlight) on all my computers so I can not test that at this moment. I'll try to figure that out soon. Thanks for letting me know though.

@Victor,
I'm not sure why you are having an issue with the page title. I have mine set to "photogallery" at http://dannydouglass.com/page/photogallery.aspx and you can see that works. Have you downloaded the latest release? That's fixed issues with spaces in the title.

Posted on 02.26.2008 19:21 PM #

Scott

Scott us
So I do have a question, Does it work without flickr? And how do we set it up not to use flickr?

Posted on 02.26.2008 19:23 PM #

Danny

Danny us
@Scott,
It does work without Flickr, but you will have to customize the extension. Take a look at the documentation found at the CodePlex project site - http://www.codeplex.com/SlideShow.

Posted on 03.6.2008 19:42 PM #

Paul

Paul
Dan:

Having the same issue as Victor. The page name field only accepts 5 characters. Both IE7 and Firefox 2 on Vista exhibit this behavior.

Posted on 03.6.2008 20:23 PM #

Scott

Scott us
Paul,

I know I am not Dan but You can fix this problem easy squeazy. Go to line 30 of the Slideshow.cs. At that line, you will see a 5 on that line. change that 5 to a ten or whatever you feel should fit and there you have it. its fixed.

Posted on 03.12.2008 08:03 AM #

Jim

Jim us
Dan, thanks for sharing this by the way. Does one have to use Flickr to use this extension? Or can I just have a bunch of images in folders on my own server and show them that way?

Posted on 03.12.2008 11:33 AM #

Danny

Danny us
@Jim,
Check out this comment - www.dannydouglass.com/.../...ow-Photo-Gallery.aspx

That should answer your question! =]

Posted on 03.12.2008 13:59 PM #

Jim

Jim us
Danny,

Thanks for the quick reply. Sorry I missed that post. I did find another project at CodeProject that will generate the data.xml via a web service, but it lacks the Slide Title and Description.

http://www.codeplex.com/SSDirDataProvWS

Posted on 03.14.2008 12:27 PM #

skhan

skhan pk
Hi,
I don't know what I'm missing. I can't see the slide show working. Does it only work in production environment ? (I don't think so, btw).

Could you please point out any reasons why I can't see anything on the page ?

Posted on 03.14.2008 14:21 PM #

Danny

Danny us
@skhan,
Try downloading the code again, I fixed a bug related to the page title. Previously it was limited to 5 characters for some crazy reason.

Posted on 03.14.2008 16:39 PM #

skhan

skhan pk
Its working now Smile
But it seems you have changed something else too because this time it worked so smooth!
I followed what Mr.Scott said and it started allowing me to have a filename bigger than 5 chars. But it didn't work.
Anyways, good thing is that its finally working for me.
Thanks Mr.Danny Smile

Posted on 03.17.2008 14:48 PM #

Ali

Ali
Hi,
I'm trying slideshow photo gallery configuration my local host. but i dont image see in the slideshow photo gallery(no photo display). i dont understand my fault. i need data.xml?

Posted on 03.20.2008 17:45 PM #

Martin Bowling

Martin Bowling us
I am testing this is out, I can get it to work with the username="DannyDouglassPhotos" but when I put one of my user names I get no photos. Any idea why this would be happening?

Posted on 03.21.2008 10:39 AM #

Danny

Danny us
@Martin,
You have to allow access in Flickr in order to connect to your photos. That could be your problem.

Posted on 03.26.2008 12:59 PM #

test examen

test examen es

Fantastic! It's similar to a gallery for joomla that i installed some months ago.

Posted on 04.11.2008 15:08 PM #

PRadeep

PRadeep in
Hello Danny,

It seems to be a very nice pulgin. I have just downloaded the BlogEngine and decided to try out ur plugin.Can you please be more elaborate on the last step?
"Create a new page and enter it's name in the extension settings - this is where your photo gallery will display. "

Posted on 04.13.2008 09:50 AM #

Danny

Danny us
@PRadeep,
For example, if you create a page named "Photo Gallery", then you will need to go to the "Extension" tab in your administration area, choose the "Edit" link for my extension, and then enter the value "Photo Gallery" in the "Page Name" textbox. That will tell the extension where to output your gallery! =]

Posted on 04.18.2008 08:06 AM #

Eren

Eren tr
How i can make my flickr account accesible

Posted on 04.18.2008 23:19 PM #

Danny

Danny us
@Eren,
You will need to apply for a Flickr API key here - www.flickr.com/services/api/misc.api_keys.html.

Posted on 04.19.2008 12:49 PM #

PRadeep

PRadeep in
Thanks Danny!! it works

Posted on 04.24.2008 10:08 AM #

Dong

Dong vn
HI,
I like this Extension....
But I don't known how can I run many Flickr username in one slide SmileSmile...
hì hì .....

Posted on 04.24.2008 13:16 PM #

Danny

Danny us
@Dong - Unfortunately this is not possible with Slide.Show since the tool ties to one particular username.

Posted on 04.25.2008 09:59 AM #

Nebbercracker

Nebbercracker us
Danny,

Pretty neat! Thanks very much. I dropped it in and started using it without even applying for a Flickr API Key. One problem though, I can't seem to figure out where I can go to read how to configure background colors etc. I managed to get away with a few things that were obvious in the configuration file, but . . . help please.

Nebbercracker

Posted on 05.2.2008 14:14 PM #

Nebbercracker

Nebbercracker us
Nevermind, I figured it out (Slideshow.js).

Posted on 06.25.2008 10:15 AM #

Paul Podlipensky

Paul Podlipensky ua
I've registered on yahoo and have activated my flickr account. So I use my yahoo name and password to access to the flickr. What should I pass into config file? myname@yahoo.com and password? If so, I don't see any pictures from my flickr. Can you help me with it?

Posted on 06.25.2008 21:16 PM #

Kelly

Kelly us
Same... problems with it. I followed the directions and I get an error. 'Slideshow' undefined line 105.

Instead of using Utils.RelativeWebRoot, you should probably use Utils.AbsoluteWebRoot. It should also be included on the Javascript files and the configuration.xml link. I am just guessing though. This would be Utils.RelativeWebRoot will generate http://[site name]/blog if it is in a lower level. Utils.AbsoluteWebRoot will just gen http://[site name]/

I did this but it still does not work... same error.

Posted on 06.26.2008 03:16 AM #

Paul Podlipensky

Paul Podlipensky ua
So what is the solution?

Posted on 06.26.2008 10:33 AM #

Danny

Danny us
@Paul - your yahoo name has nothing to do with these settings. You will want your Flickr username, which you can find out using this handy website - http://idgettr.com/.

Posted on 06.30.2008 16:38 PM #

MarkG

MarkG us
For people new to BlogEngine.NET and setting this up with a new Flickr account, be sure to save your uploaded photos to a Set. As usual, I played Rambo and uploaded a couple of photos, slapped in the extension, and couldn't figure out why nothing displayed. Soon as I saved the uploaded photos into a Flickr Set -- boom they showed up in my photo album page within BlogEngine.NET. Nice extension!

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Posted on 07.4.2008 15:27 PM #


search


AddThis Feed Button

blog categories

blog tags

my pictures

Flickr Gallery Coming Soon!

recent comments   RSS Feed for this post's comments