Typo3: goof_fotoboek and CoolURI
I integrated the Photo Book (goof_fotoboek) extension in one of my Typo3 sites, because I wanted a simple and reliable little gallery function. It works very well if you like managing your files and directories manually - and has some nice (including watermark) option to secure your images decently.
Now there was, which is the case with many extensions, the problem of ugly URLs/URIs.
Using CoolURI I didn't find it acceptable to have variables posted all over my address bar, so I came up with a little fix for CoolURI. Simply insert the following lines into the <uriparts> section of your CoolUriConf.xml file:
<part>
<parameter>tx_gooffotoboek_pi1[srcdir]</parameter>
</part>
<part>
<parameter>tx_gooffotoboek_pi1[fid]</parameter>
</part>
<part>
<parameter>tx_gooffotoboek_pi1[func]</parameter>
</part>
It should look something like this then:
<uriparts>
<part>
<parameter>tx_ttnews[tt_news]</parameter>
<lookindb>
<to>SELECT title FROM tt_news WHERE uid=$1</to>
<translatetoif>
<match>^[0-9]+$</match>
</translatetoif>
<t3conv>1</t3conv>
</lookindb>
</part>
<part>
<parameter>tx_eeblog[showUid]</parameter>
<lookindb>
<to>SELECT subject FROM tx_eeblog_maintable WHERE uid=$1</to>
<translatetoif>
<match>^[0-9]+$</match>
</translatetoif>
<t3conv>1</t3conv>
</lookindb>
</part>
<part>
<parameter>tx_gooffotoboek_pi1[srcdir]</parameter>
</part>
<part>
<parameter>tx_gooffotoboek_pi1[fid]</parameter>
</part>
<part>
<parameter>tx_gooffotoboek_pi1[func]</parameter>
</part>
</uriparts>
That's it, now your URIs should look like this:
/photogallery/Album/1/thumb.html
/photogallery/Album/1.html
The RealURL Setup would look something like this (taken from the CoolURI tutorial actually):
'postVarSets' => array(
'_DEFAULT' => array (
'photobook' => array(
array('GETvar' => 'tx_gooffotoboek_pi1[srcdir]'
),
array(
'GETvar' => 'tx_gooffotoboek_pi1[fid]'
),
array(
'GETvar' => 'tx_gooffotoboek_pi1[func]',
'valueMap' => array(
'thumbnails' => 'thumb',
),
),
),
),
)
Good luck. :)





Post new comment