Skip to main content

Base gallery product for plone with picasa and flickr support by Makina Corpus

Project description

Notes: gdata 2.0.10 doesn’t work properly: http://code.google.com/p/gdata-python-client/issues/detail?id=367#c1 please pin the version to 2.0.9

Introduction

This add-on is gallery add-on for Plone.

It is tested with Plone 4 but it is also used with Plone 3.

This add-on is split in two parts: the UI and components

The goals are:

  • Have a simple to customize gallery add-on for plone (non intrusive).

  • Use very ligth weight resources

  • Don’t embed display configuration inside data

User Interface

The user interface has been designed to be easy to customize. Files are located in the skin directory (easy to customize):

  • gallery.html.pt: Zope Page Template to render the html code

  • gallery.css: pure css design to display 400*400 photos

  • gallery.html.pt.metadata: to set the title of the page in display drop down menu

  • gallery.js: the javascript integration of galleriffic.

  • gallery_tooltip.png: the tooltip used to display the title/description of the photo

The user interface has many feature:

  • resize photo if too big by setting the width or height

  • paginate thumbs for navigation (5 by default)

  • opacity on mouse rollover thumbs

  • play / pause (autostart by default)

  • display more than 300 photos without any performance issue

  • display title and description throw a smart jquerytool tooltip

There are also two portets, which can be used:

  • “Show Galleries” portlet to display random photos from random galleries.

  • An itemview portlet to display specific photos.

Components (Backend)

Summary:

  • No custom content type, only views

  • Works with lots of photos (is developed to work with +300 photos)

  • Ramcache setup with a default key to one hours + modification date

  • Works with Folder, Topic and Link content types

  • picasaweb and flickr support.

  • facebook support.

  • I18N: english, french, german and italian are available

collective.gallery use zope.components to provide as much reusable as possible components.

First we have photo resources. Plone already manage this for you:

  • Folder and Large Plone Folder can contains Image

  • Topic can be criterized to list only Image

  • Link can be sources of photos throw picasaweb.google.com and flickr.com services.

Next you have the business component: IGallery. This interface is implemented at two levels:

  • As named adapter over IATLink to get photos from picasaweb or flickr.

  • As browserview to control the resource (@@gallery)

Folder & Image

Folder and Image content type can be used to build a gallery. Add a folder and then add every images in it. Once its done come up to the folder and choose ‘Gallery view’ in the display drop down menu and voila.

The folder gallery component query the portal_catalog and adapts brains to IPhoto.

Topic & Image

Topic can be used to build a gallery. Add a topic and add criteria on the Type to select only Image. Next choose the ‘Gallery view’ in the drop down menu and voila.

The topic gallery component use the topic’s queryCatalog method to get brains, then they are adapted to IPhoto

Galleriffic

  • Smart image preloading after the page is loaded

  • Thumbnail navigation (with pagination)

  • jQuery.history plugin integration to support bookmark-friendly URLs per-image

  • Slideshow (with optional auto-updating url bookmarks)

  • Keyboard navigation

  • Events that allow for adding your own custom transition effects

  • API for controlling the gallery with custom controls

  • Support for image captions

  • Flexible configuration

  • Graceful degradation when javascript is not available

  • Support for multiple galleries per page

Integrators

Because it is easy to customize, lets write some lines about how to fit gallery to your needs.

Some advices:

be fixed width. Photo are fixed, you want your gallery to be nice, lets fixed its width.

You can configure in properties the max photo size you want but backends may not support this settings.

Most of galleries do not contains every photos in the same size or in the same proportions. Take care of this when you are customizing javascript and css.

All controllers can be placed where ever you want because they are accessed by #id

Gallery is not configurable because it needs to generate javascript and css. It would make the add-on too much complex to customize. If you want configuration take a look at plonetruegallery

To register the “Show Galleries” portlet, you can add the following xml snippet to your portlets.xml Generic Setup file::

 <assignment
   name="gallery-portlet"
   category="context"
   key="/"
   manager="plone.rightcolumn"
   type="collective.gallery.show_galleries"
   visible="True">
   <property name="search_portal">True</property>
   <property name="num_pictures">1</property>
   <property name="image_size">mini</property>
</assignment>

You want more ?

The picasaweb and flickr services let you embed a flash slideshow to display your photos. Views are already available to use those services:

  • @@gallery-picasaweb-slideshow

  • @@gallery-flickr-slideshow

But they are not integrated in the Plone UI.

References

This add-on is use in production here and there:

Credits

Companies

makinacom

Authors

Contributors

Changelog

1.1 (2012-01-03)

  • add Italian translation [giacomos]

  • add new classifiers

  • Fix http://plone.org/products/collective.gallery/issues/3 Flikr links on author (/photos/author) don’t display

  • Add https support on facebook link

  • fix uninstall profile to remove component from persistent registry

1.0 (2011-11-13)

  • No change from b7

1.0b7 (2011-09-23)

  • Fix picasaweb url parser bug with authkey [toutpt]

  • update zcml import from Zope2.App [toutpt]

  • update facebook support (remove the need of BeautifulSoup, we now use json) [toutpt]

1.0b6 (2011-06-29)

  • Updating schema of gallery portlet. [thet]

  • Add itemview gallery portlet [toutpt]

  • Add gallery portlet. [thet]

  • Add transifex configuration [toutpt]

  • Add support for News Item [toutpt]

  • Fix https picasaweb url doesn’t work [toutpt]

1.0b5 (2011-01-06)

  • fix fast navigation bug (where imgs where added one upon the other) -> Need to position images in absolute [sylvainb toutpt]

  • German translation. [thet]

  • add a browser layer and register adapters in plone componentregistry

  • fix plone3 compatibility

  • add jquerytool tooltip to display title and description of each photo

  • cleanup interfaces

  • add upgrade from previous releases

  • make gallery.js exit if no #gallerythumbs

  • add metadata file to set title of gallery.html page

  • fix facebook backend. Now it works with BeautifulSoup if installed (zcml condition)

  • fix tests

  • update translations

  • remove dependency on paste. [thet]

  • add dependency on galleriffic. remove dependency on pikachoose

  • add id on photo api

  • improve galleriffic integration [toutpt jchambard]

  • add gallery.html view based on collective.js.galleriffic. add support for non well sized photo (if the backend doesn’t support sizes.)

1.0b4 (2010-10-25)

  • Remove Large Plone Folder from default profile. Now install well on plone4

  • Move galleriffic integration into skin directory.

  • BrowserView are now used has controller: template is replaced by allowed_interface

  • Switch back galleriffic plone integration to example1

1.0b3 (2010-05-31)

  • Fix a KeyError on exif data with folder implementation (topic and folder)

1.0b2 (2010-05-26)

  • Add uninstall profile + Extensions/Install script to be used by quickinstaller

  • Move templates in browser/templates folder

  • Move javascript resources in browser/resources folder

  • Add ‘en’ locale

  • Add z3c.autoinclude target plone in entry points

1.0b1 - (2010/05/21)

  • remove harlequin and z3cform integration (too soon)

  • rename IImage to IPhoto and imgs() to photos()

  • Add rebuild i18n script as usual

  • Use collective.testcaselayer for tests

  • Add interfaces IImage and IExif on results returned by every services

  • Use jquery.galleriffic jquery plugin (example 1)

  • Add flickr support [toupt]

  • Add cache support with plone.memoize.ram

  • Add picasa private album support on both slideshow and link browserview

  • Add tests on picasa components

0.1.1 - 2009/12/29

  • Add picasa slideshow flash gallery view on link content type

  • Add integration tests

0.1 - 2009/12/28

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.gallery-1.1.tar.gz (51.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page