Package: collective.plonetruegallery
collective.plonetruegallery DocumentationIntroductioncollective.plonetruegallery is a Plone add-on that implements a very
customizable and sophisticated gallery.Plone Version CompatibilityWorks with Plone 4.3 and earlier.
For not-yet-working Plone 5 support, see theplone5 branchandissue #66.How It Workscollective.plonetruegallery adds aGallery Viewto Folders and Collections.For any Folder or Collection containing or showing images, use the
Display toolbar menu and selectGallery View.Once that is done, aGallery Settingstoolbar menu is enabled for
the type. With this, you can customize the various settings for the
Gallery.Supported Display TypesTo install any of the various extra display types, you need to install
the dependent package in buildoutgalleria (included in default installation of collective.plonetruegallery)contact sheet (collective.ptg.contactsheet)thumbnail zoom gallery (collective.ptg.thumbnailzoom)presentation (collective.ptg.presentation)galleriffic (collective.ptg.galleriffic)highslide (collective.ptg.highslide)fancybox (collective.ptg.fancybox)pikachoose (collective.ptg.pikachoose)s3slider (collective.ptg.s3slider)nivo slider (collective.ptg.nivoslider)nivo gallery (collective.ptg.nivogallery)content flow (collective.ptg.contentflow)supersized (collective.ptg.supersized)Buildout configurationeggs =
  ...
  collective.plonetruegallery
  collective.ptg.highslide
  collective.ptg.fancybox
  collective.ptg.galleriffic
  collective.ptg.s3slider
  collective.ptg.pikachoose
  collective.ptg.nivoslider
  collective.ptg.nivogallery
  collective.ptg.contentflow
  collective.ptg.supersized
  collective.ptg.thumbnailzoom
  collective.ptg.contactsheet
  ...Installing all galleriesIf you want to install all available galleries, you could addeggs =
  ...
  collective.plonetruegallery
  collective.ptg.allnewest
  ...to buildout’s egg section.This will also install some galleries that are “under development”.FeaturesFlickr and Picasa Support!Dexterity “Lead Image behaviour” supportWorks with ‘Image’, ‘News Item’ and other content types that has a Image Field (provides IImageContent).Also works with redturtle.smartlink and collective.contentleadimage (installhttp://pypi.python.org/pypi/collective.ptg.contentleadimage)Customize gallery size, transition(limited transitions right now), timed and
other settingsCan use nested galleriessearching and category selection for nested galleriesGalleria, Galleriffic, Highslide JS, s3slider, Pikachoose and Fancybox display typesdisplay gallery inlineProducts.Collage integrationCompatible with new-style Plone collectionsProvides base settings configletFlickr and Picasa Web Album Supportto add support for these type of galleries you must install additional
packagesinstall collective.ptg.flickr for Flickr supportinstall collective.ptg.picasa for Picasa Web Album
Support(tested with 1.3.3 and 2.0.12)on Plone 3.x you must also manually install hashlib for picasa supportthese can just be added to your buildout or installed with easy_install
or you can add the package to your egg section likeDisplaying Gallery inlineA view (@@placegalleryview) can be used to place the gallery inside of
other content.Pop-up effectyou could do this:1) Install http://plone.org/products/collective.prettyphoto
2) Mark the link to the gallery with "prettyPhoto" style (which
   has now been added) from Kupu or TinyMCEInline GalleryFor showing a gallery in another page, try something like this:<object data="path/to/gallery/@@placegalleryview" height="400" width="500">
  <param name="data" value="path/to/gallery" />
</object>Notes for successful inline object tag usage:You will have to “whitelist” <object> and <param> in portal_transform safe-html.When editing in Plone 4.2 you will have to switch your editor to Kupu since TinyMCE fracks up the object tag into a flash item.If testing without Apache in front of your Plone you will need to make sure that the
“path/to/gallery” path from the example above includes any levels above the Plone object
in the Zope instance (eg. if your Plone object is inside of a folder named “version1”, and
the name of your gallery is “mygallery”, then the path should read “/version1/Plone/mygallery”.
Of course, you will need to remove the “/version1/Plone” part when you put Apache in front
of your Plone.Or you can do the same with an iframeRe-use gallery in page templateIf you want to place the gallery in another page template, you can re-use the entire HTML as-is:<tal:gallery tal:replace="structure context/fotos/@@placegalleryview" />This has the advantage, over <object> embedding, that a modal (pop-up) showing the enlarged image will take up the entire screen, instead of just the <object> area.Troubleshooting safe-htmlIf you have trouble, do this:
Go to safe_html in portal_transforms tool
Make sure param and object are valid tags (not nasty tag).After that, you should flush the cache of ZODB by going to
1. Zope root app ZMI
2. Control Panel
3. Database
4. main (or whatever zodb you have)
5. Flush Cache tab
6. Press “Minimize” buttonThis will remove from ZODB cache all cooked texts. This procedure is mentioned
at the top of safe_html in portal_transforms.UpgradingFrom 0.8*The upgrade to version 0.8* is an important and large update. Basically, it
gets rid of the Gallery type, replaces it with the regular Folder type along
with a new view applied to the folder, namely the “Gallery View.”You can only successfully upgrade from the 0.8* series by first upgrading
to a 1.x series release and then upgrading to the 2.x series.From 1.x to 2.xNo longer support Slideshow 2 gallery which has been replaced with galleria.From * to 3.xYou’ll be required to change your respective collective.js dependencies to
collective.ptg dependencies in buildout, re-run buildout.InstallationSince this product depends on plone.app.z3cform, you’ll need to add a few
overrides for products versions in your buildout if you aren’t using recent
versions of Plone. Good news is that is you’re using any other product that
uses plone.app.z3cform, you’ll already be good to go.Basically, you’ll need to add these to your buildout versions section
ONLY IF you’re running a plone < 4.1.For Plone 4.0:[versions]
z3c.form = 2.3.2
plone.app.z3cform = 0.5.0
plone.z3cform = 0.6.0
zope.schema = 3.6.0and Plone 3.x:[versions]
z3c.form = 1.9.0
plone.app.z3cform = 0.4.8
plone.z3cform = 0.5.10
zope.i18n = 3.4.0
zope.testing = 3.4.0
zope.component = 3.4.0
zope.securitypolicy = 3.4.0
zope.app.zcmlfiles = 3.4.3These versions are not the exact versions plonetruegallery requires, it’s
just a known working set. If you already have plone.app.z3cform installed
under different versions or wish to upgrade versions, you’re fine doing so.Then once you run buildout with this configuration, install
collective.plonetruegallery via the the add-on product configuration. Also,
make sure Plone z3cform support is installed too. If you experience issues
where no settings appear in theGallery Settingstab,
reinstallPlone z3cform support.UninstallFirst uninstall the collective.plonetruegallery product just like you would
any other product. Then, go toportal_setupin the zmi and click on
theImporttab. Once there, select thecollective.plonetruegallery Uninstall Profileprofile and run all the
steps. Once that is done, you can remove the egg from your buildout.Fetching of Images ExplainedWhen rendering a picasa or flickr gallery, it checks if the images have been
fetched within a day. If they have not, then it re-fetches the images for
the gallery.You can also force a specific gallery to be re-fetched by appending@@refreshto the gallery urlYou can manually refresh all galleries on the site by typing in a url likemysite.com/@@refresh_all_galleriesThis means you can also setup a
cron-like job to refresh all the galleries whenever you want to, just
so it isn’t done while a user is trying to render a page.License NotesThis Plone product is under the GPL license; however, the Highslide JS display
type uses theCreative Commons Attribution-NonCommercial 2.5 Licenseand is only for
non-commercial use unless you have purchased a commercial license from
theHighslidewebsite.
collective.ptg.pixelentity gallery (under construction) also requires a licenseCreditsCoding ContributionsPatrick Gerken - huge help with 0.8 releaseEspen Moe-NilssenHarald FriessneggerSylvain BouchardTranslationsFrench - Sylvain BoureliouNorwegian - Espen Moe-NilssenBrazilian Portuguese - Diego RubertFinnish - Ilja EverilaGerman - Jens W. Klein, Harald FriessneggerItalian - Mirto Silvio BusicoSpanish - Enrique Perez ArnaudDutch - Rob Gietema, Martijn Schenk, Fred van DijkSDGChangelog3.4.9 (2020-09-09)Updated Spanish translation.
[macagua]Updated the Gettext files.
[macagua]Extend the uninstall profile.
[thet]Fix CSS resource cooking in Plone >= 5.1
[petschki]3.4.8 (2017-02-26)Document re-using gallery in page template
[khink]mention Plone 5.0 compatibility, tweak README, add screen shots
[tkimnguyen]Refactored__getattr__in settings, for clarity and possibly
some speed.  [maurits]Respect folder sort order for showing subgalleries on the galleryview just as we do for images in the normal galleryview. Suggallery ordering was semi random until now because no order was passed into the catalog query for subgalleries.
[fredvd]Don’t show the message “There are no images in this gallery.” if we enable showing subgalleries and there are actual subgalleries to display.
[fredvd]Add option to disable the random lead image from galleries so that
always the first image is returned. Also useful with subgalleries.
[dveeze, fredvd]Updated Dutch translations.
[fredvd]Updated vocabulary so it works with Plone 53.4.7 (2016-02-01)Use root navigation path for finding gallery for portlets. That’s fix portlet with plone.app.multilingual.
[bsuttor]3.4.6 (2015-11-04)Added dexterity folder to classes implementing IGallery to work with dexterity types and Plone 5.
[sandrarum]Updated portuguese pt-br translation.
[lccruz]3.4.5 (2014-11-28)Add destinations to old upgrade-steps to prevent steps all -> all.
[pbauer]3.4.4 (2014-06-05)Exclude our own sizes when building the size vocabulary.
[witsch]3.4.3 (2014-05-12)Remove requirements for plone.app.contenttypes which likely broke a lot of
buildouts on a minor version bump.
[vangheem]3.4.2 (2014-05-11)fix thumbnails…
[vangheem]3.4.1 (2014-04-30)Remove plone.app.contenttypes version fix.
[thet]3.4.0 (2014-02-08)Added behavior
[jaroel]Support plone.app.contentypes’ Image
[jaroel]Drop support for Plone 3.3 and 4.0.
[hvelarde]The Topic type is now deprecated
[ale-rt]3.3.2 (2013-07-05)fix character encoding in portlet image titles (so it works with images on Plone and Flickr)
[kysr]3.3.1 (2013-05-31)give site administrator manage galleries permission
[vangheem]fix character encoding in portlet image titles
[bouchardsyl]add portlet methods to return all images
[bouchardsyl]3.3.1b1 (2013-05-06)fix getSite
[espen]3.3.1a2 (2013-04-04)provide “download_url” in image data
[vangheem]3.3.0a1 (2013-03-18)provide “original_image_url” image data
[vangheem]add ability to provide custom css for gallery to override styles
[vangheem]add integration with collective.ptg.galleryimage
[vangheem]restore plone 3 compatibility
[vangheem]explicitly close the iframe tag in the embedded
portlet gallery–fixes some browsers borking on the tag
[vangheem]3.2a (2012-11-07)moved picas and flickr support to their own products [espenmn]added vocabulary for image sizes [espenmn]3.1 (2012-10-12)be able to show copyright information
[eehmke]3.0 (2012-10-08)make final release3.0b4 (2012-10-01)fix collage support
[vangheem]3.0b3 (2012-07-24)brown bag previous release
[vangheem]3.0b2 (2012-07-24)get portal root without the getSite hook
[vangheem]dexterity compatible changes
[vangheem]3.0b1 (2012-07-04)no longer use collective.js packages since they caused more
problems and confusion than anything. All gallery dependencies
will now be collective.ptg.* namespaced.
[vangheem]move to using collective.ptg.galleriamove to using collective.ptg.contactsheetmove to using collective.ptg.contentflowmove to using collective.ptg.fancyboxmove to using collective.ptg.gallerifficmove to using collective.ptg.highslidemove to using collective.ptg.nivogallerymove to using collective.ptg.nivoslidermove to using collective.ptg.pikachoosemove to using collective.ptg.presentationmove to using collective.ptg.supersizedmove to using collective.ptg.thumbnailzoom2.4b3 (2012-06-25)backward compatible way to use Collection(4.2)
[vangheem]2.4b2 (2012-06-21)Plone 4.1 conditional zcml[Mikko]2.4b1 (2012-06-19)respect limiting number of items for collections[vangheem]add supersized gallery[espen]Added Basque (eu) translation [erral]Regenerated i18n files [erral]Fixed some i18n issues removing duplicated msgids [erral]added more settings for contactsheet and modified contactsheet to
use “speed” setting for how long time the effect takes. Is is now
possible to use thumbnail sizes [espen]added more settings for thumbnailzoom [espen]added custom css settings for s3slider [espen]Add ability to have default settings control panel[espen]Add ability to have default settings control panel[espen]fixed Thumbnailzoom, Contactsheet and Presentation to use Batch Size setting.compatible with new-style collections[vangheem]2.3.1 (2012-05-11)place gallery iframe fixes
[espen]2.3.0b2 (2012-05-11)style fixes
[vangheem]portlet fixes
[vangheem]2.3.0b1 (2012-05-09)Added settings for background position for presentation gallery type
[espen]move collection text field rendering to below gallery
[vangheem]add content flow display type
[vangheem]2.2.0 (2012-05-02)Add presentation display type.
[vangheem]2.1b2 (2012-04-27)be able to position overlay controls of highslide gallery
[domruf]2.1b1 (2012-04-24)add contact sheet and thumbnail zoom gallery
[espen]2.1a2 (2012-02-28)more nivo slider themes
[espen]2.1a1 (2012-02-24)nivo slider and gallery integration
[espen]Products.Collage integration(taken from collective.collage.plonetruegallery)
[vangheem]2.0a2 (2012-02-22)allow you to place full gallery in portlet
[vangheem]added option for background color for pikachoose
[espen]2.0a1 (2012-02-22)Remove Slideshow 2 display type
(depends on mootools and has loads of conflicts)
[vangheem]switch to using collective.js.galleriffic
[vangheem]switch to using collective.js.highslide
[vangheem]switch to using collective.js.fancybox
[vangheem]finally remove remains to gallery content type. Can not
upgrade directly to this product version now.
[vangheem]fix error with unicode-titled images
[silviot]added pikachoose support
[espen]added s3slider support
[espen]1.3.3 (2011-09-28)fix placegalleryview
[vangheem]fix highslide gallery not auto-playing
when pagination is enabled.
[vangheem]1.3.2 (2011-09-20)set thumbnail height on galleriffic1.3.1 (2011-09-20)fix size and scale problems with galleriffic1.3.0 (2011-09-20)no longer use silly unique zcml to register
display typesAdd Galleriffic slideshow display typeChange the way the display types are used so
that they can now be customized through
portal_view_customizations1.2.1 (2011-07-06)add translation for pt_BR
[rafabazzanella]1.2.0 (2011-06-30)Add option to set size for thumbnail images.
TODO: Take available scales from plone.app.imaging
(http://plone.org/products/plone-true-gallery/issues/48)
[hink]1.1.0 ~ (2011-06-22)fixes for Slideshow 2 in IE9
If you’re using custom styles for the Slideshow 2 gallery, please
test this upgrade as some styling changes have been made.
[vangheem]1.0.5 ~ (2011-04-17)fix plone 4.1 compatibility issue. Closeshttp://plone.org/products/plone-true-gallery/issues/45[vangheem]reference all css and js with absolute urls
[vangheem]no longer server slideshow js from js registry
[vangheem]1.0.4 ~ (2011-03-14)Add a Gallery Setting for Slideshow type to allow omitting the link to
images. (https://plone.org/products/plone-true-gallery/issues/44)
[khink]1.0.3 ~ (2011-02-20)remove the restriction on requiring picasa web album accounts to
end with‘@gmail.com’. Fixeshttp://plone.org/products/plone-true-gallery/issues/41[vangheem]1.0.2 ~ (2011-01-12)Enable re-use of view template macro. collective.collage.plonetruegallery
uses this.
[khink]1.0.1 ~ 2010-12-31added spanish translation
[Enrique Perez Arnaud]use ViewPageTemplateFile since you can get UnicodeDecodeError with
non-ascii characters in the title and description.
[Enrique Perez Arnaud]1.0fix picasa support on Plone 41.0rc2made the menuitem, the settings action and tabs translatable and added
German translations.
[fRiSi]move translation files to locales folder and added script to rebuild and
sync the po(t) files and compile mo files
(seehttp://plone.org/products/plone-true-gallery/issues/21)
[fRiSi]select the random image for subgalleries out of the subgallery’s images
fixeshttp://plone.org/products/plone-true-gallery/issues/40[fRiSi]1.0rc1Do not show “There are no images in this gallery” in case there are sub-galleries.
[fRiSi]added a placeful layout for adding galleries through kupu and prettyphoto
[espen]add description and text to rendered gallery page so people can have introductions to galleries
[vangheem]add hide controls options for gallery portlet. closeshttp://plone.org/products/plone-true-gallery/issues/28[vangheem]fixed issue where portlets wouldn’t work properly when there were more than one on
a page. Fixeshttp://plone.org/products/plone-true-gallery/issues/27[vangheem]handle returns and quotes in descriptions. Fixeshttp://plone.org/products/plone-true-gallery/issues/39[vangheem]gallery portlet now sets title and alt attribute of anchor tag for image.
fixeshttp://plone.org/products/plone-true-gallery/issues/37[vangheem]0.9.1rc5use plone.app.contentmenu.interfaces.IDisplayViewsMenu instead of plone_displayviews
for menu declaration since it doesn’t work with plone.app.contentmenu > 2.0b3
and zope.browsermenu installed.
[vangheem]0.9.1rc4import Batch directly from PloneBatch since with Zope 2.13 Batch is not
available at the package level when plonetruegallery is loaded.
[vangheem]0.9.1rc3made the basic gallery not store it’s cached images since it would never be able to really
cache them anyways. This fixes the zodb potentially growing forever on sites that use the
gallery portlet since it needed to calculate the gallery on every new image request, which
would cause a new write to the database. FYI, packing the database brings it back down to
it’s normal size.
[vangheem]0.9.1rc2changed added large plone folder view to code since in Plone 4 it is no longer available.
fixeshttp://plone.org/products/plone-true-gallery/issues/33[vangheem]0.9.1rc1Update to fancybox 1.3.1–should fixhttp://plone.org/products/plone-true-gallery/issues/19from showing up any longer
[vangheem]added easing and scrolling plugins to fancybox so it’s nicer now.
[vangheem]0.9.0b1use getAllowedSizes from plone.app.imaging.utils instead
[vangheem]fixed plone.app.imaging incompatibility with patches
it uses–fixeshttp://plone.org/products/plone-true-gallery/issues/23[vangheem]fixed fancy box not showing correctly occasionally
[vangheem]restructured display type code to be a little more compatible with templating.
It was a little messy the way it was done before so it is now slightly
less customizable for the sake of being more compatible and modular. If any
gallery types were defined in the old fashion, they may no longer work without
slight modification. That is what this is now tagged as a 0.9 release.
[vangheem]compatible with cmf.pt now–Chameleon.
[vangheem]gallery portlet now forces the height of the image so it doesn’t flicker if
for some reason the image hasn’t finished loading yet.
fixeshttp://plone.org/products/plone-true-gallery/issues/24[vangheem]added plone.app.z3cform as dependency profile
fixeshttp://plone.org/products/plone-true-gallery/issues/25[vangheem]fixed css on gallery portlet to show title properly
[vangheem]0.8.2b4 ~ March 16annoying extra release since the previous one included extra
“._” po files…
[vangheem]0.8.2b3 ~ March 10fixed gallery portlet js to work with Plone 4http://plone.org/products/plone-true-gallery/issues/18[vangheem]fixed max-width screwing up slideshow transition
with some css
[vangheem]gallery is now plone.app.imaging aware, reflecting
sizes specified there.
[vangheem]fixed translations not being added correctly
[vangheem]0.8.2b2 ~ February 10, 2010fixed page template traversal issue with plone 4 described herehttp://plone.org/products/plone-true-gallery/issues/17[vangheem]0.8.2b1 ~ February 4, 2010Make compatible with Plone 4–fixes page template rendering and css issues
[vangheem]0.8.1b2 ~ January 27, 2010Adapting BasicImageInformationRetriever to IObjectManager does not work
in Plone4 anymore. Use IBaseFolder instead which is also generic for
ATFolder and ATBTreeFolder.
[thet]Added Italian translation
[Mirto Silvio Busico]Added z3c.autoinclude support–no more zcml entry in buildout on newer
versions of plone.
[vangheem]Override button apply method instead of __call__ method to set the status
for user warning and to set setting changes. This fixes issue with
newer version of plone.z3cform not showing updated status message.
[vangheem]Added hashlib to list of install requires for picasa since some versions
of gdata fail without it.
[vangheem]0.8.1b1 ~ December 17, 2009add german translation
[jensens]add extra requires to setup.py: Now one can set as dependency
“collective.plonetruegallery[flickr], collective.plonetruegallery[picasa]” or
collective.plonetruegallery[all] –
[jensens]removed logging statement in porltet js code
[vangheem]fixed bug with upgrading older versions during version check
[vangheem]fixed unicode decode error with picasa albums that have none-standard
letters in them.
[vangheem]0.8.1a3 ~ December 3, 2009added gallery portlet
[vangheem]0.8a2fixed slideshow gallery css so that the green bar does not get covered
up by the gallery when logged in.
[vangheem]fixed sub-gallery css issues
[vangheem]fixed ordering of images in gallery–now gallery images reorder
when they are reordered in the container.
[vangheem]links now point to the view view of images if a user is logged in
[vangheem]fixed ?start_image parameter to work with batching.
[vangheem]highslide and fancybox slideshow will start slideshow automatically only if
number of images fits in one batch page
[do3cc]highslide image slides now have a title that consists of the image title
and link to the image
[do3cc]0.8a1removed Gallery content typeallows you to display gallery for Folder, Large Folder, and Collectionsmoved to using plone.app.z3cformsremove event subscriptions and do not cook basic galleriesremoved classic display type–don’t feel like maintaining anymore..added fancybox and highslide display typesslideshow 2 now pans without zooming in on image and distorting itadded more styling to slideshow 2’s typefixed issue with slideshow 2 gallery type where image would show up a little blurry because of image scaling…updated flickr size settingsno longer support private picasa albums(I don’t want to store passwords obviously…)0.7.1fixed testsadded finnish translations[Ilja Everila]added translatable sub-images0.7rc1added “Refresh Gallery” button in case you change a gallery and need to re-cook the gallery images before it automatically does it for you.  Especially useful for reordering of images in a basic gallery.added go to image support via url like /url/to/gallery?start_image=theTitle. Not exactly perfect, but should work most of the time.  No other way to know what image it is since I don’t keep ids on flickr and picasa galleries.  make sure to url encode the title though.0.7b2.4because translations had .mo files, it broke some systems–removed.0.7b2.3added brazilian translation0.7b2.1updated french translationadded norwegian translation(Espen Moe-Nilssen)added some message factories to places where it wasn’t used0.7b2add css class to no images message0.7b1changed the small picasa gallery size to be 320x3200.7a1.2bug fixesgallery type registration changes0.7a1.1fixed bug that prevented subgalleries from being displayed [deo]made sure to always display the gallery images even when there are subgalleries in the current gallery [deo]removes dependency on simplejson and elementtreenow flickrapi and gdata are optional add-onsadded support for slideshow 2 - now gives option of what gallery type to usereorganization of gallery schema(simple)pre-fetches gallery images to speed rendering time(especially for flickr and picasa). Fetching occurs at a timed interval, can be setup to use clock server or can manually be fetched.css fixesbetter design for sub-galleries0.6b2.4fixed dependencies to be more flexible0.6b2.3fixed really dumb basic image sizing problem0.6b2.2added French translation(thanks to Sylvain Boureliou)0.6b2.1removed kss dependencyfixed flickr issues with api version–just pinned the version number(should have done from the start)moved all javascript to portal_javascriptsfixed safari bug when carousel is hiddenpacked all javascripteven though this is beta, this is a recommended upgrade as there are many improvements and some major fixesimplemented new timing mechanism0.6b1.3fixed bug with picasa galleries where it was retrieving all the galleries sometimesadded better error handling0.6b1.2fixed picasa bugs0.6b1moved all gallery types to adapters.fixed opera support0.5.3.2plone 3.0 support fixes0.5.2fixed opera bugflickr gallery now supports name or id for user an sets0.5b1minor bug fixes0.5b1removed dependency of mooTools and smooth gallerydynamically grabs imagesbetter controlsbetter cross browser support0.4rc3added basic flickr support0.4rc2refactored code to easily add new gallery typesfails gracefully if gdata isn’t installedNow you choose the gallery type0.3 - Betaadded support for picasa web albumsfixed a few bugs.2beta-r67403 - Betaadded content type iconscleaned up gallery views.1 - InitialInitial release