This page is still a beta!

1.3. Configuration

Using a lightbox

If you want to use a lightbox with chgallery you need to include a lightbox extension like pmkslimbox or perfectlightbox. I tested it with pmkslimbox with this code.

# TS Code
plugin.tx_chgallery_pi1 {
gallery.image {
file {
maxW = 139
maxH = 110
}
imageLinkWrap  = 1
imageLinkWrap {
enable = 1
typolink {
title.field= tx_chgalleryTitle
parameter.override.cObject = IMG_RESOURCE
parameter.override.cObject.file.import.data = TSFE:lastImageInfo|origFile
parameter.override.cObject.file.maxW = 800
parameter.override.cObject.file.maxH = 600
# used lightbox is pmkslimbox
ATagParams = rel="lightbox"
ATagParams.override = rel="lightbox[sb{field:uid}]"
ATagParams.insertData = 1
}
}
}
}
plugin.tx_chgallery_pi1.single.image < plugin.tx_chgallery_pi1.gallery.image

The TS code is also saved at ext/chgallery/res/ts/lightbox.ts

Different caption

To get a different information in the caption you can change title.field = tx_chgalleryTitle to tx_chgalleryImage to get the name of the image file or use title.data = TSFE:lastImageInfo|origFile for the whole path.

Watermarks

To get watermarks into the lightbox, use the TS code you can find at ext/chgallery/res/ts/watermark.ts

Random mode

Demo of the random mode:http://www.rggooglemap.com/dev/chgallery/zufallsmodus.html

It is possible to use a random mode which got 2 disadvantages:

  1. The output can't be cached, so it is slower.

  2. The pagination can't work, so set the images / page to a high enough level or just delete the markers for it from the template. The pagebrowser is therefore hidden by default using the subpart ###PAGEBROWSER###

  3. It only works in gallery view!

You can enable the random mode either in the plugin (by setting the checkbox) or with TS (random=1) but you still need the following line in the TS:

# TS Code
plugin.tx_chgallery_pi1 = USER_INT

which will disable the caching for the plugin.

Using RealURL

If you want to rewrite the parameters using RealURL you need to add something like this to your postVarSets

'galerie' => array(
array(
'GETvar' => 'tx_chgallery_pi1[pointer]',
),
array(
'GETvar' => 'tx_chgallery_pi1[dir]',
),
array(
'GETvar' => 'tx_chgallery_pi1[single]',
),
), 

For more information take a look at the manual of RealURL!

Using Ajax

Demo of the ajax mode: http://www.rggooglemap.com/dev/chgallery/mit-ajax.html?

It is possible to enable ajax for chgallery so that the pagebrowser works without reloading the complete page!

To be able to use this feature you need to follow these steps:

Add this TS code

#TS code
plugin.tx_chgallery_pi1 {
# Load a different template which is needed
templateFile = EXT:chgallery/res/ajax.html 
# Activate ajax
ajax = 1 
}
# Essential lines !!!
export_chgallery.10.renderObj  {
      10 < plugin.tx_chgallery_pi1
      10.userFunc = tx_chgallery_pi1->xmlFunc
}  

Add t3mootools

Install the extension t3mootools and create a new ajax library. Take a look at its manual. In short:

  1. Install the extension and go to the new BE module T3Mootools

  2. Switch in the dropdown to “Process & analyze t3mootools.txt in extensions”

  3. Click “Select all” & then “Check”

  4. Click “Merge & use”

Important

  1. The ajax feature just works with Mootools and no other ajax library!

  2. The ajax feature just works if the gallery is only 1 time on a page

Using the accordion with the LIST view

It is very easy to combine the list view with a javascript effect like the accordion which can be seen here: http://www.rggooglemap.com/dev/chgallery/kategoriebasierende-galerie-mit-accordion.html

To get this working you need to follow this steps:

  1. Install the extension t3mootools and let it analyze the extension(s).

  2. Change the template of chgallery with this TS code: plugin.tx_chgallery_pi1.templateFile = EXT:chgallery/res/accordion/template.html

  3. Include the Mootools library if you haven't done that already by using for example page.includeJS.file812 = /typo3conf/ext/t3mootools/res/mootoolsv1.11.js

The javascript is for Mootools and won't work if prototype or any other JS-library is installed!

Using ratings

It is possible to rate images by using the great extension ratings from Dmitry Dulepov. To get the extension working use the following TS:

# TS Code
plugin.tx_chgallery_pi1 {
ratings = 1
# optional ratings configuration
ratings {
...
}
}

Be aware that ext ratings conflicts with the ajax pagebrowser. So switch either pagebrowser to prototype or ratings to Mootools.

Using watermarks

Brand your images with text or an image by using watermarks. A demo is online at: http://www.rggooglemap.com/dev/chgallery/wasserzeichen.html

To use watermark you need to extend your TS. It is possible to set watermarks for any images. To get the watermarks in the lightbox view of the images of the gallery view use the TS inside res/ts/lightbox.ts. To get watermarks also for the small images please use the TS inside res/ts/watermark-gallery+lightbox.ts.

Using PicLens / Cooliris

Cooliris is a new way to look at images (and videos). A demo is online at: http://www.rggooglemap.com/dev/chgallery/cooliris-innerhalb-der-kategorie.html Best view is possible by installing the addon cooliris for your browser because it gives you the feature of the 3dwall.

To use cooliris with chgallery all you need to do is: Enable it by using the following TS

# TS Code
plugin.tx_chgallery_pi1.cooliris = 1

Configuration is very simple. Please look at the reference for all possible features.

Additional configuration

Include chgallery with TS only

To include the gallery with TS only you need at least this code

# TS Code
lib.gallery < plugin.tx_chgallery_pi1 
lib.gallery { 
path = fileadmin/fotos/ 
mode = CATEGORY
}