BlogEngine.Net Gallery User Control - Version 1.0 Released

February 5, 2008 01:24 by ptumelty
As promised, here is the first release of the BlogEngine.Net Gallery User Control.

The aim of this User Control is to make it simpler to display a folder of images in a blog post or page. Instead of having to manually insert an image for each image in the directory, simply add a reference to the Gallery User Control, and point it to the Url containing the images. The User Control will then automatically build a table of images and display on the screen.

The first time a Url is scanned for images, a small thumbnail of each image will be created and saved to disk. This may take a few seconds on the first page load, but subsequent load times will be much quicker.

The Gallery User Control makes use of the BlogEngine.Net Lightbox extension (if installed) to provide a nice popup view of the full image.

Full installation and customisation instructions, please check Gallery.ascx.cs in the .zip file

This has all been thrown together rather quickly so apologies for any bugs. 

Please send any feedback/bug reports to me and I will try and correct asap.

Thanks, Paul. 

Gallery1.0.zip (3.18 kb)

Demo: http://www.tumelty.com/blog/post/2005/03/Wedding-Photographs.aspx 

 

UPDATE:

I'm currently working on the next version of the gallery control and hope to add several more features as requested by users.

Over 100 people have currently downloaded the control which is great. If you have any ideas of what you would like to see, let me know and I'll do my best to get it implemented. 



Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 3.5 by 2 people

  • Currently 3.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

February 5. 2008 03:14

ck

Images are very slow to download (and I'm on a high speed connection), this is because you are using the full iamge to show the thumbnail. You really have one other option here in .net, and that is to load the image into memory and then spit out the thumbnail sized image to the user. Puts some work on the server... but that is that fix. The other option would be to have the user load the images into a writable directory and then kick off a process that creates the thumbnails once... for use all the time.

Not bad for what it is, but does make the user experience pretty slow.

ck

February 5. 2008 09:21

ptumelty

Hi CK, apologies for the slow load time. The User Control can operate in one of two modes. By default, thumbnails are created the first time the image is accessed. This can result in a slightly longer load time (depending on how many pictures, and the size of them) for the initial page load. Subsequent page loads will then use the thumbnail images.

What happened here, is that the last test I did before uploading the code was to make sure my GenerateThumbnails parameter was working. When this is set to false, no thumbnails are created and instead, they are done straight from the image files.

Unfortunately, I left the demo page in this mode which is what caused the slowness for you. This mode is really only intended as a fallback for when the users do not have write permissions on the server. I've also updated the size of the generated thumbnail to make sure download times are quicker. Each thumbnail should now be around 15-20kb max. I've updated the demo page to work off the thumbnails.

ptumelty

February 5. 2008 13:53

herman

Hi
Very nice job. I was looking for such control for long time now. BE developers simply ignore the request by community to add this feature to Blog but you did it. Thanks
Adding image comments and image rating will make it the best control I have every download.

herman

February 18. 2008 16:03

Matt

www.betaparticle.com/post.aspx

Version with autothumbnailing without writing to the server. I just use an aspx page that takes an img path and then autothumbnails it.

Matt

February 18. 2008 16:24

ptumelty

Hi Matt,

There is already a GenerateThumbnails=false property which will supress thumbnails from being created.

Paul.

ptumelty

February 22. 2008 18:25

Tim

Hi

Is there an easy way to cope with multiple sets of thumbnails with the lightbox addin on the blog page

they all get combined together as in your ascx file you have "testing" set

so i guess away of having testing1, testing2 etc??

Tim

Tim

February 26. 2008 09:45

Pietro

Hi!!excuse my poor english...
You did a very good job!!thanks!
I' have a problem with ImageUrl property:
in the home page everything works fine but in the post detail the control can't find the images.
How i have to write the imageUrl?

Pietro

February 26. 2008 09:51

ptumelty

Hi Pietro, all you need to enter is the Base URL of the images. It sounds like you have this right if they are showing on the main screen.

If the images were stored at

http://www.tumelty.com/blog/gallery/1.jpg" rel="nofollow">http://www.tumelty.com/blog/gallery/1.jpg

you would enter

http://www.tumelty.com/blog/gallery/

Send me a link to your page and I'll have a look at the generated html and see if I can work out whats happening.

Paul.

ptumelty

February 26. 2008 09:54

ptumelty

Hi Tim,

In the next release of the control (hopefully some time this week time permitting) I will add this as a feature so you can pass the string in to the user control as a parameter.

I'm also adding a new feature which will enable "smarter" resizing of images in one of three different modes. Either by Percentage, To a fixed size with padding, or a cropped resize.

I'll post to the blog as soon as its ready.

ptumelty

March 16. 2008 04:11

Dave Morse

So, I download and install this app on my Windows HomeServer site. Fight with it - path to photos not gelling for me, getting errors and such. Got frustrated, and uninstalled.

Went to my son's Little League game, watched them lose the first game of the season.

Came home, and couldn't find any other album software I wanted to try, so I reinstalled the app, and messed with the path for a few minutes...

Whoo Hoo!!!! It works like a champ!

Thanks for the great software! Watch my blog for the upcoming trip to Washington D.C.

Dave Morse

April 7. 2008 15:48

JP

Actually, I just took a look at the ascx files and answered some of my own questions. Feel free to erase my lame comments if you want. Thanks again.

JP

April 15. 2008 15:33

Ben

Any thoughts to adding "Lightbox" extension support? Maybe even by adding support for René Kuss's "LightBox Extension" extension?

blog.data-worx.de/page/Extension-Lightbox.aspx

Otherwise, excellent work!

Ben

April 15. 2008 15:37

Ben

Man! I am an idiot. I completely overlooked your comment about lightbox support.... so scratch the first part of my last comment and add in another "Excellent Job!"

Thanks.

Ben

Ben

June 20. 2008 05:18

nekomitech.net

Pingback from nekomitech.net

Work in Progress

nekomitech.net

June 30. 2008 07:14

jimmy

I can't this to work at all, i keep getting
ERROR - UNABLE TO LOAD CONTROL : /blog/user controls/gallery.ascx ImageUrl=http://www.blogsite.dk/images;RepeatColumns=6

anyone have an idear

jimmy

July 1. 2008 21:11

Joshua

Do you know if storing your photos in the /App_Data/ folder would cause them to be displayed as broken image links? Right now, that's what they're doing. However, looking at the properties of the thumbnails and the links to the images everything is exactly what it's supposed to be.

Joshua

July 2. 2008 00:47

Joshua

Hello,

I really like the control that you've created and thank you for making it available.

One suggestion that I have is when you create a copy of the image, copy the title of the original image and carry it over to the thumbnail. Then when you display the thumbnails, you can use the title in the HTML and the Lightbox will use it as well when displaying the large version.

Joshua

July 11. 2008 23:04

Ryan

The download link appears dead. I tried integrating a flash gallery generated by Photoshop into a page on my site, but I apparently fail at that. This seems like just what I need. Is it still available?

Ryan

July 12. 2008 07:17

Ryan

Is this extension still available, download links seem to be broken.

Ryan

September 14. 2008 18:19

Bryan Avery

Great extension, well done

Bryan Avery

October 14. 2008 21:15

Jeremy

I am using the gallery user control on GoDaddy hosting. Unfortunately, all I ever see is the HTML/control markup in the post. It doesn't generate the table of thumbnails. I've used the control on other sites with no problems--any thoughts? Thanks in advance.

Jeremy

November 11. 2008 00:29

Brian's Blog

Trackback from Brian's Blog

BlogEngine Gallery Picture User Control

Brian's Blog

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading