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: Photo Book¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed by: | Arco van Geest |
Changed: | 2010-09-16T22:49:38.060000000 |
Author: | Arco van Geest |
Email: | arco@appeltaart.mine.nu |
Info 3: | |
Info 4: |
EXT: Photo Book¶
Extension Key: goof_photobook
Copyright 2000-2010, Arco van Geest, <arco@appeltaart.mine.nu>
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: goof_photobook 1
Introduction 1
What does it do? 1
Screenshots 1
Users manual 2
Comment plugin 2
EXIF support 2
Adminstration 2
Configuration 2
FAQ 3
Reference 3
Tutorial 3
Known problems 3
To-Do list 4
Wish list 4
Changelog 4
Introduction¶
What does it do?¶
A Gallery without the need of uploading pictures one by one.The plugin creates an on the fly gallery of all subfolders and pictures.Thumbnails and lowsize pictures are created while the original is accessable through a link.Comments are plain text files or included in the images so can be made offline or through the comment part of the plugin.Simple http slideshow so no need for fancy javascripts.
Why another gallery? I needed to put in about 15000 pictures at once so I was too lazy to do so.The previous photobook was a perl script so it was converted quite easily.
Screenshots¶
In general there are only a few screens: single, thumbnail and comment.Comment is like the single view above except the comment line is a textbox.
Users manual¶
After installing the plugin you can create page content.Choose “insert plugin” and then Photobook.
Choose either “show” “comment” for the pagefunction.Beware that comment get the right typo3 FE-user rights so only known persons can edit or clear things.
The default location for photos is uploads/fotoboek but using the path and optionally the webpath as shown below you can set it to your own directory. If both fields are empty the value in the template constants is used. The web path is needed when the path to the original image through the website is not the same as the relative path. When you dont use absolute paths or virtual directories with different names then their path leave it empty.
In the “edit constants for template” section you can set the various paths, image sizes, enable and disable options.
Best practice for multiple photobooks is:
- set the layout on the top level template.
- Only change the needed options per page with the plugin.
Comment plugin¶
This is the same as the show mode exept for the edit links near directories and edit field under the photo.Be sure to restrict access to pages with this plugin.
EXIF support¶
EXIF support for PHP internal (above PHP4.2) or external (metacam, jhead).The priority is: metacam, jhead and php-internal because the internal array is a bit unreadable for shuttertime and apperture values.
When you want to use this in safe mode create a www_bin directory and put it in your php.ini .In this directory create links to the tools you need.
When no commentfile is available and PHP-EXIFsupport is then the comment from the image is used.
Watermarks¶
If you are using image magick 4 or 5 stay away from this option because all your pictures will be 256 colors. For Image Magick 6 this option is quite neat. The watermark is only applied to the single view so disable the link to the original if you want to “protect” your photos.
Be sure that your Image Magick settings are correct or prepare for invert-a-mask-bingo....
Go to the Photobook section in the template-constant-editor
Enable watermark.
There are three files which are used for the watermark: Watermark mask file
This file is to blend out your original. Experiment with it or leave it white. If your whole photobook is in black and white convert this one into a complete black gif.
Watermark bottomimg file
This is your original watermark. For example place your text and logo in here.
Watermark bottomimg mask file
This is a grey scale mask to describe what part of the bottomimg will be shown. Copy the bottom file, convert it into grey scale and outline the whole thing with 2 pixels. In the EXT:goof_fotoboek/res is an example.
Slideshow¶
The slideshow option is off by default because it was a new option. Enable the slide show in the phtotbook section of the template- constants-editor. In the editor is also an option to set the time interval.
Accesskeys¶
Accesskeys have been added to the most important links. In Firefox ALT-<accesskey> is enough to use the link. In Internet Explorer only the link is selected by ALT-<accesskey> and another RETURN is needed.
Next +Previous -Slideshow *Home hOne level up uThumbnails t
Configuration¶
Templatefile
Sections
SINGLE = template for single picture
THUMBTPL = template for the thumbnails
DIRTITLE = Name of current directory or the comment for it.
PREV = previous button
NEXT = next button
INDEX = button to go to the root of the photobook
UP = go one level up
THUMB = thumbnails button
DIRS = list of subdirectories or their comment
IMAGE = the photo itself
TITLE = first row of the photo comment file
COMMENT = rest of the comment file
THUMBNAILS = Thumbnail images
NAVSTART = Start image of navigation bar
NAVEND = End image of navigation bar
FASTNAV = Fast navigation bar
PATH_TO_ORIGINAL = relative path to the original image
PATH_TO_SINGLE = relative path to the resized image
THUMBNAIL_IMAGE =
THUMBNAIL_COMMMENT_HEADER=
THUMBNAIL_FILESIZE=
ORIENTATION=
THUMBID=
PAGES = paged navigation
COUNT_NR = Current image number
COUNT_COUNT = total count of images in current directory
COUNT_STRING = “image # of # images”
Simulate static¶
Both simulate static and realUrl are documented in other places.I only documented these parts to save myself a lot of emails .
Below is a part of a template setup to get rid of the parameters in the url.
config.simulateStaticDocuments = 1config.simulateStaticDocuments_pEnc = md5config.simulateStaticDocuments_noTypeIfNoTitle = 1config.simulateStaticDocuments_aliasPro = 1config.simulateStaticDocuments_addTitle = 40config.simulateStaticDocuments_pEnc_onlyP (no_cache,L,cHash, back PID,tx_gooffotoboek_pi1[func],tx_gooffotoboek_pi1[fid],tx_gooffot oboek_pi1[srcdir],tx_gooffotoboek_pi1[slide],)
RealUrl¶
I just cut and paste around when using realurl. So please let me know if this is wrong.
In typo3conf/localconf.php:
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array('_DEFAULT' => array('init' => array('enableCHashCache' => true),'pagePath' => array('type' => 'user','userFunc' =>'EXT:realurl/class.tx_realurl_ad vanced.php:&tx_realurl_advanced->main','spaceCharacter' => '-','expireDays' => 3),'postVarSets' => array('_DEFAULT' => array('album' => array(array('GETvar' => 'tx_gooffotoboek_pi1[srcdir]',),),'pic' => array(array('GETvar' => 'tx_gooffotoboek_pi1[fid]'),),'func' => array(array('GETvar' => 'tx_gooffotoboek_pi1[func]','valueMap' => array('thumbnails' => 'thumb',),),),'fileName' => array ('defaultToHTMLsuffixOnPrev' => true),),);
In your template-setup put:
config.simulateStaticDocuments = 0config.baseURL = 1config.tx_realurl_enable = 1
Accesslist¶
By default everybody who has rights to see the plugin can see all directories and photos in it. To create access lists per directory you can create .access files. An .access file contains the group ids which shall have access to the photos. Each group has to be on one line in the .access file.
Example:
#.access file for personal images2 #this is the family group5 #my friends# 6 is the testersgroup6
Note: Never use this option for real security. As all files in typo3's fileadmin they can be deeplinked.
Using sr_sendcard¶
With a small workaround you can create a “send as e-card” option.
Install sr_sendcard. Create a page with sendcard as a plugin. Note the URL for accessing the sendcard page.Now edit the fotoboek.tpl and add a link in the singleview part:
<a
href="/index.php?id=25&tx_srsendcard_pi1[cmd]=prompt&tx_srsendcard_pi1[card_caption]=foto:berlinVR.de&tx_srsendcard_pi1[cardaltText]=foto:berlinVR.de&tx_srsendcard_pi1[card_image]=&tx_srsendcard_pi1[card_image_path]=###PATH_TO_SINGLE###&tx_srsendcard_pi1[image_width]=[image_width]&tx_srsendcard_pi1[image_height]=[image_height]&tx_srsendcard_pi1[selection_image]=&tx_srsendcard_pi1[selection_imagealtText]=foto:berlinVR.de">Bild
als kostenlose E-Card an Freunde verschicken</a>
You probably need to remove all width and height tags in the sendcard template.
A real implementation of sr_sendcard is on the wishlist.
FAQ¶
Q: I see navigation but no pictures are rendered.A: In most cases there is something wrong with image magick. Be sure that image magick works in the install tool.
Hints: In the installtool go to “basic configuration”, look if there is an image magick entry and press save. Also check the typo3temp directory for ownership and rights.
Q: I see no navigation and or pictures are missing.A: Check file permissions. Try to access the image by a direct URL like http://mysite/fileadmin/fotobook/subdir/mycat.jpg .
Q: Why is it that only directories under uploads or fileadmin work?A: If you want to use archives outside the fileadmin-structure as I did you will have to add the path you use (a relative path to the site- root-dir) to the addAllowedPath list. You can find it in your install- tool under [FE][addAllowedPaths]. (Thnx prinsarian)
Q: the comment mode seems to forget my comments.A: check file permissions on the photobook directories. The webserver needs write access to it.
Reference¶
plugin.tx_gooffotoboek_pi1.
Webpath¶
Property
Webpath
Data type
text
Description
Path to photos via webserver.
Default
Uploads/fotoboek
Path¶
Property
Path
Data type
text
Description
Path to photos on server.
Default
Uploads/fotoboek
templateFile¶
Property
templateFile
Data type
text
Description
Template file.
Default
EXT:goof_fotoboek/fotoboek.tpl
thumb_maxw¶
Property
thumb_maxw
Data type
int
Description
Max width of thumbnail.
Default
100
thumb_maxh¶
Property
thumb_maxh
Data type
int
Description
Max height of thumbnail.
Default
100
img_maxw¶
Property
img_maxw
Data type
int
Description
Max width of an image
Default
600
img_maxh¶
Property
img_maxh
Data type
Int
Description
Max height of an image.
Default
375
img_index_on¶
Property
img_index_on
Data type
text
Description
Image of index enabled. The index is the root of the photobook.
Default
EXT:goof_fotoboek/res/index_on.gif
img_index_off¶
Property
img_index_off
Data type
text
Description
Image of index when disabled.
Default
EXT:goof_fotoboek/res/index_off.gif
img_up_on¶
Property
img_up_on
Data type
text
Description
Image of 'up one directory' when enabled
Default
EXT:goof_fotoboek/res/up_on.gif
img_up_off¶
Property
img_up_off
Data type
text
Description
Image of 'up one directory' when disabled
Default
EXT:goof_fotoboek/res/up_off.gif
img_thumb_on¶
Property
img_thumb_on
Data type
text
Description
Image of 'show thumbnail view' when enabled
Default
EXT:goof_fotoboek/res/thumb_on.gif
img_thumb_off¶
Property
img_thumb_off
Data type
text
Description
Image of 'show thumbnail view' when disabled
Default
EXT:goof_fotoboek/res/thumb_off.gif
img_prev_on¶
Property
img_prev_on
Data type
text
Description
Image of 'show previous photo' when enabled
Default
EXT:goof_fotoboek/res/prev_on.gif
img_prev_off¶
Property
img_prev_off
Data type
text
Description
Image of 'show previous photo' when disabled
Default
EXT:goof_fotoboek/res/prev_off.gif
img_next_on¶
Property
img_next_on
Data type
text
Description
Image of 'show next photo' when enabled
Default
EXT:goof_fotoboek/res/next_on.gif
img_next_off¶
Property
img_next_off
Data type
text
Description
Image of 'show next photo' when disabled
Default
EXT:goof_fotoboek/res/next_off.gif
img_slide_start¶
Property
img_slide_start
Data type
text
Description
Image of 'start slideshow'
Default
EXT:goof_fotoboek/res/slidestart.gif
img_slide_stop¶
Property
img_slide_stop
Data type
text
Description
Image of 'stop slideshow' during slideshow
Default
EXT:goof_fotoboek/res/slidestop.gif
slidetime¶
Property
slidetime
Data type
int
Description
Http refresh time between slides in slideshow mode
Default
6
img_spacer¶
Property
img_spacer
Data type
text
Description
Image between navigation options in the navigationbar
Default
EXT:goof_fotoboek/res/spacer.gif
thumb_per_row¶
Property
thumb_per_row
Data type
int
Description
Amount of thumbnails on a row
Default
6
thumb_rows¶
Property
thumb_rows
Data type
int
Description
Amount of rows in thumbnail view.
Default
5
thumb_wrap¶
Property
thumb_wrap
Data type
wrap
Description
Wrap around a single thumbnail. ###orientation### is set to square, landscape, portret and empty.
Default
<td class="gfpb_###orientation###" width="55px">|</td>
thumb_row_wrap¶
Property
thumb_row_wrap
Data type
wrap
Description
Wrap around a complete row of thumbnails.
Default
<tr>|</tr>
dir_wrap¶
Property
dir_wrap
Data type
wrap
Description
Wrap arount complete directory entry.
Default
|<br />
dir_title_wrap¶
Property
dir_title_wrap
Data type
wrap
Description
Wrap around the directory title.
Default
<h1>|</h1>
dir_comment_wrap¶
Property
dir_comment_wrap
Data type
wrap
Description
Wrap arount directory comment.
Default
<small> |</small><br />
dir_all_comment_wrap¶
Property
dir_all_comment_wrap
Data type
wrap
Description
Wrap arount complete directory comment.
Default
|
dir_link_wrap¶
Property
dir_link_wrap
Data type
Description
Wrap arount directory link.
Default
<small><b>|</b></small><br />
image_wrap¶
Property
image_wrap
Data type
wrap
Description
Wrap around the image in single view.
Default
<div>|</div>
comment_title_wrap¶
Property
comment_title_wrap
Data type
wrap
Description
Wrap arount comment titles.
Default
<b>|</b><br />
comment_wrap¶
Property
comment_wrap
Data type
wrap
Description
Wrap arount comment.
Default
|<br />
txt_spacer¶
Property
txt_spacer
Data type
text
Description
Spacer used in navigation bar when icons are disabled
Default
icons¶
Property
icons
Data type
boolean
Description
Graphic icons enabled.
Default
1
default_thumb¶
Property
default_thumb
Data type
boolean
Description
Start with thumbnailview.
Default
0
no_full¶
Property
no_full
Data type
boolean
Description
Link to original picture disabled.
Default
0
user_full¶
Property
user_full
Data type
Boolean
Description
Enable link for registered users
Default
0
debug¶
Property
debug
Data type
boolean
Description
Debugging enabled, dumps all sort of arrays and options.
Default
0
slideshow¶
Property
slideshow
Data type
boolean
Description
Enable slideshow options (could be default on in the feature)
Default
0
show_exif¶
Property
show_exif
Data type
boolean
Description
Show (selected) exif information when available.
Default
0
show_exif_all¶
Property
show_exif_all
Data type
boolean
Description
Dump all the exif you can find.
Default
0
exif_metacam¶
Property
exif_metacam
Data type
text
Description
Path to metacam binary, needed for EXIF support on older PHP versions. (priority: metacam, jhead, php internal. Corrupt these if you still want the next option in the priority list)
Default
/usr/bin/metacam
exif_jhead¶
Property
exif_jhead
Data type
text
Description
Path to jhead binary, needed for EXIF support on older PHP versions.
Default
/usr/bin/jhead
exif_all_wrap¶
Property
exif_all_wrap
Data type
wrap
Description
Wrap around exif info.
Default
<table class="exif"><tr><th colspan="2">EXIF info</th></tr>|</table>
exif_tag_wrap¶
Property
exif_tag_wrap
Data type
wrap
Description
Wrap around exif tag name.
Default
<tr><td>|</td>
exif_value_wrap¶
Property
exif_value_wrap
Data type
wrap
Description
Wrap around exif value.
Default
<td>|</td></tr>
noresize¶
Property
noresize
Data type
boolean
Description
No resizing of pictures (needed when IM or GD is troubling you).
Default
0
loadnext¶
Property
loadnext
Data type
boolean
Description
Try to (pre)load the next page (sometimes a boost, sometimes not).
Default
1
disable_dircomment¶
Property
disable_dircomment
Data type
boolean
Description
Disable creation of directory comments. (the existing ones will still be shown)
Default
0
rev_sort_root¶
Property
rev_sort_root
Data type
boolean
Description
Reverse sort directories in the root of the photobook.(handy for years)
Default
0
rev_sort_dirs¶
Property
rev_sort_dirs
Data type
boolean
Description
Reverse sort directories except the root of the photobook.
Default
0
rev_sort_files¶
Property
rev_sort_files
Data type
boolean
Description
Reverse sort photos in the photobook.
Default
0
use_anchor¶
Property
use_anchor
Data type
boolean
Description
Anchor. Jump to the right place when the photobook is on a large page.
Default
0
thumb_filenames¶
Property
thumb_filenames
Data type
boolean
Description
Show filename in thumbnailview.
Default
0
watermark¶
Property
watermark
Data type
boolean
Description
Enable watermark. (in single view only so disable the original with the no_full boolean). Use only from IM6 to avoid 256 colors.
Default
0
watermark_mask¶
Property
watermark_mask
Data type
text
Description
Watermark grey scale mask file. (mask the original photo).
Default
EXT:goof_fotoboek/res/watermark_mask.gif
watermark_bottomimg¶
Property
watermark_bottomimg
Data type
text
Description
This is the watermark/logo file.
Default
EXT:goof_fotoboek/res/watermark_bottomimg.gif
watermark_bottomimg_mask¶
Property
watermark_bottomimg_mask
Data type
text
Description
Watermark bottomImg_mask file is a greyscale mask which describes what to show from the bottomimg.
Default
EXT:goof_fotoboek/res/watermark_bottomimg_mask.gif
comment_languages¶
Property
comment_languages
Data type
text
Description
Space seperated languages. Only for adding comments.
Default
nl de fr
fill_thumb_page¶
Property
fill_thumb_page
Data type
boolean
Description
Try to fill out thumbnail pages (otherwise all thumbnail pages have a fixed start.)
Default
0
useThumbnailTemplate¶
Property
useThumbnailTemplate
Data type
boolean
Description
Use the thumbnail template in the templatefile. The rowwrap is still used. (could becomde default in the future)
Default
0
be_comment_list¶
Property
be_comment_list
Data type
text
Description
Back end edit list (space separated back end usernames, 'any'=any be user, empty is disabled)
Default
fe_comment_list¶
Property
fe_comment_list
Data type
text
Description
Front end edit list (space separated front end group NUMBERS, 'any'=any group,empty is disabled)
Default
patchAltTag¶
Property
patchAltTag
Data type
Boolean
Description
Needed for languages like russian and polish
Default
1
thumbIMoptions¶
Property
thumbIMoptions
Data type
text
Description
Extra ImageMagick options for thumbcreation
Default
thumbIMsample¶
Property
thumbIMsample
Data type
Boolean
Description
Speed up IM
Default
1
singleIMoptions¶
Property
singleIMoptions
Data type
text
Description
Extra ImageMagick options for singleview creation
Default
CombinedView¶
Property
CombinedView
Data type
boolean
Description
Combine thumbnails and singleview in one
Default
0
autorotate¶
Property
autorotate
Data type
boolean
Description
Rotate automaticly if orientation is in the exif information.
Default
1
Tutorial¶
How to make multi directory photobook¶
Create a directory under fileadmin, say photobook.Create a few directories like birthday, hollyday, christmas and mypet.Upload images in these directories.Create a page in your typo3 site where you want the pictures to show up.Insert the plugin on that page (show mode)(for details on inserting the plugin on a page, see the user section)Look at it! 8-)
Adding comments¶
The mypet directory name is stupid, I want 'My beloved pet', create a textfile mypet.txt in the directory where the directory is and put 'My beloved pet' in it. If you have any comment on your pet directory then start that on the second line.
For photos you have some more options. You can create a textfile for your photo like we did for the mypet directory. If my photo was called fluffy.jpg its commentfile would be fluffy.txt. When using EXIF you can put the comment direct in the jpg with exif tools or even with XP file properties.
Another option is to add a page, protected with a login ofcourse, which contains the plugin in comment mode.
Known problems¶
Safe mode disables exif and resize.
- Sometimes the path through “insert plugin” doesn't reach the database.
- Some PHP versions have exif/mbstring problems and show only the first characters of the Title and Comment tags.
- Watermarks do not work with Graphicsmagick (yet)
To-Do list¶
- easier cache cleanup, aging? (not needed if typo3 cache works fine)
- 0 for maximum sizes forces no resize.
- test read rights and write rights.esp at writing comments
- when rendering fails a 'failed to render' image should be shown.
Wish list¶
- vote option
- Sort on time (strange sorting behaviour when a file is edited)
- Pixalized fadeovers (IE only.... 8-( )
- Index search should see the comments (much work)
- backend comment module
- Backend precache module (probably wget or curl construction) (I still have a problem with getting the template settings for a page.)
- thumbed teasers/directories using teaser or first picture.
- real implementation of sr_sendcard
- combined thumbnail/single view (need frames?)
- frontend plugin
- integration with YAML.
- caching of exif and comments.
- basket option
- auto clean for basket
- update manual
- split extension into doc, mod and backend
- use filename without extension as title in singleview.
- For SEO purposes it would be nice to have the picture filename or comment as URL instead of just the FID (number). Could you write a function (userFunc) for realURL to do this?
Is it possible to place a HTML LINK in the "comment textfiles"? I´ve read that former versions of your extension got that functionality. Or is it possible to manage that via Typoscript?
Changelog¶
moved changelog completely to EXT:changelog.txt