Embedding Ansel galleries with javascript

Ansel now has support for javascript "widgets" to enable embedding galleries on external sites or blogs.

Tags: horde, php, ansel

Ansel now has support for displaying a gallery as a "widget" within things like blog posts or portals.  All that is needed is the ability to include javascript in your editor.  For example, the following images were embedded in this post with code like the following included directly in the post:

<script type="text/javascript" src="path/to/ansel/jsapi.php?gallery=
{gallery id or slug}&container=anseldiv1"></script>
<div id="anseldiv1"></div>

There are also a number of options available for passing to the widget. For example, you can add a start and count parameter to determine how many images to include, and which one to start counting at.  You can also select to use the mini thumbnails (the default), the larger thumbnails or even the 'pretty' thumbnails that Ansel can display by setting the thumbsize parameter to thumb or prettythumb.

For an example of what this would look like on a Blogger site, take a look at my Blogger sandbox

Like all new features, there is still some work to be done, and a number of different 'views' will be available such as a small slideshow and an image carousel.

Stay tuned!

Read: 92 times | Permalink | Share This Story
Add a comment
* From
* Subject
* Message

Michael Joseph Rubinsky

Mike This is me. A 37-something husband of 13 years and the father of a 3 year old. Wow. Where did the time go?
View my All About Me page
Tag Cloud
Recently
RSS FeedSubscribe to this blog
Links and Other Pages