Zum Inhalt springen

pmkslimbox manuel einbinden

Erstellt am 6. Mai 2010 · 2 Antworten · letzte Antwort am 6. Mai 2010

Tags: Frage

DarkNemesis ·

Ich habe die pmkslimbox manuel eingebunden sprich nicht über das template, leider funktioniert die Lightbox so nur in der chgallery nicht in den tt_news oder anderen contentseiten.

Was müsste man ausser den unten aufgeführten Code noch ändern?

page = PAGE
page {
  typeNum = 0
  stylesheet = fileadmin/includes/style.css
  shortcutIcon = fileadmin/images/favicon.ico

  10 < temp.mainTemplate
  1000 < plugin.tx_monoga_pi1

  includeCSS.file41 = typo3conf/ext/pmkslimbox/res/styles/slimbox.css
  includeCSS.file42 = EXT:rgaccordion/res/rgaccordion1.css
  includeJS.file51  = typo3conf/ext/t3mootools/res/mootools_v1.2.1.js
  includeJS.file52  = typo3conf/ext/pmkslimbox/res/scripts/slimbox.js
  includeJS.file53  = EXT:rgaccordion/res/rgaccordion1.js

  headerData.1145 = TEXT
  headerData.1145.value (
    <script type="text/javascript">
    /*<![CDATA[*/
    <!--
    Slimbox.scanPage = function() {var links = $$("a").filter(function(el) {return el.rel && el.rel.test(/^lightbox/i);});$$(links).slimbox({resizeDuration: 400, resizeTransition: Fx.Transitions.Sine.easeInOut, opacity: 0.8, opacityDuration: 500, loop: 1, initialWidth: 250, initialHeight: 250, animateCaption: 1, showCounter: 1, enablePrintButton: 0, enableSaveButton: 0,counterText: 'Seite  {x} von {y}', psScriptPath: 'typo3conf/ext/pmkslimbox/savefile.php'}, null, function(el) {return (this == el) || ((this.rel.length > 8-) && (this.rel == el.rel));});};window.addEvent("domready", Slimbox.scanPage);
    // -->
    /*]]>*/
    </script>
  )
}

Hintergrund der Aktion ist, dass ich im Quellcode x mal Mootools und Co. eingebunden hatte von den verschiednsten EXT und ich es deshalb lieber manuel machen möchte. Leider haben nicht alle EXT die Option es per TS auszuschalten 🙁

DarkNemesis ·

In die tt_news hab ich es bereits bekommen. Nun fehlt es nur noch in den Standard Typo Galerien.

Bei den tt_news hat folgendes geholfen:

temp.imageLinkWrap = 1
temp.imageLinkWrap {
  enable = 1
  # Add new typolink wrapping code
  typolink {
    # Set the title of the A tag, which is used as caption inside the Lightbox
    title.field = {$plugin.pmkslimbox.tt_news.captionField}
    title.split.token.char = 10
    title.split.returnKey.data = register : IMAGE_NUM_CURRENT
    # This returns a link, pointing to the path + name of the original image.
    # or to the path + name of the resized lightbox image (if maxH or maxW is reached.)
    parameter.cObject = IMG_RESOURCE
    parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile
    parameter.cObject.file.maxW = {$plugin.pmkslimbox.slimBoxMaxW}
    parameter.cObject.file.maxH = {$plugin.pmkslimbox.slimBoxMaxH}
    # Add the "rel" attribute needed to activate the lightbox effect.
    ATagParams = rel="lightbox"
    ATagParams.override = rel="lightbox[sb{field:uid}]"
    ATagParams.override.if.isTrue = {$plugin.pmkslimbox.tt_news.navigable}
    ATagParams.insertData = 1
  }
}

plugin.tt_news.displayList.image.imageLinkWrap >
plugin.tt_news.displayList.image.imageLinkWrap < temp.imageLinkWrap
plugin.tt_news.displaySingle.image.imageLinkWrap >
plugin.tt_news.displaySingle.image.imageLinkWrap < temp.imageLinkWrap

Wie würde das adequat zum rest aussehen?

Link: http://www.digitale-fotografien.com/geschaeftskunden/messefotografie/