DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Readable name of your extension

Author:Dominic
Created:2010-11-23T10:04:10.570000000
Changed:2012-08-15T16:31:56
Classification:extensionkey
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:keywords comma-separated
Author:Author Name
Email:your@email.com
Info 4:
Language:en

img-1 img-2 EXT: Galleria jQuery Extension - dfm_galleria

EXT: Galleria jQuery Extension

Extension Key: extensionkey

Language: en

Keywords: keywords comma-separated

Copyright 2000-2010, Dominic Garms, <djgarms@gmail.com>

Galleria © 2010 Aino, <http://aino.se>

jQuery © 2009 John Resig <http://ejohn.org/> and the jQuery Team <http://docs.jquery.com/Contributors>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: Galleria jQuery Extension 1

`Introduction 3 <#__RefHeading__15410_868322831>`_

What does it do? 3

Screenshots 3

`Users manual 4 <#__RefHeading__1745_20894325>`_

Installation 4

Simple start 4

`Administration 5 <#__RefHeading__1749_20894325>`_

`Configuration 6 <#__RefHeading__1753_20894325>`_

Basics 6

FAQ 7

Reference 7

Themes 9

Extend Galleria 10

`Tutorial & HowTo's 11 <#__RefHeading__1759_20894325>`_

Set up for a full-size image slideshow 11

Place Info-Text into a different container outside galleria 11

Use HTML Content instead of pictures 12

`Known problems 13 <#__RefHeading__1761_20894325>`_

`Questions – Answers: Troubleshooting! 14 <#__RefHeading__1373_843579369>`_

`To-Do list 15 <#__RefHeading__1763_20894325>`_

`ChangeLog 16 <#__RefHeading__16432_868322831>`_

Introduction

What does it do?

  • Galleria is an image gallery framework, written in JavaScript
  • The aim is to simplify the process of creating visually appealing image galleries
  • This extension implements the Galleria jQuery plugin as an easy to use frontend plugin
  • The Galleria core and a number of themes and add-ons are 100% open source licensed under the MIT license

Features:

[carousel], [history], [fully scalable], [themes], [linkable], [lightbox], [extendable], [image pan],

[t3jquery], [advanced scaling], [keyboard navigation], [ImageMagick/GraphicMagick saling],

[images from DAM], [images from folder], [flickr plugin], [picasa plugin]

Screenshots

img-3 img-4

Users manual

Installation

Extension Manager

Include the extension with the extension manager:

img-5

Include Static Template

Include the static typoscript template into your TS (dmf_galleria):

img-6

Simple start

  • Create new content element “Galleria for TYPO3”
  • add some pictures with the upload function, folder, DAM images or DAM categories
  • save selection --> thats it!

img-4

Administration

There is nothing to administrate in this extension.

img-7 Configuration -------------

Basics

  • For the classic theme there is no configuration needed, a working default configuration is active by installation
  • If you want to change the behavior like speed, transition or dimension etc. you have 2 options for doing it:

a) change some values of the static TS constants with the Constant Editor (PLUGIN.TX_DMFGALLERIA) for all inserted galleria elements on the website

img-8

b) change your values directly in the plugin options of the flexform. This overwrites the TS config of your plugin for this specific element

FAQ

All configuration options are listed at github: https://github.com/aino/galleria

Reference

auto

Property

auto

Data type

int

Description

Sets Galleria to play slideshow when initialized

Default

0

clicknext

Property

clicknext

Data type

boolean

Description

Helper for adding a click event on the entire stage to move forward by clicking on the main image

Default

false

debug

Property

debug

Data type

boolean

Description

Set this to true to get error messages

Default

false

easing

Property

easing

Data type

string

Description

Defines the easing mode globally.

Options:

- galleria

- galleriaIn

- galleriaOut

Default

galleria

extend

Property

extend

Data type

string

Description

Add custom funcitonality to the gallery

Default

height

Property

height

Data type

int

Description

Manually set a gallery height

Default

350

history

Property

history

Data type

boolean

Description

Enables history plugin, for use of browsers history back button

Default

false

image_crop

Property

image_crop

Data type

string/boolean

Description

Defines how Galleria will crop image and the stage

Options:

- true (all images scaled to fill the stage, centered and cropped)

- false (will scale down so the entire image fits)

- height (scalte the image to fill the height of the stage)

- width (scale the image to fill the width of the stage)

Default

false

image_margin

Property

image_margin

Data type

int

Description

Sets a margin between the image and the stage

Default

0

image_pan

Property

image_pan

Data type

boolean

Description

Toggles the image pan effect

Default

false

image_pan_smoothness

Property

image_pan_smoothness

Data type

int

Description

Defines how smooth (and cpu consuming) the pan effect should be

Default

12

image_position

Property

image_position

Data type

string

Description

Positions the image

Default

“center”

image_scale_pictures

Property

image_scale_pictures

Data type

boolean

Description

Activate scaling with ImageMagick/GraphicMagick

Default

false

image_scale_height

Property

image_scale_height

Data type

int

Description

Scales max. height of image with IM / GM

Default

350

image_scale_width

Property

image_scale_width

Data type

int

Description

Scales max. width of image with IM / GM

Default

500

max_scale_ratio

Property

max_scale_ratio

Data type

number

Description

Defines how much Galleria is allowed to scale

Default

undefined

min_scale_ratio

Property

min_scale_ratio

Data type

number

Description

Defines how much Galleria must scale

Default

undefined

on_image

Property

on_image

Data type

boolean

Description

Enables lightbox by onclick of the image

Default

false

overlay_opacity

Property

overlay_opacity

Data type

number

Description

Sets how transparent the overlay should be (lightbox enabled)

Default

0.85

overlay_background

Property

overlay_background

Data type

string

Description

Defines the background color of the overlay

Default

“#0b0b0b”

pause_on_interaction

Property

pause_on_interaction

Data type

boolean

Description

Toggles if Galleria should stop playing if the user navigates

Default

true

show

Property

show

Data type

int

Description

Lets you start the slideshow at any image index

Default

0

show_info

Property

show_info

Data type

boolean

Description

Toggles the caption

Default

true

show_counter

Property

show_counter

Data type

boolean

Description

Toggles the counter

Default

true

show_imagenav

Property

show_imagenav

Data type

boolean

Description

Toggles the image navigation arrows

Default

true

thumb_crop

Property

thumb_crop

Data type

string

Description

Same as image_crop for thumbnails

Default

false

thumb_fit

Property

thumb_fit

Data type

boolean

Description

Lets you fit thumbnails according to width

Default

true

thumb_margin

Property

thumb_margin

Data type

int

Description

Same as image_margin for thumbnails

Default

0

thumb_image_scale_pictures

Property

thumb_image_scale_pictures

Data type

boolean

Description

Activate scaling with ImageMagick/GraphicMagick for thumbnails

Default

false

thumb_image_scale_height

Property

thumb_image_scale_height

Data type

int

Description

Scales max. height of thumb-image with IM / GM

Default

40

thumb_image_scale_width

Property

thumb_image_scale_width

Data type

int

Description

Scales max. width of thumb-image with IM / GM

Default

54

thumb_quality

Property

thumb_quality

Data type

string/boolean

Description

Defines if and how IE should use bicubic image rendering for thumbnails

Options:

- auto (uses high quality if image scaling is moderate)

- false (will not use high quality – better performance)

- true (will force high quality rendering – can slow down performance)

Default

true

thumbnails

Property

thumbnails

Data type

string/boolean

Description

Sets how and if thumbnails should be created

Options:

- true (shows thumbnails)

- false (thumbnails and carousel will not getting created)

- empty (create empty spans with className img instead of thumbnails)

- numbers (creates empty spans with numbers instead of thumbnails)

Default

true

transitions

Property

transitions

Data type

string

Description

Defines what transition to use

Options:

- fade

- flash

- pulse

- slide

- fadeslide

Default

“fade”

transition_initial

Property

transition_initial

Data type

string

Description

Sets a different transition on the first image

Options: same as transition

Default

“fade”

transition_speed

Property

transition_speed

Data type

int

Description

Defines the speed of the transition

Default

400

width

Property

width

Data type

int

Description

Manually set a gallery width. TODO: setting option “auto”

Default

500

wrap

Property

wrap

Data type

String

Description

Wrap for Galleria instanz: <div id=”myId”>|</div>

Default

random

Property

random

Data type

boolean

Description

Randomize the output of Pictures.

Default

false

picasa

Property

picasa

Data type

Boolean

Description

Include the picasa plugin

Default

false

flickr

Property

flickr

Data type

Boolean

Description

Include the flickr plugin

Default

false

((Unknown Property))

Property

Data type

Description

Default

damCaptionFields

Property

damCaptionFields

Data type

string

Description

Comma separated string with tx_dam fields for href fields.

The first field with a value will be taken.

Default

caption,title

damDescriptionFields

Property

damDescriptionFields

Data type

string

Description

Comma separated string with tx_dam fields for description fields.

The first field with a value will be taken.

Default

description

damHrefFields

Property

damHrefFields

Data type

string

Description

Comma separated string with tx_dam fields for link fields.

The first field with a value will be taken.

Default

loc_desc

damThumbFields

Property

damThumbFields

Data type

string

Description

Comma separated string with tx_dam fields for thumbnail fields.

The first field with a value will be taken.

Default

alt_text

doNotIncludeJQuery

Property

doNotIncludeJQuery

Data type

boolean

Description

Dont includes jQuery if it is included in the page already

Default

false

file.jQueryLibrary

Property

file.jQueryLibrary

Data type

file

Description

Location of the jQuery library

Default

source

file.jQueryGalleria

Property

file.jQueryGalleria

Data type

file

Description

Location of the Galleria js source

Default

source

file.jQueryGalleriaTheme

Property

file.jQueryGalleriaTheme

Data type

file

Description

Location of the Galleria theme source

Default

source

file.ie6style

Property

file.ie6style

Data type

file

Description

Location of the IE6 stylestheet file

Default

source

file.historyPlugin

Property

file.historyPlugin

Data type

file

Description

Location of the history plugin

Default

source

file.flickrPlugin

Property

file.flickrPlugin

Data type

file

Description

Location of the flickr plugin

Default

source

file.picasaPlugin

Property

file.picasaPlugin

Data type

file

Description

Location of the picasa plugin

Default

source

jQueryNoConflict

Property

jQueryNoConflict

Data type

boolean

Description

Sets the no-conflict method of jQuery

Default

false

jsInFoter

Property

jsInFoter

Data type

boolean

Description

Includes the JS source into the footer

Default

false

jsMinify

Property

jsMinify

Data type

boolean

Description

Minifies the JS source

Default

false

[tsref:(cObject).plugin.tx_dmfgalleria_pi1]

Themes

Create your own theme:

If you'd like to create your own re-useable theme, Galleria provides a codex for that too. Using the static function Galleria.addTheme( [theme object] ), you can add custom theme functionality and css to create your own custom theme. A good way to start is to have a look at some of the free themes in the Galleria package and see how it's done.

A simple theme can be created like this:

  • create a directory in your galleria theme directory called 'my_theme'
  • create a new css file called galleria.my_theme.css. Save in the folder you just created.
  • create a new js file called galleria.my_theme.js ad save in the same directory. Add the following example code:

Galleria.addTheme({

name: 'my theme',

author: 'John Doe, http://example.com',

version: 1,

css: 'galleria.my_theme.css',

defaults: {

// add your own default options here

transition: 'fade',

imagecrop: true,

// custom theme-specific options should begin with underscore:

_my_color: 'yellow'

},

init: function(options) {

/*

The init function get's called when galleria is ready.

You have access to all public methods and events in here

this = gallery instance

options = gallery options (including custom options)

*/

// set the container's background to the theme-specific _my_color option:

this.$('container').css('background-color', options._my_color);

// bind a loader animation:

this.bind(Galleria.LOADSTART, function(e) {

if (!e.cached) {

this.$('loader').show();

}

});

this.bind(Galleria.LOADFINISH, function(e) {

this.$('loader').hide();

});

}

});

  • point the file.jQueryGalleriaTheme to the file like this: fileadmin /galleria-theme/my_theme/galleria.my_theme.js
  • for more information: https://github.com/aino/galleria

Extend Galleria

You can easily extend the Galleria with some individual jQuery code. Here a simple example, how you can add the play() method of Galleria to the DOM element with the id=”play”. The keyword gallery represents the instance of Galleria and all methods can get bind to elements. (More examples: https://github.com/aino/galleria )

img-9

Flickr Plugin

For the flickr plugin you have the choice of following methods, how to catch images from:

Method

.search( phrase[, callback] )

Search Flickr for public photos using a search string.

.tags( phrase[, callback] )

Search Flickr for public photos using tags.

.user( username[, callback] )

Fetch a user’s public photos using the username like displayed in the URL (not user ID).

.set( photoset_id[, callback] )

Get photos from a photoset by ID.

.gallery( gallery_id[, callback] )

Get photos from a gallery by ID

.groupsearch( group[, callback] )

Search groups and fetch photos from the first group found Useful if you know the exact name of a group and want to show the groups photos.

.group( group_id[, callback] )

Get photos from a group by ID

Options
Max

Number

imageSize

small – square 75x75

thumb – 100 on longest side

medium – 640 on longest side (if available, or it will take the closest match) - DEFAULT

big – 1024 on longest side

original – original image, either a jpg, gif or png, depending on source format.

thumbSize

see above imageSize, but default == thumb

sort: String

date-posted-asc

date-posted-desc

date-taken-asc

date-taken-desc

interestingness-desc

interestingness-asc

relevance

description

boolean – Default: false

Picasa Plugin

For the picasa plugin you have the choice of following methods, how to catch images from:

Method

.search( phrase[, callback] )

Search Picasa for public photos using a search string.

.user( username[, callback] )

Fetch a user’s public photos using the username like displayed in the URL (not user ID).

.useralbum( username, albumID, [, callback] )

Get photos from a user album

.setOptions( options )

Set picasa options. The options object blends into the defaults.

Options
Max

Number

imageSize

small – square 75x75

thumb – 100 on longest side

medium – 640 on longest side (if available, or it will take the closest match) - DEFAULT

big – 1024 on longest side

original – original image, either a jpg, gif or png, depending on source format.

thumbSize

see above imageSize, but default == thumb

description

boolean – Default: false

Tutorial & HowTo's

For the first running gallery, please follow the instructions from the manual

Set up for a full-size image slideshow

Insert the Plugin with the following configuration: General: - add at least 2 images Display: - Set width/height of the the gallery Scale/Position: - Set Position of the image to "top left" Carousel: - Set Render thumbnails to "false"- Disable enable next/prev, thumb follows Effects: - Autoscroll (example): "30" modify your css: /* set default image to avoid flash on load */.galleria-container {background: #color url(/uploads/tx_dmfgalleria/default.jpg) no-repeat;}/* full size image display */.galleria-stage {bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;}

Thanks to Bernhard for this HowTo!

Place Info-Text into a different container outside galleria

Place somewhere an empty container and give it a unique ID. Example: <div id=”infoBox”></div>

Hide the inbuilt info text over TS constants or inside of the plugin (optional, maybe you want both...)

Copy the classic theme folder from “EXT:dmf_galleria/res/js/themes/classic” somewhere into the fileadmin and select the theme over TS constants (plugin.tx_dmfgalleria_pi1.file.jQueryGalleriaTheme) or inside of the plugin configuration (Select individual theme)

Paste somewhere inside of galleria.classic.js ( init: function(options) { … }) following code:

this.bind(Galleria.IMAGE,function(e){

var title = description = '';

$.each(this.getData('title'),function(index,val){

if(index=="title"&&val){

title = '<strong>'+val+'</strong>';

}

if(index=="description"&&val){

description = '<p>'+val+'</p>';

}

});

//here comes the individual ID of the container, in this example “infoBox”

$("#infoBox").html(title+description);

});

Use HTML Content instead of pictures

Upload somewhere in your filesystem the *.html files

Link to the html file row per row inside of the description textarea field in the flexform of the plugin like:

fileadmin/imagemaps/map1.html

fileadmin/imagemaps/map2.html

Copy the classic theme folder from “EXT:dmf_galleria/res/js/themes/classic” somewhere into the fileadmin and select the theme over TS constants (plugin.tx_dmfgalleria_pi1.file.jQueryGalleriaTheme) or inside of the plugin configuration (Select individual theme)

Paste somewhere inside of galleria.classic.js ( init: function(options) { … }) following code:

// container for a html imagemap:this.addElement('imageMap');// prepend object imageMap before stagethis.prependChild('stage','imageMap');this.bind(Galleria.IMAGE, function(e) {

var description = '';var indize = this.getIndex();var data = this.getData(indize);var dataTitle = data.title;var bool = dataTitle.search(".html");if (bool != -1) {$(this.get('imageMap')).load(data.title);}else {$(this.get('imageMap')).html("");}});

At the final step you have to modify your css, for example give the stage container a display:none, that you dont have doubled content, pictures and html once. You may also can do it inside of your galleria.classic.js with $('.galleria-stage').hide().

Prevent user from clicking or downloading images

This CSS solution prevent a div layer over the images, that a user cannot use right-click to download the images directly:

.galleria-images:after {

content: ".";

position:absolute;

left:5%;

z-index:10000;

height:100%;

width:90%;

background:transparent;

}

Credits are going to Andreas Meyer , thanks for sharing this solution!

Known problems

Questions – Answers: Troubleshooting!

((generated))

Q: I only see the raw images and the Galleria doesnt get built?
A: Look into the head section of your page, Jquery gets inserted more than one time or doesnt get inserted at all into your header. Use ext t3jquery for better integration. Usual JS error gets displayed: “JQuery(…) .galleria() is not a function”

To-Do list

Nothing at the moment

ChangeLog

Please look into the ChangeLog.txt inside of the Extension or at the TER or at forge.typo3.org: http://typo3.org/extensions/repository/view/dmf_galleria/current/

img-2 19