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: chgallery¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2009-03-09T18:38:42.320000000 |
Author: | Georg Ringer |
Email: | http://www.cyberhouse.at |
Info 3: | |
Info 4: |
EXT: chgallery¶
Extension Key: chgallery
Copyright 2000-2002, Georg Ringer, <http://www.cyberhouse.at>
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.com
Table of Contents¶
EXT: chgallery 1
Introduction 1
What does it do? 1
Demo 2
Screenshots 2
Sponsors 5
Users manual 5
Update from version 1.x.x 6
GALLERY view 6
CATEGORY view 6
SINGLE view 7
Flexform fields 7
Description of categories & images 8
Configuration 8
Using a lightbox 8
Random mode 9
Using RealURL 9
Using Ajax 9
Using the accordion with the LIST view 10
Using ratings 10
Using watermarks 10
Using PicLens / Cooliris 10
Additional configuration 10
Reference 11
General 11
CATEGORY view 11
GALLERY view 11
SINGLE view 12
Available markers 13
You like the extension? 13
Bugs, Features & Development 13
Changelog 13
Introduction¶
What does it do?¶
This extensions provides another gallery with the following features:
- Simple usage: Never leave the plugin, no records or list view necessary.
- Gallery view : Display all images from a directory including a configurable page browser (optional with ajax).
- Category view: Display sub-directories as categories.
- Random Mode , Ratings (by extension ratings)
- Template based, everything configurable through TS (Lightbox, watermarks,...)
Please take a look at the demos or the screenshots to get an idea.
|img-1| This extension has been created by CYBERhouse
Demo¶
See the extension and its features on my website.
General website & demo
- German: http://www.rggooglemap.com/dev/chgallery.html
- English: http://www.rggooglemap.com/en/dev/chgallery.html
Random mode
http://www.rggooglemap.com/dev/chgallery/zufallsmodus.html
Ajax based pagination
http://www.rggooglemap.com/dev/chgallery/mit-ajax.html
Show 3 images but link all in Lightbox
http://www.rggooglemap.com/dev/chgallery/lightbox-ueber-alle-bilder- mit-random.html
Category based gallery
http://www.rggooglemap.com/dev/chgallery/kategoriebasierende- galerie.html
Category based gallery featuring rgaccordion
http://www.rggooglemap.com/dev/chgallery/kategoriebasierende-galerie- mit-accordion.html
Support of PicLens / Cooliris
Screenshots¶
Image 1: A possible view of the images including the title underneath the image.
Image 2: A simpler view
Image 3: Gallery featuring any lightbox
Image 4: Category view featuring Mootools accordion to toggle the categories.
I mage 5: Single view with some picture information including a download link.
Image 6: Using the ext ratings to rate images.
Image 6: Backend Plugin with setting the path to the directory and all other settings.Use the wizard to add comments to the images.
Sponsors¶
Thanks a lot for all people who supported the development of this extension, especially:
- Dehaan | Media www.dehaanmedia.nl
- Gekus www.gekus.com
If you need another feature, sponsor it! Contact me for further details!
Users manual¶
To use this extension follow these steps:
Install the extension
Insert the Plugin at any page you want to and set at least a path
Optional
Use the wizard's icon to describe images or galleries.
Set the view to LIST and show multiple directories
Read the next sections to get further information!
Update to version 2.4.0¶
If you update to the version 2.4.0 please be aware of the following change:
Category titles have now always to be sorted in the order of subdirectory names. As a result, the order of titles will now be independant from category sort order. Please resort your titles if you used descending order in older versions!
I am sorry for the non-backwards-compatibility but this is the best for this extension and won't happen in rare cases!
GALLERY view¶
Use this view to show all images of the selected directory. Follow this steps:
Choose the view “GALLERY view”.
Add the path to the directory.
To be able to add a description you need to save the plugin first. After that you are able to to access the wizard by clicking at the wizard icon. Add the description next to the thumbnails and press “Save”. You can close the wizard afterwards.
You are done. Take a look at the chapter “Flexform fields” for information about the remaining fields.
CATEGORY view¶
Use this view to show all directories which are inside the selected path. Each directory represents a kind of category. Follow this steps:
Choose the view “CATEGORY view”.
Add the path to the directory.
To be able to add a description you need to save the plugin first. After that you are able to to access the wizard by clicking at the wizard icon. Inside the wizard you can enter the description for every image of the subdirectory. Open the area of the subdirectory by clicking at the name of the directory. After clicking the button ”Save” you can close the wizard.
To set a title for every subdirectory (= kind of category) you need to add it in the textarea. Enter one line for every subdirectory. Always enter your titles in the ascending order of the subdirectory names.
To set a description for every subdirectory you need to click at the 2 nd wizard icon next to the textarea and add the description to the textarea in the wizard.
You are done. Take a look at the chapter “Flexform fields” for information about the remaining fields.
SINGLE view¶
Use this view to show one single image. You can either use this view standalone or as a single view connected to the category or gallery view. If a user clicks at an image in the category/gallery-view, the image will be shown in big in the single view plugin. Follow this steps:
Create the 1 st plugin and set the view to “GALLERY” or “CATEGORY” and add a path to the images. Activate the checkbox “Use Single view”.
Create the 2 nd plugin and set the view to “SINGLE view”. Be sure that the settings for the path and the pagebrowser are the same in both plugins!
Flexform fields¶
This is an overview about all fields which are available inside the plugin.
1 :sup:`st` Tab “Settings”
Display¶
Field
Display
Description
Choose what to display. You can choose between GALLERY, CATEGORY & SINGLE. Save after choosing to load specific fields
Path¶
Field
Path
Description
Path to the directory. Use the extension rgfolderselector to choose the path by using a wizard! The path looks like fileadmin/images/ with a trailing slash!
Description¶
Field
Description
Description
Use this wizard to add a description to the images. A path needs to be added first and the content elements needs to be saved before the wizard works correctly!
Category title & description¶
Field
Category title & description
Description
Use the textarea to add a title to every category. Every line stands for one gallery. Use the wizard to add a description to the gallery category. Only available inside CATEGORY view.
Order of categories¶
Field
Order of categories
Description
Use the dropdown to sort the categories ascending or descending. Only available inside CATEGORY view.
Images / page¶
Field
Images / page
Description
Set the number of images shown per page.
Random Mode¶
Field
Random Mode
Description
Activate it to shuffle the images. Important: Pagebrowser makes no sense because it is likely that images from the 1 st page are shown at the 2 nd again. Only works in gallery view.
Use single view¶
Field
Use single view
Description
Set this checkbox if you use the single view. You need to add this additionally as a 2 nd content element. Only available inside CATEGORY & GALLERY view.
2 :sup:`nd` Tab “Additional options”
Show all images in Lightbox¶
Field
Show all images in Lightbox
Description
If set, you will get all images inside the lightbox! Configuration is done with plugin.tx_chgallery_pi1.renderAllLinks {... } .
Don't display first image in single view¶
Field
Don't display first image in single view
Description
If set and category view is used, the first image of a gallery will only be shown at the category view and not in the gallery view.
Link all images to¶
Field
Link all images to
Description
Enter a target to link all images to it.
3 :sup:`rd` Tab “Preview”
Use the last tab “ Preview ” to get a preview of the images. You will see the directories including the images and their description.
Description of categories & images¶
Descriptions of categories and images are saved in txt-files inside the directory. Out of this reason it also possible to add the description at many different places. For example by using the List module or by doing it on your own computer before uploading the images. Just consider to use the correct syntax!
Categories
The description is saved in the file “info.txt” inside the directory.
Images
The description is saved in the same directory as the image itself with the name imagefilename.txt. For example DSC09155.jpg.txt if the image got the name DSC09155.jpg.
Multilingual support
If you got a multilingual website you need to create a file for every language. You need to know the ID of the language (which is the same you use for the language conditions in your TS) and the files look like info-1.txt or DSC09155.jpg-1.txt .
If you are using the wizard inside the plugin you don't need to care about all this!
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:
- The output can't be cached, so it is slower.
- 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###
- 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:
Install the extension and go to the new BE module T3Mootools
Switch in the dropdown to “Process & analyze t3mootools.txt in extensions”
Click “Select all” & then “Check”
Click “Merge & use”
Important
- The ajax feature just works with Mootools and no other ajax library!
- 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:
Install the extension t3mootools and let it analyze the extension(s).
Change the template of chgallery with this TS code: plugin.tx_chgallery_pi1.templateFile = EXT:chgallery/res/accordion/template.html
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
}
Reference¶
This is the TS reference of the extension. It is divided into the sections General, Category, Gallery & Single.
Take a look at the file ext_typoscript_setup inside the extension directory to see the default configuration.
General¶
General settings which are needed for any view.
_DEFAULT_PI_VARS¶
Property
_DEFAULT_PI_VARS
Data type
Description
Use _DEFAULT_PI_VARS to set default piVars. _DEFAULT_PI_VARS.single = 1 is set to show the first image by default in the single view.
Default
_DEFAULT_PI_VARS.single = 1
mode¶
Property
mode
Data type
String, stdWrap
Description
Possible: LIST to show the list view or GALLERY to show a single gallery
Default
templateFile¶
Property
templateFile
Data type
string, stdWrap
Description
Path to the template
Default
EXT:chgallery/res/template.html
pathToCSS¶
Property
pathToCSS
Data type
string, stdWrap
Description
Path to the CSS file. Leave this empty to include no CSS file.
Default
EXT:chgallery/res/gallery.css
pagebrowser¶
Property
pagebrowser
Data type
int, stdWrap
Description
How many images should be displayed in one page.
Default
9
fileTypes¶
Property
fileTypes
Data type
string, stdWrap
Description
All allowed filetypes which are displayed inside the gallery
Default
jpg,gif,png
path¶
Property
path
Data type
string, stdWrap
Description
The path to the files. This needs to be something like fileadmin/gallery/example/
Default
useAnchor¶
Property
useAnchor
Data type
boolean, stdWrap
Description
Use Anchors in the links to avoid scrolling to the gallery element. The anchors are set by TYPO3 and not by the extension.
Default
1
single¶
Property
single
Data type
Boolean
Description
Use this to let the plugin know that a single view is used.
Default
categoryOrder¶
Property
categoryOrder
Data type
String
Description
Sort the categories by using either path, size, title, description, name or date.
Default
path
categoryOrderAscDesc¶
Property
categoryOrderAscDesc
Data type
String
Description
Sorting direction. Possible values are asc and desc.
Default
asc
link¶
Property
link
Data type
string, stdWrap
Description
Link all images to a specific url/page/...
Default
link.¶
Property
link.
Data type
typolink
Description
Specify the “link all images” and use all options from the usual typolink
Default
ajaxScript¶
Property
ajaxScript
Data type
string, stdWrap
Description
Path to the js file
Default
EXT:chgallery/res/js/ajax.js
pathToMootools¶
Property
pathToMootools
Data type
string, stdWrap
Description
Path to the Mootools lib if t3mootools is not used
Default
EXT:chgallery/res/js/mootools.js
ajax¶
Property
ajax
Data type
boolean, stdWrap
Description
Enable ajax
Default
0
ratings¶
Property
ratings
Data type
boolean, stdWrap
Description
Enableratings of each image. Requirements: Set this to 1 and install the extension ratings.
Default
1
ratings.¶
Property
ratings.
Data type
Description
Configuration of ratings
Default
exif¶
Property
exif
Data type
boolean
Description
Enable exif functions
Default
1
cooliris¶
Property
cooliris
Data type
boolean
Description
Enable cooliris
Default
0
cooliris.link¶
Property
cooliris.link
Data type
typolink
Description
Configuration of the link to the RSS feed with the images
Default configuration:
link {
useCacheHash = 1
returnLast = url
additionalParams = &type=9713
}
Default
cooliris.showAllGalleriesInCategory¶
Property
cooliris.showAllGalleriesInCategory
Data type
boolean
Description
If set and category view is used and you are inside a gallery, Cooliris will still show all images and not just of this category.
Default
0
cooliris.logo¶
Property
cooliris.logo
Data type
String
Description
Set a url to the logo which should be displayed in Cooliris,
Default
cooliris.prefixUrl¶
Property
cooliris.prefixUrl
Data type
boolean
Description
If set, the images will be prefixed with the current domain
Default
[tsref:plugin.tx_chgallery_pi1 ]
CATEGORY view¶
This part of the reference is for the LIST view. Use plugin.tx_chgallery_pi1.category.XXX
image¶
Property
image
Data type
IMAGE
Description
Configure the preview image
Default
file.maxW = 100
link¶
Property
link
Data type
TYPOLINK
Description
Configure the link to the gallery view
Default
useCacheHash = 1
date¶
Property
date
Data type
stdWrap
Description
Creation time of the directory
Default
strftime.%d.%m.%Y %H:%m
size¶
Property
size
Data type
stdWrap
Description
StdWrap for the size of a category
Default
description¶
Property
description
Data type
stdWrap
Description
StdWrap for the description of a category
Default
path¶
Property
path
Data type
stdWrap
Description
StdWrap for the path of a category
Default
title¶
Property
title
Data type
stdWrap
Description
StdWrap for the title of a category
Default
[tsref:plugin.tx_chgallery_pi1.list ]
GALLERY view¶
This part of the reference is for the GALLERY view. This part is also used if no categories are used. Use plugin.tx_chgallery_pi1.gallery.XXX
excludeFirstImage¶
Property
excludeFirstImage
Data type
boolean
Description
Exclude the 1 st image from this view. Can be used to use this image as preview image.
Default
0
image¶
Property
image
Data type
IMAGE
Description
Configuration of the image
Default configuration:
file {
maxW = 139
maxH = 110
}
Default
description¶
Property
description
Data type
stdWrap
Description
Configuration of the description of each image
Default configuration:
ifEmpty =
Default
dir_title¶
Property
dir_title
Data type
stdWrap
Description
StdWrap for the title of the category, if categories are used
Default configuration:
required = 1
stdWrap.wrap = <strong>|</strong>
Default
dir_description¶
Property
dir_description
Data type
stdWrap
Description
StdWrap for the description of the category, if categories are used
Default configuration:
required = 1
stdWrap.wrap = <br />|<br />
Default
download¶
Property
download
Data type
filelink
Description
Take a look at the SINGLE view reference
Default
exif_size¶
Property
exif_size
Data type
stdWrap
Description
Take a look at the SINGLE view reference
Default
exif_time¶
Property
exif_time
Data type
stdWrap
Description
Take a look at the SINGLE view reference
Default
renderAllLinks¶
Property
renderAllLinks
Data type
boolean
Description
If enabled, links to all images are rendered. If you are on page 2 of 3 and you are using any lightbox, you will get all images in the lightbox presented.
Default configuration:
renderAllLinks = 1
renderAllLinks {
title.field= tx_chgalleryTitle
parameter.override.cObject = IMG_RESOURCE
parameter.override.cObject {
file.import.field = tx_chgalleryImageLong
file.maxW = 800
file.maxH = 600
}
ATagParams = rel="lightbox"
ATagParams.override = rel="lightbox[presentlb{field:uid}]"
ATagParams.insertData = 1
}
Default
0
[tsref:plugin.tx_chgallery_pi1.gallery ]
SINGLE view¶
This part of the reference is for the SINGLE view. Use plugin.tx_chgallery_pi1.single.XXX
image¶
Property
image
Data type
IMAGE
Description
Configuration of the single image
Default configuration:
file {
maxW = 554
}
Default
pass¶
Property
pass
Data type
boolean
Description
If set the current single view image is still shown if the page browser in the gallery view is used.
Default
1
download¶
Property
download
Data type
filelink
Description
Download link to the image using the TS function filelink.
Default configuration:
download {
labelStdWrap.field= tx_chgalleryTitle // tx_chgalleryFilename
icon = 1
icon_link = 1
icon {
noTrimWrap = | | |
}
size = 0
size {
noTrimWrap = | (| Bytes) |
bytes = 1
bytes.labels = | Kb| Mb| Gb
}
jumpurl = 1
jumpurl.secure = 1
}
Default
exif_size¶
Property
exif_size
Data type
stdWrap
Description
Size of the image using exif
Default configuration:
exif_size {
bytes = 1
bytes.labels = | Kb| Mb| Gb
}
Default
exif_time¶
Property
exif_time
Data type
stdWrap
Description
Date of the image using exif
Default
strftime= %d.%m.%Y %H:%m
[tsref:plugin.tx_chgallery_pi1.single ]
Available markers¶
If you want to know which markers are available take a look at the default template template.html. All markers are listed in the top of the document!
You like the extension?¶
I had much work with this extension so if you like this extension, you can do one or more of the following things:
- Write me a mail or create a posting at http://www.rggooglemap.com/dev/chgallery.html .
- Please rate the extension in the Repository: http://typo3.org/extensions/ search for chgallery, click on the title and then at “Ratings” (You need to be registered and logged in at typo3.org)
One of those things is the least you can do for getting all those great extensions completely for free!
Bugs, Features & Development¶
I try to develop this extension as active as possible. Out of this reason it is hosted at forge - http://forge.typo3.org/projects/show /extension-chgallery
If you are missing a feature or discovered a bug, please add it there!
If you want to develop the extension further, please feel free to do so, ask for participate!
Changelog¶
Read the Changelog file inside the directory or at forge http://forge.typo3.org/wiki/extension-chgallery/Changelog
EXT: chgallery - 13