Posts Tagged ‘pmkshadowbox’
pmkshadowbox Typo3 4.3
5 Comments | This entry was posted on Jan 22 2010
Kaum ist wie unten beschrieben eine neue Typo3-Version da gibt es auch schon ein paar Probleme…
Jeder der die tolle pmkshadowbox (link) nutzt wird beim neuen Typo3 4.3.x ein wenig erstaunt sein…
denn es läuft nicht mehr richtig.
Wieso?
>> in TYPO3 wurde etwas umbenannt und daher griff eine Bedingung im TypoScript nicht mehr richtig. Aus page.inlineJS ist page.jsInline geworden.
Hilfe?
Ja durch eine Modifikation im TypoScript ist es möglich den kleinen Bug zu beheben.
Siehe unten dazu
Bitte dies Script als erweiterungs Template eintragen. Unter Setup
TypoCode für Version 4.3.x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # pmkShadowbox Typo3 4.3.x # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # adding the initialisation code as inlineJS # the option was introduced in 4.2.0 [compatVersion = 4.3.0] page.jsInline.1230 < temp.shadowBoxInit [else] page.headerData.1230.10 < temp.shadowBoxInit page.headerData.1230.10.wrap2 ( <script type="text/javascript"> /*<![CDATA[*/ <!-- | // --> /*]]>*/ </script> ) [end] |
Kompletter Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | # Generate inline initialisation code temp.shadowBoxInit = TEXT temp.shadowBoxInit { # check if the setup code should be skipped if.isFalse = {$plugin.pmkshadowbox.skipSetup} # image map initialisation value ( }); var shadowBoxElements = document.getElementsByTagName('area'); if (shadowBoxElements.length) { Shadowbox.setup(shadowBoxElements, {{$plugin.pmkshadowbox.imageMapOptions}}); } ) # no value if the imagemap setup stuff should be skipped override = }); override.if.isTrue = {$plugin.pmkshadowbox.skipImageMapSetup} # add shadowbox main initialisation wrap ( if (0) {} // js minifcation workaround (jsmin) function shadowBoxInit() { Shadowbox.init({ | } if (window.addEventListener) { window.addEventListener('load', shadowBoxInit, false); } else if (window.attachEvent) { window.attachEvent('onload', shadowBoxInit); } ) stdWrap.dataWrap ( animate: {$plugin.pmkshadowbox.animate}, animateFade: {$plugin.pmkshadowbox.animateFade}, modal: {$plugin.pmkshadowbox.modal}, autoplayMovies: {$plugin.pmkshadowbox.autoplayMovies}, showMovieControls: {$plugin.pmkshadowbox.showMovieControls}, displayNav: {$plugin.pmkshadowbox.displayNav}, continuous: {$plugin.pmkshadowbox.continuous}, displayCounter: {$plugin.pmkshadowbox.displayCounter}, enableKeys: {$plugin.pmkshadowbox.enableKeys}, initialWidth: {$plugin.pmkshadowbox.initialWidth}, initialHeight: {$plugin.pmkshadowbox.initialHeight}, counterLimit: {$plugin.pmkshadowbox.counterLimit}, viewportPadding: {$plugin.pmkshadowbox.viewportPadding}, resizeDuration: {$plugin.pmkshadowbox.resizeDuration}, fadeDuration: {$plugin.pmkshadowbox.fadeDuration}, slideshowDelay: {$plugin.pmkshadowbox.slideshowDelay}, overlayOpacity: {$plugin.pmkshadowbox.overlayOpacity}, animSequence: '{$plugin.pmkshadowbox.animSequence}', counterType: '{$plugin.pmkshadowbox.counterType}', handleOversize: '{$plugin.pmkshadowbox.handleOversize}', handleUnsupported: '{$plugin.pmkshadowbox.handleUnsupported}', handleException: {$plugin.pmkshadowbox.handleException}, onOpen: {$plugin.pmkshadowbox.onOpen}, onFinish: {$plugin.pmkshadowbox.onFinish}, onChange: {$plugin.pmkshadowbox.onChange}, onClose: {$plugin.pmkshadowbox.onClose}, overlayColor: '{$plugin.pmkshadowbox.overlayColor}', flashBgColor: '{$plugin.pmkshadowbox.flashBgColor}', flvPlayer: '{path:{$plugin.pmkshadowbox.flvPlayer}}', iframeScrolling: '{$plugin.pmkshadowbox.iframeScrolling}' ) } # adding the initialisation code as inlineJS # the option was introduced in 4.2.0 [compatVersion = 4.3.0] page.jsInline.1230 < temp.shadowBoxInit [else] page.headerData.1230.10 < temp.shadowBoxInit page.headerData.1230.10.wrap2 ( <script type="text/javascript"> /*<![CDATA[*/ <!-- | // --> /*]]>*/ </script> ) [end] |
