Topics: Controls
Jan 11, 2011 at 12:37 PM
Edited Jan 11, 2011 at 12:38 PM


How to use LightBox for all images on v2 ? (when I install the original LB extention I have a crash...)

Jan 12, 2011 at 1:55 AM

First try disabling the extension SyntaxHighlighter.  It injects a ton of scripts and it is enabled by default.  This worked for me but I was not using the lightbox extension but one that was simular.   I think this alone might take care of it.

the other thing to check is the extension "namespace".   Look at the file appcode/lightbox.cs.  Add the line

using BlogEngine.Core.Web.Extensions;

You can read more about this at:  Look at the FAQ section.


Hope this helps.

Jan 12, 2011 at 2:39 AM

I can confirm that guynethery's suggestion about the namespace worked. Fixed my issue with the extension.

Jan 12, 2011 at 12:19 PM

Good, it's works !


Thanks !

Jan 12, 2011 at 1:43 PM

LB work fin in posts, but not in pages ? Any idea ?

Jan 12, 2011 at 2:01 PM

Are you using the Lightbox extension available from here:

If so, was it working in pages before you upgraded to 2.0. ( I am assuming that you used it in a previous version)  Did it work in pages previously?

Looking at the comments form the link above there was a known issues with it in pages.  Look at the next to last comment for the fix.

Here is the just of it:

November 3. 2008 17:10


I checked a few other extensions, found a work-around for pages:

In file lightbox.cs, replace the Post.Serving... line in public Lightbox() construct with this line:

BlogEngine.Core.Page.Serving += new EventHandler<ServingEventArgs>(Post_Serving); //For Pages

Found the clue at:


I am not sure that this is a solid fix or not.


I use colorbox for my photos and videos.  You can see it at


If you give me a couple of days I can write a simple extension that you could use.  I just installed it and then put the required code in the head of the document in Settings.

Jan 12, 2011 at 2:13 PM

Also you could use the below for you photos as well.

The nice thing about colorbox is that is works for videos as well.

Jan 12, 2011 at 2:40 PM
Edited Jan 12, 2011 at 7:57 PM

Thanks for you support !

This modification is OK.

But, Colorbox is nice ! I wait your extention !

PS : not replace the line, just add th new ligne to have LB on post and pages...

Jan 14, 2011 at 6:19 PM

I'd be interested in a colorbox extension as well...

I'll keep an eye out on the thready.  Thanks for the good info!

Jan 14, 2011 at 7:52 PM

I just grabbed JS file from this lightbox extension and dropped it into /scripts folder in BlogEngine 2.0. That's all to it - add image inside anchor tag with rel="lightbox" and it works like a charm in both posts and pages. You don't need extension (lightbox.cs file) itself, only javascript. All extension does is injecting JS into post header. In 2.0, you can just drop script into /scripts folder and BE will do it for you.

It doesn't have nice smooth transition affect as some other pop ups, but it is as light and fast as it gets which isn't bad.

Jan 14, 2011 at 8:38 PM

Would that be true for CSS files as well.  Just drop them into the Styles folder? 

Jan 14, 2011 at 8:42 PM

That's slick!!! Will that work for any script?

Jan 14, 2011 at 8:50 PM

Yes, any script in /scripts will be wired up. Not is sub-directories though, it got to be in script directory itself.

CSS will be added to header as well, just keep in mind it will be "global" - visible to all themes. You might want to add CSS to your theme folder most of the time.

Jan 3, 2013 at 11:16 PM

is there any ready extension like colorbox that i can implement in my BlogEngine.NET  please help me out with this i need to have any lightbox way to view my pictures and all the extensions out there fail for me and i get error with all of them