[TYPO3] concept for the development of a new photobook extension

Luc Franken [TenToday] typo3 at tentoday.com
Tue May 23 15:16:32 CEST 2006


Allright, under the name of "Just do it!" I created an extension called 
tx_photobook. When you install the extension (always locally, not 
global!) nothing happens. But when you add this into the setup part of 
your template the images will become a photogallery with nice lightbox 
popups and next/previous buttons!

Currently it is just in test phase for me but it works correctly. In a 
while I will develop it further and add some documentation and nice 
features to it!

The TS setup:
_______________________________________________________________________
page.headerData.678 = HTML
page.headerData.678.value = <script type="text/javascript" 
src="typo3conf/ext/photobook/pi1/lightbox/js/prototype.js"></script><script 
type="text/javascript" 
src="typo3conf/ext/photobook/pi1/lightbox/js/scriptaculous.js?load=effects.js"></script><script 
type="text/javascript" 
src="typo3conf/ext/photobook/pi1/lightbox/js/lightbox.js"></script><link 
rel="stylesheet" type="text/css" 
href="typo3conf/ext/photobook/pi1/lightbox/css/lightbox.css">

# configure the photobook extension
plugin.tx_photobook {
	#this is the configuration for the big image
	bImage.file {
		maxW = 500
		maxH = 400
	}
	# some basic styles for use with the photobook, can be removed by some 
typoscript like: plugin.tx_photobook._CSS_DEFAULT_STYLE >
	# nice for testing for me ;)
	_CSS_DEFAULT_STYLE (
		ul.tx-photobook-album {
			width: 500px;
			list-style-type: none;
		}
		ul.tx-photobook-album li {
			float: left;
		}
		br.tx-photobook-clearer {
			clear: both;
		}
	)
}

# include the php script which handles the photobook
includeLibs.imageMarkerFunc = EXT:tx_photobook/pi1/tx_photobook_pi1.php

# configure tt_news to use the tx_photobook extension as image parser
plugin.tt_news {
	# call user function
	imageMarkerFunc = tx_photobook_imageProcess
	
	# configure the singleView to show in photobookstyle
	displaySingle {
		# load the photobook configuration
		confPhotobook < plugin.tx_photobook
		
		imageWrapIfAny = <!-- PHOTOBOOK created by extension: tx_photobook ! 
--><ul class="tx-photobook-album"> | </ul><br class="tx-photobook-clearer">
		imageWrap = <li> | </li>
		image.imageLinkWrap >

	}
	
	# remove the default styles
	_CSS_DEFAULT_STYLE (
	)
}
_______________________________________


Hope it will be usefull to some of you!


Best regards,

Luc Franken

p.s. it is not available on Typo3.org but when you look with the 
extension manager you can download it. Something strange with the new 
typo3.org I think..



Luc Franken [TenToday] schreef:
> Hello Bernard,
> 
> Thanks for your reply! Unfortunately your extension is not available in 
> the extension repository so I can't take a look at it!
> 
> Best regards,
> 
> Luc Franken
> 
> 
> Bernhard Kraft schreef:
>> Luc Franken [TenToday] wrote:
>>
>>> - No possibility to add other content to the photobook. Well, some
>>> extensions like goof_photobook let you create a textfile, which you have
>>> to upload, and then it is possible to add some comments which is not
>>> user friendly.
>>
>> I also made an extension "kb_yag" (Yet another gallery) which features 
>> the same
>> concept of goof-fotobook to store "metadata" with each image ...
>>
>> I did it more like DAM is doing it by saving the metadata in the 
>> database ...
>>
>> But differently to DAM I do not identify an image-file by its 
>> location/path but
>> rather by a md5-sum of the first 200KB of the file :)
>>
>> The advantage is that you can move files in the gallery around and 
>> they still keep
>> their meta-information.
>>
>> The drawback is that you can't have the same image twice on the site 
>> with different
>> metadata ...
>>
>>
>> The complete output is completly configurable via TypoScript so you 
>> can easialy scale
>> the image down or create click-enlarge links ...
>>
>>
>> The company where it got used connected it to tt_news by creating a 
>> page which contains
>> the images for the specific news (by setting the fileadmin path to the 
>> location the images
>> reside) and then entering a Link to this page manually into the news 
>> ... this could get
>> improved by adding a field to tt_news - but this is rather application 
>> specific and can
>> change from site to site (Once you want tt_news to relate to galleries 
>> - next time extension
>> tx_somewhat)
>>
>>
>>
>> greets,
>> Bernhard



More information about the TYPO3-english mailing list