[TYPO3-content-rendering] accessible popup-image

JoH info at cybercraft.de
Wed Aug 10 12:53:34 CEST 2005


> is there a way... or should i workout a way to provide accessible pop
> images for zooming the pics inside typo3 frontend? the way it is done
> by now... with this kind of javascript isnt accessible anymway... it
> has to be a link (with the possibility for a blank attribut and the
> linkname has to be the imagename or onother page like popup.html or
> zoompic.php... so if someone has javascript deactivated he could
> always open the pic in a new window... (ok... because of the _blank
> or _self attribut it is only xhtml-transitional) a codesnippet for
> this could be:
>
> javascript could be:
>
> <!-- function popup(url)
> {
>
window.open(url,'_blank','scrollbars=yes,resizable=yes,status=no,location=no
,toolbar=no,directories=no,menubar=no,copyhistory=no,width=744,height=584');
> }
> //-->
>
> html of the zomm image link could be:
>
> <a href="zoompic.php?currentpic=pic.jpg" target="_blank"
> onclick="popup('zoompic.php?currentpic=pic.jpg');return false;"
> title="zoom picture: opens in a new window"><img class="img-class"
> src="images/pic.jpg" alt="the pics alttext" /></a>
>
> this would be a very nice step to more accessibility of the zoompic
> function...
>
> ok... I now, that this is not possible by now... but is there a way to
> handle this problem?

tt_content.image.20.1.imageLinkWrap.JSwindow = 0
tt_content.image.20.1.imageLinkWrap.wrap >

The first line will have TYPO3 open the image directly without using
showpic.php and the JS-based Popup-Window.
You will still be able to resize the image using width and height values.
But you can't make the window fit the image size and it will contain all the
Status-, Symbol- and Explorer-Bars.
The second line will remove the closing JS-function wrapped around the
image.

You might use a JS-based redirect function to set a GET parameter that you
can use for a condition later on.
If the redirect worked (meaning JS is enabled) you set something like
&JSenabled = 1
if not you leave the URL as is.

You will have to add the parameter to config.linkVars to keep it all over
the site.

Then you could do something like this:

[globalVar = JSenabled = 1]
[else]
tt_content.image.20.1.imageLinkWrap.JSwindow = 0
tt_content.image.20.1.imageLinkWrap.wrap >
[global]

Not tested but should be working

Joey





More information about the TYPO3-project-content-rendering mailing list