Zum Inhalt springen

pmkshadowbox läuft nicht

Erstellt am 21. Januar 2010 · 2 Antworten · letzte Antwort am 22. Januar 2010

Tags: Frage

marcfinnern ·

Hallo liebe Gemeinde,
ich habe Typo3 4.3.0 & Typo3 4.3.1 mit der Shadowbox ausprobiert,
jedoch scheint diese nicht mehr zu funktionieren.

Hat jemand ein Rat wieso?

karlchen ·

ich hatte das gleiche Problem, in TYPO3 wurde etwas umbenannt und daher griff eine Bedingung im TypoScript nicht mehr richtig.

Aus page.inlineJS ist page.jsInline geworden

ich habe daher Konfiguration leicht verändert und überschreibe Sie mit einem eigenen TypoScript Template.

Hier der Code dazu

# 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]