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/xrequest.php.php?
requestType=Embed/gallery_id={gallery id}/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: 1445 times | Permalink |
Downloads
  • Command line utility written in PHP for updating IP addresses to a Enom compatible dynamic DNS service.
  • Horde theme based on colors from an Aeronautical VFR chart
  • Horde block for displaying data from servers running phpSystemInfo.



Links and Other Pages
  • An open sourc web application framework and collection of applications that I'm currently involved with.
  • In the interests of adding a more personal touch, this is my family website, with personal news, photos, and other goodies!

Search