/**
  * Adds T3Jquery as Lib
  * @param string color 
  * @param string delta	
  */
 public function render()
 {
     // checks if t3jquery is loaded
     if (t3lib_extMgm::isLoaded('t3jquery')) {
         require_once t3lib_extMgm::extPath('t3jquery') . 'class.tx_t3jquery.php';
     }
     // if t3jquery is loaded and the custom Library had been created
     if (T3JQUERY === true) {
         tx_t3jquery::addJqJS();
     }
     return '';
 }
 /**
  * Parse all images into the template
  * @param $data
  * @return string
  */
 public function parseTemplate($dir = '', $onlyJS = false)
 {
     $this->pagerenderer = t3lib_div::makeInstance('tx_imagecarousel_pagerenderer');
     $this->pagerenderer->setConf($this->conf);
     // define the directory of images
     if ($dir == '') {
         $dir = $this->imageDir;
     }
     // define the contentKey if not exist
     if ($this->getContentKey() == '') {
         $this->setContentKey($this->extKey . '_key');
     }
     // define the jQuery mode and function
     if ($this->conf['jQueryNoConflict']) {
         $jQueryNoConflict = "jQuery.noConflict();";
     } else {
         $jQueryNoConflict = "";
     }
     preg_match("/^([0-9]*)/i", $this->conf['imagewidth'], $reg_width);
     preg_match("/^([0-9]*)/i", $this->conf['imageheight'], $reg_height);
     $css_width = is_numeric($reg_width[1]) ? $reg_width[1] . "px" : $this->conf['imagewidth'];
     $css_height = is_numeric($reg_height[1]) ? $reg_height[1] . "px" : $this->conf['imageheight'];
     // define the js files
     $this->pagerenderer->addJsFile($this->conf['jQueryCloudCarousel']);
     // get the options from config
     $options = array();
     if (is_numeric($this->conf['minScale'])) {
         $options[] = "minScale: {$this->conf['minScale']}";
     }
     if (is_numeric($this->conf['reflHeight'])) {
         $options[] = "reflHeight: {$this->conf['reflHeight']}";
     }
     if (is_numeric($this->conf['reflGap'])) {
         $options[] = "reflGap: {$this->conf['reflGap']}";
     }
     if (is_numeric($this->conf['reflOpacity'])) {
         $options[] = "reflOpacity: {$this->conf['reflOpacity']}";
     }
     if (is_numeric($this->conf['xRadius'])) {
         $options[] = "xRadius: {$this->conf['xRadius']}";
     }
     if (is_numeric($this->conf['yRadius'])) {
         $options[] = "yRadius: {$this->conf['yRadius']}";
     }
     $options[] = "xPos: " . (is_numeric($this->conf['xPos']) ? $this->conf['xPos'] : intval($this->conf['carouselwidth'] / 2));
     $options[] = "yPos: " . (is_numeric($this->conf['yPos']) ? $this->conf['yPos'] : intval($this->conf['carouselheight'] / 2) - $this->conf['reflHeight']);
     if (is_numeric($this->conf['speed'])) {
         $options[] = "speed: {$this->conf['speed']}";
     }
     if ($this->conf['FPS'] > 0) {
         $options[] = "FPS: {$this->conf['FPS']}";
     }
     if ($this->conf['autoRotate']) {
         $options[] = "autoRotate: '{$this->conf['autoRotate']}'";
     }
     if (is_numeric($this->conf['autoRotateDelay'])) {
         $options[] = "autoRotateDelay: {$this->conf['autoRotateDelay']}";
     }
     if ($this->conf['mouseWheel']) {
         $options[] = "mouseWheel: true";
     }
     if ($this->conf['bringToFront']) {
         $options[] = "bringToFront: true";
     }
     if ($this->conf['buttonLeft']) {
         $options[] = "buttonLeft: jQuery('#{$this->getContentKey()}-left')";
     }
     if ($this->conf['buttonRight']) {
         $options[] = "buttonRight: jQuery('#{$this->getContentKey()}-right')";
     }
     if ($this->conf['titleBox']) {
         $options[] = "titleBox: jQuery('#{$this->getContentKey()}-alt')";
     }
     if ($this->conf['altBox']) {
         $options[] = "altBox: jQuery('#{$this->getContentKey()}-title')";
     }
     // checks if t3jquery is loaded
     if (T3JQUERY === TRUE) {
         tx_t3jquery::addJqJS();
         if ($this->conf['mouseWheel'] && class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger($this->pagerenderer->getExtensionVersion('t3jquery')) <= 1010003) {
             $this->pagerenderer->addJsFile($this->conf['jQueryMouseWheel']);
         }
     } else {
         $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
         if ($this->conf['mouseWheel']) {
             $this->pagerenderer->addJsFile($this->conf['jQueryMouseWheel']);
         }
     }
     $this->pagerenderer->addJS($jQueryNoConflict . "\njQuery(document).ready(function() {\n\tjQuery('#{$this->getContentKey()}').CloudCarousel(" . (count($options) ? "{\n\t\t" . implode(",\n\t\t", $options) . "\n\t}" : "") . ");\n});");
     $this->pagerenderer->addCSS("\n#{$this->getContentKey()} {\n\twidth: {$this->conf['carouselwidth']}px;\n\theight: {$this->conf['carouselheight']}px;\n\toverflow: scroll;\n\tdisplay: hidden\n}");
     // Add the ressources
     $this->pagerenderer->addResources();
     if ($onlyJS === true) {
         return true;
     }
     $return_string = NULL;
     $images = NULL;
     $descriptions = NULL;
     $navigation = NULL;
     $markerArray = array('BUTTON_LEFT' => NULL, 'BUTTON_RIGHT' => NULL, 'TITLE_BOX' => NULL, 'ALT_BOX' => NULL, 'DESCRIPTIONS' => NULL);
     $GLOBALS['TSFE']->register['key'] = $this->getContentKey();
     $GLOBALS['TSFE']->register['imagewidth'] = $this->conf['imagewidth'];
     $GLOBALS['TSFE']->register['imageheight'] = $this->conf['imageheight'];
     $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = 0;
     if (count($this->images) > 0) {
         foreach ($this->images as $key => $image_name) {
             $image = null;
             $imgConf = $this->conf['carousel.'][$this->type . '.']['image.'];
             $totalImagePath = $this->imageDir . $image_name;
             $GLOBALS['TSFE']->register['file'] = $totalImagePath;
             $GLOBALS['TSFE']->register['href'] = $this->hrefs[$key];
             $GLOBALS['TSFE']->register['caption'] = $this->captions[$key];
             $GLOBALS['TSFE']->register['description'] = $this->description[$key];
             $GLOBALS['TSFE']->register['CURRENT_ID'] = $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] + 1;
             if ($this->hrefs[$key]) {
                 $imgConf['imageLinkWrap.'] = $imgConf['imageHrefWrap.'];
             }
             $image = $this->cObj->IMAGE($imgConf);
             $images .= $this->cObj->typolink($image, $imgConf['imageLinkWrap.']);
             $descriptions .= trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['description'], $this->conf['carousel.'][$this->type . '.']['description.']));
             $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT']++;
         }
         if ($this->conf['buttonLeft']) {
             $buttonLeft = trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['buttonLeft'], $this->conf['carousel.'][$this->type . '.']['buttonLeft.']));
             $markerArray['BUTTON_LEFT'] = $this->cObj->stdWrap($buttonLeft, $this->conf['carousel.'][$this->type . '.']['buttonLeftWrap.']);
         }
         if ($this->conf['buttonRight']) {
             $buttonRight = trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['buttonRight'], $this->conf['carousel.'][$this->type . '.']['buttonRight.']));
             $markerArray['BUTTON_RIGHT'] = $this->cObj->stdWrap($buttonRight, $this->conf['carousel.'][$this->type . '.']['buttonRightWrap.']);
         }
         if ($this->conf['titleBox']) {
             $titleBox = trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['titleBox'], $this->conf['carousel.'][$this->type . '.']['titleBox.']));
             $markerArray['TITLE_BOX'] = $this->cObj->stdWrap($titleBox, $this->conf['carousel.'][$this->type . '.']['titleBoxWrap.']);
         }
         if ($this->conf['altBox']) {
             $altBox = trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['altBox'], $this->conf['carousel.'][$this->type . '.']['altBox.']));
             $markerArray['ALT_BOX'] = $this->cObj->stdWrap($altBox, $this->conf['carousel.'][$this->type . '.']['altBoxWrap.']);
         }
         $markerArray['DESCRIPTIONS'] = $this->cObj->stdWrap($descriptions, $this->conf['carousel.'][$this->type . '.']['descriptionWrap.']);
         // the stdWrap
         $images = $this->cObj->stdWrap($images, $this->conf['carousel.'][$this->type . '.']['stdWrap.']);
         $return_string = $this->cObj->substituteMarkerArray($images, $markerArray, '###|###', 0);
     }
     return $this->pi_wrapInBaseClass($return_string);
 }
 /**
  * Add inline code to the HTML
  * 
  * @param string $name
  * @param string $block
  * @param array $conf
  * @return void
  */
 function addJsInlineCode($name, $block, $conf = array())
 {
     if ($conf['jsinline']) {
         $GLOBALS['TSFE']->inlineJS['t3jquery.jsdata.' . $name] = $block;
     } elseif (tx_t3jquery::getIntFromVersion(TYPO3_version) >= 4003000) {
         $pagerender = $GLOBALS['TSFE']->getPageRenderer();
         if ($conf['tofooter'] == 'footer') {
             $pagerender->addJsFooterInlineCode($name, $block, $conf['compress'], $conf['forceOnTop']);
         } else {
             $pagerender->addJsInlineCode($name, $block, $conf['compress'], $conf['forceOnTop']);
         }
     } else {
         if ($conf['compress']) {
             $block = t3lib_div::minifyJavaScript($block);
         }
         if ($conf['tofooter'] == 'footer') {
             $GLOBALS['TSFE']->additionalFooterData['t3jquery.jsdata.' . $name] = t3lib_div::wrapJS($block, TRUE);
         } else {
             $GLOBALS['TSFE']->additionalHeaderData['t3jquery.jsdata.' . $name] = t3lib_div::wrapJS($block, TRUE);
         }
     }
 }
 /**
  * Include all defined resources (JS / CSS)
  *
  * @return void
  */
 public function addResources()
 {
     if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
         $pagerender = $GLOBALS['TSFE']->getPageRenderer();
     }
     // Fix moveJsFromHeaderToFooter (add all scripts to the footer)
     if ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {
         $allJsInFooter = TRUE;
     } else {
         $allJsInFooter = FALSE;
     }
     // add all defined JS files
     if (count($this->jsFiles) > 0) {
         foreach ($this->jsFiles as $jsToLoad) {
             if (T3JQUERY === TRUE) {
                 $conf = array('jsfile' => $jsToLoad, 'tofooter' => $this->conf['jsInFooter'] || $allJsInFooter, 'jsminify' => $this->conf['jsMinify']);
                 tx_t3jquery::addJS('', $conf);
             } else {
                 $file = $this->getPath($jsToLoad);
                 if ($file) {
                     if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
                         if ($this->conf['jsInFooter'] || $allJsInFooter) {
                             $pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);
                         } else {
                             $pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);
                         }
                     } else {
                         $temp_file = '<script type="text/javascript" src="' . $file . '"></script>';
                         if ($this->conf['jsInFooter'] || $allJsInFooter) {
                             $GLOBALS['TSFE']->additionalFooterData['jsFile_' . $this->extKey . '_' . $file] = $temp_file;
                         } else {
                             $GLOBALS['TSFE']->additionalHeaderData['jsFile_' . $this->extKey . '_' . $file] = $temp_file;
                         }
                     }
                 } else {
                     t3lib_div::devLog("'{$jsToLoad}' does not exists!", $this->extKey, 2);
                 }
             }
         }
     }
     // add all defined JS script
     if (count($this->js) > 0) {
         foreach ($this->js as $jsToPut) {
             $temp_js .= $jsToPut;
         }
         $conf = array();
         $conf['jsdata'] = $temp_js;
         if (T3JQUERY === TRUE && class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger($this->getExtensionVersion('t3jquery')) >= 1002000) {
             $conf['tofooter'] = $this->conf['jsInFooter'] || $allJsInFooter;
             $conf['jsminify'] = $this->conf['jsMinify'];
             $conf['jsinline'] = $this->conf['jsInline'];
             tx_t3jquery::addJS('', $conf);
         } else {
             // Add script only once
             $hash = md5($temp_js);
             if ($this->conf['jsInline']) {
                 $GLOBALS['TSFE']->inlineJS[$hash] = $temp_js;
             } elseif (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
                 if ($this->conf['jsInFooter'] || $allJsInFooter) {
                     $pagerender->addJsFooterInlineCode($hash, $temp_js, $this->conf['jsMinify']);
                 } else {
                     $pagerender->addJsInlineCode($hash, $temp_js, $this->conf['jsMinify']);
                 }
             } else {
                 if ($this->conf['jsMinify']) {
                     $temp_js = t3lib_div::minifyJavaScript($temp_js);
                 }
                 if ($this->conf['jsInFooter'] || $allJsInFooter) {
                     $GLOBALS['TSFE']->additionalFooterData['js_' . $this->extKey . '_' . $hash] = t3lib_div::wrapJS($temp_js, TRUE);
                 } else {
                     $GLOBALS['TSFE']->additionalHeaderData['js_' . $this->extKey . '_' . $hash] = t3lib_div::wrapJS($temp_js, TRUE);
                 }
             }
         }
     }
     // add all defined CSS files
     if (count($this->cssFiles) > 0) {
         foreach ($this->cssFiles as $cssToLoad) {
             // Add script only once
             $file = $this->getPath($cssToLoad);
             if ($file) {
                 if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
                     $pagerender->addCssFile($file, 'stylesheet', 'all', '', $this->conf['cssMinify']);
                 } else {
                     $GLOBALS['TSFE']->additionalHeaderData['cssFile_' . $this->extKey . '_' . $file] = '<link rel="stylesheet" type="text/css" href="' . $file . '" media="all" />' . chr(10);
                 }
             } else {
                 t3lib_div::devLog("'{$cssToLoad}' does not exists!", $this->extKey, 2);
             }
         }
     }
     // add all defined CSS files for IE
     if (count($this->cssFilesInc) > 0) {
         foreach ($this->cssFilesInc as $cssToLoad) {
             // Add script only once
             $file = $this->getPath($cssToLoad['file']);
             if ($file) {
                 // Theres no possibility to add conditions for IE by pagerenderer, so this will be added in additionalHeaderData
                 $GLOBALS['TSFE']->additionalHeaderData['cssFile_' . $this->extKey . '_' . $file] = '<!--[if ' . $cssToLoad['rule'] . ']><link rel="stylesheet" type="text/css" href="' . $file . '" media="all" /><![endif]-->' . chr(10);
             } else {
                 t3lib_div::devLog("'{$cssToLoad['file']}' does not exists!", $this->extKey, 2);
             }
         }
     }
     // add all defined CSS Script
     if (count($this->css) > 0) {
         foreach ($this->css as $cssToPut) {
             $temp_css .= $cssToPut;
         }
         $hash = md5($temp_css);
         if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
             $pagerender->addCssInlineBlock($hash, $temp_css, $this->conf['cssMinify']);
         } else {
             // addCssInlineBlock
             $GLOBALS['TSFE']->additionalCSS['css_' . $this->extKey . '_' . $hash] .= $temp_css;
         }
     }
 }
Example #5
0
    /**
     * Generates the module content
     * @return    void
     */
    function moduleContent()
    {
        if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3jquery')) {
            require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3jquery') . 'class.tx_t3jquery.php';
            tx_t3jquery::addJqJS();
            $this->content .= tx_t3jquery::getJqJSBE();
        }
        $typo3Version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
        if ($typo3Version >= 6000000) {
            $t3lib_BEfuncAlias = '\\TYPO3\\CMS\\Backend\\Utility\\BackendUtility';
        } else {
            $t3lib_BEfuncAlias = 't3lib_BEfunc';
        }
        $this->iconWorks = method_exists('t3lib_iconWorks', 'getSpriteIcon');
        $this->mod_info = $this->getExtensionInfo('multishop');
        $this->get = $_GET;
        $this->post = $_POST;
        switch ((string) $this->MOD_SETTINGS['function']) {
            case 1:
                require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'mod1/pages/welcome.php';
                break;
            case 2:
                require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'mod1/pages/administration.php';
                break;
            case 3:
                require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'mod1/pages/help.php';
                break;
            case 4:
                require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'mod1/pages/migration.php';
                break;
        }
        $year = date("Y");
        if ($year == 2010) {
            $year_string .= $year;
        } else {
            $year_string .= '2010-' . $year;
        }
        $this->content .= '
					<center>
	';
        $this->content .= '

<a title="Click for more information about TYPO3 Multishop" href="http://www.typo3multishop.com/?utm_source=Typo3Multishop_Backend&utm_medium=cpc&utm_term=Typo3Multishop&utm_content=Listing&utm_campaign=Typo3Multishop" target="_blank"><img src="' . $this->FULL_HTTP_URL_MS . 'mod1/images/typo3multishop.png"></a><br><strong>version: ' . $this->mod_info['version'] . '</strong><BR><BR>
<a title="Follow TYPO3 Multishop on Twitter" href="http://twitter.com/typo3multishop" target="_blank"><img src="' . $this->FULL_HTTP_URL_MS . 'mod1/images/twitter.png"></a>
<a title="Follow TYPO3 Multishop on LinkedIn" href="http://www.linkedin.com/groups?gid=3117344" target="_blank"><img src="' . $this->FULL_HTTP_URL_MS . 'mod1/images/linkedin.png"></a>
<a title="Follow TYPO3 Multishop on FaceBook" href="http://www.facebook.com/typo3multishop" target="_blank"><img src="' . $this->FULL_HTTP_URL_MS . 'mod1/images/facebook.png"></a>
<br>skype: typo3multishop<BR><BR>
					<a title="copyright ' . $year_string . ' by BVB Media BV" href="http://www.bvbmedia.com/?utm_source=Typo3Multishop_Backend&utm_medium=cpc&utm_term=Typo3Multishop&utm_content=Listing&utm_campaign=Typo3Multishop" target="_blank">copyright ' . $year_string . ' to BVB Media BV</a><br>
					webdevelopment by <a href="http://www.basvanbeek.nl/?utm_source=Typo3Multishop_Backend&utm_medium=cpc&utm_term=Typo3Multishop&utm_content=Listing&utm_campaign=Typo3Multishop" target="_blank">Bas van Beek</a> - <a href="mailto:bvbmedia@gmail.com">bvbmedia@gmail.com</a><br>
					</center>
					';
    }
 /**
  * @param string $jsfile
  * @param string $jsurl
  * @param string $jsdata
  * @param string $jsready
  * @param boolean $forceOnTop
  * @param string $compress
  * @param string $type
  * @param boolean $tofooter
  * @param boolean $renderChildrenToData
  * @return string
  */
 public function render($jsfile = NULL, $jsurl = NULL, $jsdata = NULL, $jsready = NULL, $forceOnTop = NULL, $compress = NULL, $type = "text/javascript", $tofooter = null, $renderChildrenToData = false)
 {
     $buffer_data = NULL;
     $buffer_ready = NULL;
     if ($renderChildrenToData === true) {
         $buffer_data = $this->renderChildren();
     } else {
         $buffer_ready = $this->renderChildren();
     }
     // checks if t3jquery is loaded
     if (T3JQUERY === true) {
         $config = array();
         if ($jsfile !== NULL) {
             $config['jsfile'] = $jsfile;
         }
         if ($jsurl !== NULL) {
             $config['jsurl'] = $jsurl;
         }
         if ($jsdata !== NULL) {
             $config['jsdata'] = $buffer_data . "\n" . $jsdata;
         } else {
             $config['jsdata'] = $buffer_data;
         }
         if ($jsready !== NULL) {
             $config['jsready'] = $buffer_ready . "\n" . $jsready;
         } else {
             $config['jsready'] = $buffer_ready;
         }
         if ($forceOnTop !== NULL) {
             $config['forceOnTop'] = $forceOnTop;
         }
         if ($compress !== NULL) {
             $config['compress'] = $compress;
         }
         if ($type !== NULL) {
             $config['type'] = $type;
         }
         if ($tofooter !== NULL) {
             $config['tofooter'] = $tofooter;
         }
         tx_t3jquery::addJS('', $config);
     }
     return '';
 }
 /**
  * Adds "t3jquery" extension's library to page header.
  *
  * @access	public
  *
  * @return	boolean		TRUE on success or FALSE on error
  */
 public static function loadJQuery()
 {
     // Ensure extension "t3jquery" is available.
     if (t3lib_extMgm::isLoaded('t3jquery')) {
         require_once t3lib_extMgm::extPath('t3jquery') . 'class.tx_t3jquery.php';
     }
     // Is "t3jquery" loaded?
     if (T3JQUERY === TRUE) {
         tx_t3jquery::addJqJS();
         return TRUE;
     } else {
         if (TYPO3_DLOG) {
             t3lib_div::devLog('[tx_dlf_helper->loadJQuery()] JQuery not available', self::$extKey, SYSLOG_SEVERITY_ERROR);
         }
         return FALSE;
     }
 }
 /**
  * The main method of the PlugIn
  *
  * @param	string		$content: The PlugIn content
  * @param	array		$conf: The PlugIn configuration
  * @return	string The content that is displayed on the website
  */
 public function main($content, $conf)
 {
     $this->content = $content;
     $this->conf = $conf;
     $this->pi_setPiVarDefaults();
     $this->pi_loadLL();
     // get the config from EXT
     $this->confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jfmulticontent']);
     $this->pagerenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_jfmulticontent_pagerenderer');
     $this->pagerenderer->setConf($this->conf);
     // Plugin or template?
     if ($this->cObj->data['list_type'] == $this->extKey . '_pi1') {
         // It's a content, all data from flexform
         $this->lConf['style'] = $this->getFlexformData('general', 'style');
         if ($this->lConf['style'] != 'typoscript') {
             $this->lConf['columnOrder'] = $this->getFlexformData('general', 'columnOrder', in_array($this->lConf['style'], array('2column', '3column', '4column', '5column')));
             $this->lConf['column1'] = $this->getFlexformData('general', 'column1', in_array($this->lConf['style'], array('2column', '3column', '4column', '5column')));
             $this->lConf['column2'] = $this->getFlexformData('general', 'column2', in_array($this->lConf['style'], array('2column', '3column', '4column', '5column')));
             $this->lConf['column3'] = $this->getFlexformData('general', 'column3', in_array($this->lConf['style'], array('3column', '4column', '5column')));
             $this->lConf['column4'] = $this->getFlexformData('general', 'column4', in_array($this->lConf['style'], array('4column', '5column')));
             $this->lConf['column5'] = $this->getFlexformData('general', 'column5', in_array($this->lConf['style'], array('5column')));
             $this->lConf['equalize'] = $this->getFlexformData('general', 'equalize', in_array($this->lConf['style'], array('1column', '2column', '3column', '4column', '5column')));
             $debuglog = $this->lConf['style'] == 'tab';
             $this->lConf['tabCollapsible'] = $this->getFlexformData('general', 'tabCollapsible', $debuglog);
             $this->lConf['tabOpen'] = $this->getFlexformData('general', 'tabOpen', $debuglog);
             $this->lConf['tabRandomContent'] = $this->getFlexformData('general', 'tabRandomContent', $debuglog);
             $this->lConf['tabEvent'] = $this->getFlexformData('general', 'tabEvent', $debuglog);
             $this->lConf['tabHeightStyle'] = $this->getFlexformData('general', 'tabHeightStyle', $debuglog);
             $this->lConf['tabCookieExpires'] = $this->getFlexformData('general', 'tabCookieExpires', $debuglog);
             $this->lConf['tabCookieRoot'] = $this->getFlexformData('general', 'tabCookieRoot', $debuglog);
             $this->lConf['tabHideEffect'] = $this->getFlexformData('general', 'tabHideEffect', $debuglog);
             $this->lConf['tabHideTransition'] = $this->getFlexformData('general', 'tabHideTransition', $debuglog);
             $this->lConf['tabHideTransitiondir'] = $this->getFlexformData('general', 'tabHideTransitiondir', $debuglog);
             $this->lConf['tabHideTransitionduration'] = $this->getFlexformData('general', 'tabHideTransitionduration', $debuglog);
             $this->lConf['tabShowEffect'] = $this->getFlexformData('general', 'tabShowEffect', $debuglog);
             $this->lConf['tabShowTransition'] = $this->getFlexformData('general', 'tabShowTransition', $debuglog);
             $this->lConf['tabShowTransitiondir'] = $this->getFlexformData('general', 'tabShowTransitiondir', $debuglog);
             $this->lConf['tabShowTransitionduration'] = $this->getFlexformData('general', 'tabShowTransitionduration', $debuglog);
             $debuglog = $this->lConf['style'] == 'accordion';
             $this->lConf['accordionCollapsible'] = $this->getFlexformData('general', 'accordionCollapsible', $debuglog);
             $this->lConf['accordionClosed'] = $this->getFlexformData('general', 'accordionClosed', $debuglog);
             $this->lConf['accordionOpen'] = $this->getFlexformData('general', 'accordionOpen', $debuglog);
             $this->lConf['accordionRandomContent'] = $this->getFlexformData('general', 'accordionRandomContent', $debuglog);
             $this->lConf['accordionEvent'] = $this->getFlexformData('general', 'accordionEvent', $debuglog);
             $this->lConf['accordionHeightStyle'] = $this->getFlexformData('general', 'accordionHeightStyle', $debuglog);
             $this->lConf['accordionAnimate'] = $this->getFlexformData('general', 'accordionAnimate', $debuglog);
             $this->lConf['accordionTransition'] = $this->getFlexformData('general', 'accordionTransition', $debuglog);
             $this->lConf['accordionTransitiondir'] = $this->getFlexformData('general', 'accordionTransitiondir', $debuglog);
             $this->lConf['accordionTransitionduration'] = $this->getFlexformData('general', 'accordionTransitionduration', $debuglog);
             $debuglog = $this->lConf['style'] == 'slider';
             $this->lConf['sliderWidth'] = $this->getFlexformData('general', 'sliderWidth', $debuglog);
             $this->lConf['sliderHeight'] = $this->getFlexformData('general', 'sliderHeight', $debuglog);
             $this->lConf['sliderResizeContents'] = $this->getFlexformData('general', 'sliderResizeContents', $debuglog);
             $this->lConf['sliderTheme'] = $this->getFlexformData('general', 'sliderTheme', $debuglog);
             $this->lConf['sliderMode'] = $this->getFlexformData('general', 'sliderMode', $debuglog);
             $this->lConf['sliderOpen'] = $this->getFlexformData('general', 'sliderOpen', $debuglog);
             $this->lConf['sliderRandomContent'] = $this->getFlexformData('general', 'sliderRandomContent', $debuglog);
             $this->lConf['sliderHashTags'] = $this->getFlexformData('general', 'sliderHashTags', $debuglog);
             $this->lConf['sliderBuildArrows'] = $this->getFlexformData('general', 'sliderBuildArrows', $debuglog);
             $this->lConf['sliderToggleArrows'] = $this->getFlexformData('general', 'sliderToggleArrows', $debuglog);
             $this->lConf['sliderNavigation'] = $this->getFlexformData('general', 'sliderNavigation', $debuglog);
             $this->lConf['sliderStartStop'] = $this->getFlexformData('general', 'sliderStartStop', $debuglog);
             $this->lConf['sliderPanelFromHeader'] = $this->getFlexformData('general', 'sliderPanelFromHeader', $debuglog);
             $this->lConf['sliderToggleControls'] = $this->getFlexformData('general', 'sliderToggleControls', $debuglog);
             $this->lConf['sliderAutoStart'] = $this->getFlexformData('general', 'sliderAutoStart', $debuglog);
             $this->lConf['sliderPauseOnHover'] = $this->getFlexformData('general', 'sliderPauseOnHover', $debuglog);
             $this->lConf['sliderAllowRapidChange'] = $this->getFlexformData('general', 'sliderAllowRapidChange', $debuglog);
             $this->lConf['sliderResumeOnVideoEnd'] = $this->getFlexformData('general', 'sliderResumeOnVideoEnd', $debuglog);
             $this->lConf['sliderStopAtEnd'] = $this->getFlexformData('general', 'sliderStopAtEnd', $debuglog);
             $this->lConf['sliderPlayRtl'] = $this->getFlexformData('general', 'sliderPlayRtl', $debuglog);
             $this->lConf['sliderTransition'] = $this->getFlexformData('general', 'sliderTransition', $debuglog);
             $this->lConf['sliderTransitiondir'] = $this->getFlexformData('general', 'sliderTransitiondir', $debuglog);
             $this->lConf['sliderTransitionduration'] = $this->getFlexformData('general', 'sliderTransitionduration', $debuglog);
             $this->lConf['sliderAutoplay'] = $this->getFlexformData('general', 'sliderAutoplay', $debuglog);
             $debuglog = $this->lConf['style'] == 'slidedeck';
             $this->lConf['slidedeckHeight'] = $this->getFlexformData('general', 'slidedeckHeight', $debuglog);
             $this->lConf['slidedeckTransition'] = $this->getFlexformData('general', 'slidedeckTransition', $debuglog);
             $this->lConf['slidedeckTransitiondir'] = $this->getFlexformData('general', 'slidedeckTransitiondir', $debuglog);
             $this->lConf['slidedeckTransitionduration'] = $this->getFlexformData('general', 'slidedeckTransitionduration', $debuglog);
             $this->lConf['slidedeckStart'] = $this->getFlexformData('general', 'slidedeckStart', $debuglog);
             $this->lConf['slidedeckActivecorner'] = $this->getFlexformData('general', 'slidedeckActivecorner', $debuglog);
             $this->lConf['slidedeckIndex'] = $this->getFlexformData('general', 'slidedeckIndex', $debuglog);
             $this->lConf['slidedeckScroll'] = $this->getFlexformData('general', 'slidedeckScroll', $debuglog);
             $this->lConf['slidedeckKeys'] = $this->getFlexformData('general', 'slidedeckKeys', $debuglog);
             $this->lConf['slidedeckHidespines'] = $this->getFlexformData('general', 'slidedeckHidespines', $debuglog);
             $debuglog = $this->lConf['style'] == 'easyaccordion';
             $this->lConf['easyaccordionSkin'] = $this->getFlexformData('general', 'easyaccordionSkin', $debuglog);
             $this->lConf['easyaccordionOpen'] = $this->getFlexformData('general', 'easyaccordionOpen', $debuglog);
             $this->lConf['easyaccordionWidth'] = $this->getFlexformData('general', 'easyaccordionWidth', $debuglog);
             $this->lConf['easyaccordionSlideNum'] = $this->getFlexformData('general', 'easyaccordionSlideNum', $debuglog);
             $debuglog = $this->lConf['style'] == 'booklet';
             $this->lConf['bookletWidth'] = $this->getFlexformData('general', 'bookletWidth', $debuglog);
             $this->lConf['bookletHeight'] = $this->getFlexformData('general', 'bookletHeight', $debuglog);
             $this->lConf['bookletSpeed'] = $this->getFlexformData('general', 'bookletSpeed', $debuglog);
             $this->lConf['bookletStartingPage'] = $this->getFlexformData('general', 'bookletStartingPage', $debuglog);
             $this->lConf['bookletRTL'] = $this->getFlexformData('general', 'bookletRTL', $debuglog);
             $this->lConf['bookletTransition'] = $this->getFlexformData('general', 'bookletTransition', $debuglog);
             $this->lConf['bookletTransitiondir'] = $this->getFlexformData('general', 'bookletTransitiondir', $debuglog);
             $this->lConf['bookletPagePadding'] = $this->getFlexformData('general', 'bookletPagePadding', $debuglog);
             $this->lConf['bookletPageNumbers'] = $this->getFlexformData('general', 'bookletPageNumbers', $debuglog);
             $this->lConf['bookletManual'] = $this->getFlexformData('general', 'bookletManual', $debuglog);
             $this->lConf['bookletShadows'] = $this->getFlexformData('general', 'bookletShadows', $debuglog);
             $this->lConf['bookletClosed'] = $this->getFlexformData('general', 'bookletClosed', $debuglog);
             $this->lConf['bookletCovers'] = $this->getFlexformData('general', 'bookletCovers', $debuglog);
             $this->lConf['bookletAutoCenter'] = $this->getFlexformData('general', 'bookletAutoCenter', $debuglog);
             $this->lConf['bookletHash'] = $this->getFlexformData('general', 'bookletHash', $debuglog);
             $this->lConf['bookletKeyboard'] = $this->getFlexformData('general', 'bookletKeyboard', $debuglog);
             $this->lConf['bookletAuto'] = $this->getFlexformData('general', 'bookletAuto', $debuglog);
             $this->lConf['bookletDelay'] = $this->getFlexformData('general', 'bookletDelay', $debuglog);
             $this->lConf['bookletOverlays'] = $this->getFlexformData('general', 'bookletOverlays', $debuglog);
             $this->lConf['bookletArrows'] = $this->getFlexformData('general', 'bookletArrows', $debuglog);
             $this->lConf['bookletArrowsHide'] = $this->getFlexformData('general', 'bookletArrows', $debuglog);
             $this->lConf['bookletHovers'] = $this->getFlexformData('general', 'bookletHovers', $debuglog);
             $this->lConf['delayDuration'] = $this->getFlexformData('general', 'delayDuration', in_array($this->lConf['style'], array('slider', 'slidedeck', 'easyaccordion')));
             $this->lConf['autoplayCycle'] = $this->getFlexformData('general', 'autoplayCycle', $this->lConf['style'] == 'slidedeck');
             // columns
             $this->conf['config.']['column1'] = $this->lConf['column1'];
             $this->conf['config.']['column2'] = $this->lConf['column2'];
             $this->conf['config.']['column3'] = $this->lConf['column3'];
             $this->conf['config.']['column4'] = $this->lConf['column4'];
             $this->conf['config.']['column5'] = $this->lConf['column5'];
             $this->conf['config.']['columnOrder'] = $this->lConf['columnOrder'];
             if ($this->lConf['equalize'] < 2) {
                 $this->conf['config.']['equalize'] = $this->lConf['equalize'];
             }
             // tab
             if ($this->lConf['tabCollapsible'] < 2) {
                 $this->conf['config.']['tabCollapsible'] = $this->lConf['tabCollapsible'];
             }
             if ($this->lConf['tabOpen'] >= 0) {
                 $this->conf['config.']['tabOpen'] = $this->lConf['tabOpen'];
             }
             if ($this->lConf['tabRandomContent'] < 2) {
                 $this->conf['config.']['tabRandomContent'] = $this->lConf['tabRandomContent'];
             }
             if (strlen($this->lConf['tabCookieExpires']) > 0) {
                 $this->conf['config.']['tabCookieExpires'] = $this->lConf['tabCookieExpires'];
             }
             if ($this->lConf['tabCookieRoot'] < 2) {
                 $this->conf['config.']['tabCookieRoot'] = $this->lConf['tabCookieRoot'];
             }
             if ($this->lConf['tabHideEffect']) {
                 $this->conf['config.']['tabHideEffect'] = $this->lConf['tabHideEffect'];
             }
             if ($this->lConf['tabHideTransition']) {
                 $this->conf['config.']['tabHideTransition'] = $this->lConf['tabHideTransition'];
             }
             if ($this->lConf['tabHideTransitiondir']) {
                 $this->conf['config.']['tabHideTransitiondir'] = $this->lConf['tabHideTransitiondir'];
             }
             if ($this->lConf['tabHideTransitionduration'] > 0) {
                 $this->conf['config.']['tabHideTransitionduration'] = $this->lConf['tabHideTransitionduration'];
             }
             if ($this->lConf['tabShowEffect']) {
                 $this->conf['config.']['tabShowEffect'] = $this->lConf['tabShowEffect'];
             }
             if ($this->lConf['tabShowTransition']) {
                 $this->conf['config.']['tabShowTransition'] = $this->lConf['tabShowTransition'];
             }
             if ($this->lConf['tabShowTransitiondir']) {
                 $this->conf['config.']['tabShowTransitiondir'] = $this->lConf['tabShowTransitiondir'];
             }
             if ($this->lConf['tabShowTransitionduration'] > 0) {
                 $this->conf['config.']['tabShowTransitionduration'] = $this->lConf['tabShowTransitionduration'];
             }
             if (in_array($this->lConf['tabEvent'], array('click', 'mouseover'))) {
                 $this->conf['config.']['tabEvent'] = $this->lConf['tabEvent'];
             }
             if (in_array($this->lConf['tabHeightStyle'], array('auto', 'fill', 'content'))) {
                 $this->conf['config.']['tabHeightStyle'] = $this->lConf['tabHeightStyle'];
             }
             // accordion
             if ($this->lConf['accordionCollapsible'] < 2) {
                 $this->conf['config.']['accordionCollapsible'] = $this->lConf['accordionCollapsible'];
             }
             if ($this->lConf['accordionClosed'] < 2) {
                 $this->conf['config.']['accordionClosed'] = $this->lConf['accordionClosed'];
             }
             if ($this->lConf['accordionOpen'] > 0) {
                 $this->conf['config.']['accordionOpen'] = $this->lConf['accordionOpen'];
             }
             if ($this->lConf['accordionRandomContent'] < 2) {
                 $this->conf['config.']['accordionRandomContent'] = $this->lConf['accordionRandomContent'];
             }
             if ($this->lConf['accordionEvent']) {
                 $this->conf['config.']['accordionEvent'] = $this->lConf['accordionEvent'];
             }
             if (in_array($this->lConf['accordionHeightStyle'], array('auto', 'fill', 'content'))) {
                 $this->conf['config.']['accordionHeightStyle'] = $this->lConf['accordionHeightStyle'];
             }
             if ($this->lConf['accordionAnimate'] < 2) {
                 $this->conf['config.']['accordionAnimate'] = $this->lConf['accordionAnimate'];
             }
             if ($this->lConf['accordionTransition']) {
                 $this->conf['config.']['accordionTransition'] = $this->lConf['accordionTransition'];
             }
             if ($this->lConf['accordionTransitiondir']) {
                 $this->conf['config.']['accordionTransitiondir'] = $this->lConf['accordionTransitiondir'];
             }
             if ($this->lConf['accordionTransitionduration'] > 0) {
                 $this->conf['config.']['accordionTransitionduration'] = $this->lConf['accordionTransitionduration'];
             }
             // slider
             if ($this->lConf['sliderWidth']) {
                 $this->conf['config.']['sliderWidth'] = $this->lConf['sliderWidth'];
             }
             if ($this->lConf['sliderHeight']) {
                 $this->conf['config.']['sliderHeight'] = $this->lConf['sliderHeight'];
             }
             if ($this->lConf['sliderResizeContents'] < 2) {
                 $this->conf['config.']['sliderResizeContents'] = $this->lConf['sliderResizeContents'];
             }
             if ($this->lConf['sliderTheme']) {
                 $this->conf['config.']['sliderTheme'] = $this->lConf['sliderTheme'];
             }
             if ($this->lConf['sliderMode']) {
                 $this->conf['config.']['sliderMode'] = $this->lConf['sliderMode'];
             }
             if ($this->lConf['sliderOpen'] > 0) {
                 $this->conf['config.']['sliderOpen'] = $this->lConf['sliderOpen'];
             }
             if ($this->lConf['sliderRandomContent'] < 2) {
                 $this->conf['config.']['sliderRandomContent'] = $this->lConf['sliderRandomContent'];
             }
             if ($this->lConf['sliderHashTags'] < 2) {
                 $this->conf['config.']['sliderHashTags'] = $this->lConf['sliderHashTags'];
             }
             if ($this->lConf['sliderBuildArrows'] < 2) {
                 $this->conf['config.']['sliderBuildArrows'] = $this->lConf['sliderBuildArrows'];
             }
             if ($this->lConf['sliderToggleArrows'] < 2) {
                 $this->conf['config.']['sliderToggleArrows'] = $this->lConf['sliderToggleArrows'];
             }
             if ($this->lConf['sliderNavigation'] < 2) {
                 $this->conf['config.']['sliderNavigation'] = $this->lConf['sliderNavigation'];
             }
             if ($this->lConf['sliderStartStop'] < 2) {
                 $this->conf['config.']['sliderStartStop'] = $this->lConf['sliderStartStop'];
             }
             if ($this->lConf['sliderPanelFromHeader'] < 2) {
                 $this->conf['config.']['sliderPanelFromHeader'] = $this->lConf['sliderPanelFromHeader'];
             }
             if ($this->lConf['sliderToggleControls'] < 2) {
                 $this->conf['config.']['sliderToggleControls'] = $this->lConf['sliderToggleControls'];
             }
             if ($this->lConf['sliderAutoStart'] < 2) {
                 $this->conf['config.']['sliderAutoStart'] = $this->lConf['sliderAutoStart'];
             }
             if ($this->lConf['sliderPauseOnHover'] < 2) {
                 $this->conf['config.']['sliderPauseOnHover'] = $this->lConf['sliderPauseOnHover'];
             }
             if ($this->lConf['sliderAllowRapidChange'] < 2) {
                 $this->conf['config.']['sliderAllowRapidChange'] = $this->lConf['sliderAllowRapidChange'];
             }
             if ($this->lConf['sliderResumeOnVideoEnd'] < 2) {
                 $this->conf['config.']['sliderResumeOnVideoEnd'] = $this->lConf['sliderResumeOnVideoEnd'];
             }
             if ($this->lConf['sliderStopAtEnd'] < 2) {
                 $this->conf['config.']['sliderStopAtEnd'] = $this->lConf['sliderStopAtEnd'];
             }
             if ($this->lConf['sliderPlayRtl'] < 2) {
                 $this->conf['config.']['sliderPlayRtl'] = $this->lConf['sliderPlayRtl'];
             }
             if ($this->lConf['sliderTransition']) {
                 $this->conf['config.']['sliderTransition'] = $this->lConf['sliderTransition'];
             }
             if ($this->lConf['sliderTransitiondir']) {
                 $this->conf['config.']['sliderTransitiondir'] = $this->lConf['sliderTransitiondir'];
             }
             if ($this->lConf['sliderTransitionduration'] > 0) {
                 $this->conf['config.']['sliderTransitionduration'] = $this->lConf['sliderTransitionduration'];
             }
             if ($this->lConf['sliderAutoplay'] < 2) {
                 $this->conf['config.']['sliderAutoplay'] = $this->lConf['sliderAutoplay'];
             }
             // slidedeck
             if ($this->lConf['slidedeckHeight'] > 0) {
                 $this->conf['config.']['slidedeckHeight'] = $this->lConf['slidedeckHeight'];
             }
             if ($this->lConf['slidedeckTransition']) {
                 $this->conf['config.']['slidedeckTransition'] = $this->lConf['slidedeckTransition'];
             }
             if ($this->lConf['slidedeckTransitiondir']) {
                 $this->conf['config.']['slidedeckTransitiondir'] = $this->lConf['slidedeckTransitiondir'];
             }
             if ($this->lConf['slidedeckTransitionduration'] > 0) {
                 $this->conf['config.']['slidedeckTransitionduration'] = $this->lConf['slidedeckTransitionduration'];
             }
             if ($this->lConf['slidedeckStart'] > 0) {
                 $this->conf['config.']['slidedeckStart'] = $this->lConf['slidedeckStart'];
             }
             if ($this->lConf['slidedeckActivecorner'] < 2) {
                 $this->conf['config.']['slidedeckActivecorner'] = $this->lConf['slidedeckActivecorner'];
             }
             if ($this->lConf['slidedeckIndex'] < 2) {
                 $this->conf['config.']['slidedeckIndex'] = $this->lConf['slidedeckIndex'];
             }
             if ($this->lConf['slidedeckScroll'] < 2) {
                 $this->conf['config.']['slidedeckScroll'] = $this->lConf['slidedeckScroll'];
             }
             if ($this->lConf['slidedeckKeys'] < 2) {
                 $this->conf['config.']['slidedeckKeys'] = $this->lConf['slidedeckKeys'];
             }
             if ($this->lConf['slidedeckHidespines'] < 2) {
                 $this->conf['config.']['slidedeckHidespines'] = $this->lConf['slidedeckHidespines'];
             }
             // easyAccordion
             if ($this->lConf['easyaccordionSkin']) {
                 $this->conf['config.']['easyaccordionSkin'] = $this->lConf['easyaccordionSkin'];
             }
             if ($this->lConf['easyaccordionOpen'] > 0) {
                 $this->conf['config.']['easyaccordionOpen'] = $this->lConf['easyaccordionOpen'];
             }
             if ($this->lConf['easyaccordionWidth'] > 0) {
                 $this->conf['config.']['easyaccordionWidth'] = $this->lConf['easyaccordionWidth'];
             }
             if ($this->lConf['easyaccordionSlideNum'] < 2) {
                 $this->conf['config.']['easyaccordionSlideNum'] = $this->lConf['easyaccordionSlideNum'];
             }
             // booklet
             if ($this->lConf['bookletWidth'] > 0) {
                 $this->conf['config.']['bookletWidth'] = $this->lConf['bookletWidth'];
             }
             if ($this->lConf['bookletHeight'] > 0) {
                 $this->conf['config.']['bookletHeight'] = $this->lConf['bookletHeight'];
             }
             if ($this->lConf['bookletSpeed'] > 0) {
                 $this->conf['config.']['bookletSpeed'] = $this->lConf['bookletSpeed'];
             }
             if ($this->lConf['bookletStartingPage'] > 0) {
                 $this->conf['config.']['bookletStartingPage'] = $this->lConf['bookletStartingPage'];
             }
             if ($this->lConf['bookletRTL'] < 2) {
                 $this->conf['config.']['bookletRTL'] = $this->lConf['bookletRTL'];
             }
             if ($this->lConf['bookletTransition']) {
                 $this->conf['config.']['bookletTransition'] = $this->lConf['bookletTransition'];
             }
             if ($this->lConf['bookletTransitiondir']) {
                 $this->conf['config.']['bookletTransitiondir'] = $this->lConf['bookletTransitiondir'];
             }
             if ($this->lConf['bookletPagePadding'] != '') {
                 $this->conf['config.']['bookletPagePadding'] = $this->lConf['bookletPagePadding'];
             }
             if ($this->lConf['bookletPageNumbers'] < 2) {
                 $this->conf['config.']['bookletPageNumbers'] = $this->lConf['bookletPageNumbers'];
             }
             if ($this->lConf['bookletManual'] < 2) {
                 $this->conf['config.']['bookletManual'] = $this->lConf['bookletManual'];
             }
             if ($this->lConf['bookletShadows'] < 2) {
                 $this->conf['config.']['bookletShadows'] = $this->lConf['bookletShadows'];
             }
             if ($this->lConf['bookletClosed'] < 2) {
                 $this->conf['config.']['bookletClosed'] = $this->lConf['bookletClosed'];
             }
             if ($this->lConf['bookletCovers'] < 2) {
                 $this->conf['config.']['bookletCovers'] = $this->lConf['bookletCovers'];
             }
             if ($this->lConf['bookletAutoCenter'] < 2) {
                 $this->conf['config.']['bookletAutoCenter'] = $this->lConf['bookletAutoCenter'];
             }
             if ($this->lConf['bookletHash'] < 2) {
                 $this->conf['config.']['bookletHash'] = $this->lConf['bookletHash'];
             }
             if ($this->lConf['bookletKeyboard'] < 2) {
                 $this->conf['config.']['bookletKeyboard'] = $this->lConf['bookletKeyboard'];
             }
             if ($this->lConf['bookletAuto'] < 2) {
                 $this->conf['config.']['bookletAuto'] = $this->lConf['bookletAuto'];
             }
             if ($this->lConf['bookletDelay'] < 2) {
                 $this->conf['config.']['bookletDelay'] = $this->lConf['bookletDelay'];
             }
             if ($this->lConf['bookletOverlays'] < 2) {
                 $this->conf['config.']['bookletOverlays'] = $this->lConf['bookletOverlays'];
             }
             if ($this->lConf['bookletArrows'] < 2) {
                 $this->conf['config.']['bookletArrows'] = $this->lConf['bookletArrows'];
             }
             if ($this->lConf['bookletArrowsHide'] < 2) {
                 $this->conf['config.']['bookletArrowsHide'] = $this->lConf['bookletArrowsHide'];
             }
             if ($this->lConf['bookletHovers'] < 2) {
                 $this->conf['config.']['bookletHovers'] = $this->lConf['bookletHovers'];
             }
             // autoplay
             if ($this->lConf['delayDuration'] > 0) {
                 $this->conf['config.']['delayDuration'] = $this->lConf['delayDuration'];
             }
             if ($this->lConf['autoplayCycle'] < 2) {
                 $this->conf['config.']['autoplayCycle'] = $this->lConf['autoplayCycle'];
             }
             $this->conf['config.']['style'] = $this->lConf['style'];
         }
         $this->lConf['titles'] = $this->getFlexformData('title', 'titles');
         $this->lConf['attributes'] = $this->getFlexformData('attribute', 'attributes');
         $this->lConf['options'] = $this->getFlexformData('special', 'options');
         $this->lConf['optionsOverride'] = $this->getFlexformData('special', 'optionsOverride');
         if ($this->cObj->data['tx_jfmulticontent_view']) {
             $this->conf['config.']['view'] = $this->cObj->data['tx_jfmulticontent_view'];
         } else {
             $this->conf['config.']['view'] = 'content';
         }
         // define the titles to overwrite
         if (trim($this->lConf['titles'])) {
             $this->titles = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(chr(10), $this->lConf['titles']);
         }
         // define the attributes
         if (trim($this->lConf['attributes'])) {
             $this->attributes = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(chr(10), $this->lConf['attributes']);
         }
         // options
         if ($this->lConf['optionsOverride'] || trim($this->lConf['options'])) {
             $this->conf['config.'][$this->lConf['style'] . 'Options'] = $this->lConf['options'];
             $this->conf['config.'][$this->lConf['style'] . 'OptionsOverride'] = $this->lConf['optionsOverride'];
         }
         $view = $this->conf['views.'][$this->conf['config.']['view'] . '.'];
         if ($this->conf['config.']['view'] == 'page') {
             // get the page ID's
             $page_ids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->cObj->data['tx_jfmulticontent_pages']);
             // get the informations for every page
             for ($a = 0; $a < count($page_ids); $a++) {
                 $GLOBALS['TSFE']->register['pid'] = $page_ids[$a];
                 if ($this->confArr['useOwnUserFuncForPages']) {
                     // TemplaVoila will render the content with a userFunc
                     $this->cElements[] = $this->cObj->cObjGetSingle($view['content'], $view['content.']);
                     $this->rels[] = $this->cObj->cObjGetSingle($view['rel'], $view['rel.']);
                 } else {
                     $row = null;
                     if ($GLOBALS['TSFE']->sys_language_content) {
                         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages_language_overlay', 'deleted=0 AND hidden=0 AND pid=' . intval($page_ids[$a]) . ' AND sys_language_uid=' . $GLOBALS['TSFE']->sys_language_content, '', '', 1);
                         $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                     }
                     if (!is_array($row)) {
                         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'deleted=0 AND hidden=0 AND uid=' . intval($page_ids[$a]), '', '', 1);
                         $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                     }
                     if (is_array($row)) {
                         foreach ($row as $key => $val) {
                             $GLOBALS['TSFE']->register['page_' . $key] = $val;
                         }
                     }
                     $this->cElements[] = $this->cObj->cObjGetSingle($view['content'], $view['content.']);
                     $this->rels[] = $this->cObj->cObjGetSingle($view['rel'], $view['rel.']);
                     $this->content_id[$a] = $page_ids[$a];
                 }
                 if ($this->titles[$a] == '' || !isset($this->titles[$a])) {
                     $this->titles[$a] = $this->cObj->cObjGetSingle($view['title'], $view['title.']);
                 }
             }
         } elseif ($this->conf['config.']['view'] == 'content') {
             // get the content ID's
             $content_ids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->cObj->data['tx_jfmulticontent_contents']);
             // get the informations for every content
             for ($a = 0; $a < count($content_ids); $a++) {
                 // Select the content
                 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'uid=' . intval($content_ids[$a]), '', '', 1);
                 $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                 if ($GLOBALS['TSFE']->sys_language_content) {
                     $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tt_content', $row, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);
                 } elseif ($GLOBALS['TSFE']->sys_page->versioningPreview) {
                     $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);
                 }
                 $GLOBALS['TSFE']->register['uid'] = $row['_LOCALIZED_UID'] ? $row['_LOCALIZED_UID'] : $row['uid'];
                 $GLOBALS['TSFE']->register['title'] = strlen(trim($this->titles[$a])) > 0 ? $this->titles[$a] : $row['header'];
                 if ($this->titles[$a] == '' || !isset($this->titles[$a])) {
                     $this->titles[$a] = $this->cObj->cObjGetSingle($view['title'], $view['title.']);
                     $GLOBALS['TSFE']->register['title'] = $this->titles[$a];
                 }
                 $this->cElements[] = $this->cObj->cObjGetSingle($view['content'], $view['content.']);
                 $this->rels[] = $this->cObj->cObjGetSingle($view['rel'], $view['rel.']);
                 $this->content_id[$a] = $content_ids[$a];
             }
         } elseif ($this->conf['config.']['view'] == 'irre') {
             // get the content ID's
             $elementUID = $this->cObj->data['_LOCALIZED_UID'] ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid'];
             if ($GLOBALS['TSFE']->sys_page->versioningPreview) {
                 $elementUID = $this->cObj->data['_ORIG_uid'];
             }
             $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'tx_jfmulticontent_irre_parentid=' . intval($elementUID) . ' AND deleted = 0 AND hidden = 0', '', 'sorting ASC');
             $a = 0;
             while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                 if ($GLOBALS['TSFE']->sys_language_content) {
                     $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tt_content', $row, $GLOBALS['TSFE']->sys_language_content, $GLOBALS['TSFE']->sys_language_contentOL);
                 } elseif ($GLOBALS['TSFE']->sys_page->versioningPreview) {
                     $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);
                 }
                 $uid = $row['_LOCALIZED_UID'] ? $row['_LOCALIZED_UID'] : $row['uid'];
                 if ($row['t3ver_oid']) {
                     $uid = $row['t3ver_oid'];
                 }
                 $GLOBALS['TSFE']->register['uid'] = $uid;
                 $GLOBALS['TSFE']->register['title'] = strlen(trim($this->titles[$a])) > 0 ? $this->titles[$a] : $row['header'];
                 if ($this->titles[$a] == '' || !isset($this->titles[$a])) {
                     $this->titles[$a] = $this->cObj->cObjGetSingle($view['title'], $view['title.']);
                     $GLOBALS['TSFE']->register['title'] = $this->titles[$a];
                 }
                 $this->cElements[] = $this->cObj->cObjGetSingle($view['content'], $view['content.']);
                 $this->rels[] = $this->cObj->cObjGetSingle($view['rel'], $view['rel.']);
                 $this->content_id[$a] = $row['uid'];
                 $a++;
             }
         }
         // HOOK for additional views
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['jfmulticontent']['getViews'])) {
             foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['jfmulticontent']['getViews'] as $_classRef) {
                 $_procObj =& \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
                 if ($this->conf['config.']['view'] == $_procObj->getIdentifier()) {
                     if (!method_exists($_procObj, 'isActive') || method_exists($_procObj, 'isActive') && $_procObj->isActive()) {
                         // If the methode "isActive" not exists, this will be true...
                         $_procObj->main($this->content, $this->conf, $this);
                         $this->titles = $_procObj->getTitles();
                         $this->cElements = $_procObj->getElements();
                         $this->content_id = $_procObj->getIds();
                         if (method_exists($_procObj, 'getRels')) {
                             $this->rels = $_procObj->getRels();
                         }
                     }
                 }
             }
         }
         // define the key of the element
         $this->setContentKey('jfmulticontent_c' . $this->cObj->data['uid']);
     } else {
         // TS config will be used
         // define the key of the element
         if ($this->conf['config.']['contentKey']) {
             $this->setContentKey($this->conf['config.']['contentKey']);
         } else {
             $this->setContentKey('jfmulticontent_ts1');
         }
         // Render the contents
         if (count($this->conf['contents.']) > 0) {
             foreach ($this->conf['contents.'] as $key => $contents) {
                 $title = trim($this->cObj->cObjGetSingle($contents['title'], $contents['title.']));
                 $content = trim($this->cObj->cObjGetSingle($contents['content'], $contents['content.']));
                 if ($content) {
                     $this->titles[] = $title;
                     $this->cElements[] = $content;
                     $this->rels[] = $this->cObj->cObjGetSingle($contents['rel'], $contents['rel.']);
                     $this->content_id[] = $this->cObj->stdWrap($contents['id'], $contents['id.']);
                 }
             }
         }
     }
     $this->contentCount = count($this->cElements);
     // return FALSE, if there is no element
     if ($this->contentCount == 0) {
         return false;
     }
     // The template
     if (!($this->templateFile = $this->cObj->fileResource($this->conf['templateFile']))) {
         $this->templateFile = $this->cObj->fileResource('EXT:jfmulticontent/res/tx_jfmulticontent_pi1.tmpl');
     }
     // The template for JS
     if (!($this->templateFileJS = $this->cObj->fileResource($this->conf['templateFileJS']))) {
         $this->templateFileJS = $this->cObj->fileResource('EXT:jfmulticontent/res/tx_jfmulticontent_pi1.js');
     }
     // define the jQuery mode and function
     if ($this->conf['jQueryNoConflict']) {
         $jQueryNoConflict = 'jQuery.noConflict();';
     } else {
         $jQueryNoConflict = '';
     }
     // style
     switch ($this->conf['config.']['style']) {
         case '2column':
             $this->templatePart = 'TEMPLATE_COLUMNS';
             $this->contentCount = 2;
             $this->classes = array($this->conf['config.']['column1'], $this->conf['config.']['column2']);
             $this->contentClass = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['2columnClasses']);
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['columnWrap.']['wrap']);
             break;
         case '3column':
             $this->templatePart = 'TEMPLATE_COLUMNS';
             $this->contentCount = 3;
             $this->classes = array($this->conf['config.']['column1'], $this->conf['config.']['column2'], $this->conf['config.']['column3']);
             $this->contentClass = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['3columnClasses']);
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['columnWrap.']['wrap']);
             break;
         case '4column':
             $this->templatePart = 'TEMPLATE_COLUMNS';
             $this->contentCount = 4;
             $this->classes = array($this->conf['config.']['column1'], $this->conf['config.']['column2'], $this->conf['config.']['column3'], $this->conf['config.']['column4']);
             $this->contentClass = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['4columnClasses']);
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['columnWrap.']['wrap']);
             break;
         case '5column':
             $this->templatePart = 'TEMPLATE_COLUMNS';
             $this->contentCount = 5;
             $this->classes = array($this->conf['config.']['column1'], $this->conf['config.']['column2'], $this->conf['config.']['column3'], $this->conf['config.']['column4'], $this->conf['config.']['column5']);
             $this->contentClass = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['5columnClasses']);
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['columnWrap.']['wrap']);
             break;
         case 'tab':
             // jQuery Tabs
             $this->templatePart = 'TEMPLATE_TAB';
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['tabWrap.']['wrap']);
             // the id attribute is not permitted in tabs-style
             if (count($this->attributes) > 0) {
                 foreach ($this->attributes as $key => $attribute) {
                     if (preg_match("/id=[\"|\\'](.*?)[\"|\\']/i", $attribute, $preg)) {
                         $this->attributes[$key] = trim(str_replace($preg[0], '', $attribute));
                     }
                 }
             }
             $this->pagerenderer->addJS($jQueryNoConflict);
             $options = array();
             if ($this->conf['config.']['tabCollapsible']) {
                 $options['collapsible'] = 'collapsible:true';
                 if (!$this->conf['config.']['tabOpen']) {
                     $options['active'] = 'active:false';
                 }
             }
             if ($this->conf['config.']['tabRandomContent']) {
                 $options['active'] = "active:Math.floor(Math.random()*{$this->contentCount})";
             } elseif (is_numeric($this->conf['config.']['tabOpen'])) {
                 $options['active'] = 'active:' . ($this->conf['config.']['tabOpen'] - 1);
             }
             if (in_array($this->conf['config.']['tabEvent'], array('click', 'mouseover'))) {
                 $options['event'] = "event:'{$this->conf['config.']['tabEvent']}'";
             }
             if (in_array($this->conf['config.']['tabHeightStyle'], array('auto', 'fill', 'content'))) {
                 $options['heightStyle'] = "heightStyle:'{$this->conf['config.']['tabHeightStyle']}'";
             }
             // Add Cookies script, if cookie is active
             if ($this->conf['config.']['tabCookieExpires'] > 0 && $this->conf['config.']['tabOpen'] != -1) {
                 if (T3JQUERY !== true) {
                     $this->pagerenderer->addJsFile($this->conf['jQueryCookies']);
                 }
                 unset($options['active']);
                 $cookie_path = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI');
                 if ($this->lConf['tabCookieRoot'] || preg_match("/^\\/index.php/i", $cookie_path)) {
                     $cookie_path = '/';
                 }
                 $options['activate'] = "activate:function(e,ui) { jQuery.cookie('{$this->getContentKey()}', ui.newTab.index(), { expires: " . $this->conf['config.']['tabCookieExpires'] . ", path:'{$cookie_path}' }); }";
                 $options['active'] = "active:jQuery.cookie('{$this->getContentKey()}')";
             }
             if ($this->conf['config.']['tabHideEffect'] == 'none') {
                 $options['hide'] = 'hide:false';
             } elseif ($this->conf['config.']['tabHideEffect']) {
                 $fx = array();
                 $fx[] = "effect:'{$this->conf['config.']['tabHideEffect']}'";
                 if (is_numeric($this->conf['config.']['tabHideTransitionduration'])) {
                     $fx[] = "duration:'{$this->conf['config.']['tabHideTransitionduration']}'";
                 }
                 if ($this->conf['config.']['tabHideTransition']) {
                     $fx[] = "easing:'" . (in_array($this->conf['config.']['tabHideTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['tabHideTransitiondir']}") . "{$this->conf['config.']['tabHideTransition']}'";
                 }
                 $options['hide'] = 'hide:{' . implode(',', $fx) . '}';
             }
             if ($this->conf['config.']['tabShowEffect'] == 'none') {
                 $options['show'] = 'show:false';
             } elseif ($this->conf['config.']['tabShowEffect']) {
                 $fx = array();
                 $fx[] = "effect:'{$this->conf['config.']['tabShowEffect']}'";
                 if (is_numeric($this->conf['config.']['tabShowTransitionduration'])) {
                     $fx[] = "duration:'{$this->conf['config.']['tabShowTransitionduration']}'";
                 }
                 if ($this->conf['config.']['tabShowTransition']) {
                     $fx[] = "easing:'" . (in_array($this->conf['config.']['tabShowTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['tabShowTransitiondir']}") . "{$this->conf['config.']['tabShowTransition']}'";
                 }
                 $options['show'] = 'show:{' . implode(',', $fx) . '}';
             }
             // overwrite all options if set
             if ($this->conf['config.']['tabOptionsOverride']) {
                 $options = array($this->conf['config.']['tabOptions']);
             } else {
                 if ($this->conf['config.']['tabOptions']) {
                     $options['options'] = $this->conf['config.']['tabOptions'];
                 }
             }
             // get the Template of the Javascript
             $markerArray = array();
             // get the template
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_TAB_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_TAB_JS is missing', true);
             }
             // open tab by hash
             if ($this->confArr['tabSelectByHash']) {
                 $tabSelector = trim($this->cObj->getSubpart($templateCode, '###TAB_SELECT_BY_HASH###'));
             } else {
                 $tabSelector = null;
             }
             $templateCode = trim($this->cObj->substituteSubpart($templateCode, '###TAB_SELECT_BY_HASH###', $tabSelector, 0));
             // app the open-link-template
             if ($this->confArr['openExternalLink']) {
                 $openExtLink = trim($this->cObj->getSubpart($templateCode, '###OPEN_EXTERNAL_LINK###'));
             } else {
                 $openExtLink = null;
             }
             $templateCode = trim($this->cObj->substituteSubpart($templateCode, '###OPEN_EXTERNAL_LINK###', $openExtLink, 0));
             // Replace default values
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['PREG_QUOTE_KEY'] = preg_quote($this->getContentKey(), '/');
             $markerArray['OPTIONS'] = implode(', ', $options);
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
                 $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
                 $this->pagerenderer->addJsFile($this->conf['jQueryUI']);
             }
             $this->pagerenderer->addCssFile($this->conf['jQueryUIstyle']);
             $this->pagerenderer->addJS($templateCode);
             break;
         case 'accordion':
             // jQuery Accordion
             $this->templatePart = 'TEMPLATE_ACCORDION';
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['accordionWrap.']['wrap']);
             $this->pagerenderer->addJS($jQueryNoConflict);
             $options = array();
             if ($this->conf['config.']['accordionCollapsible']) {
                 $options['collapsible'] = 'collapsible:true';
             }
             if ($this->conf['config.']['accordionClosed']) {
                 $options['active'] = 'active:false';
                 $options['collapsible'] = 'collapsible:true';
             } elseif ($this->conf['config.']['accordionRandomContent']) {
                 $options['active'] = "active:Math.floor(Math.random()*{$this->contentCount})";
             } elseif ($this->conf['config.']['accordionOpen'] > 0) {
                 $options['active'] = 'active:' . ($this->conf['config.']['accordionOpen'] - 1);
             }
             if (in_array($this->conf['config.']['accordionEvent'], array('click', 'mouseover'))) {
                 $options['event'] = "event:'{$this->conf['config.']['accordionEvent']}'";
             }
             if (in_array($this->conf['config.']['accordionHeightStyle'], array('auto', 'fill', 'content'))) {
                 $options['heightStyle'] = "heightStyle:'{$this->conf['config.']['accordionHeightStyle']}'";
             }
             // get the Template of the Javascript
             $markerArray = array();
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['CONTENT_COUNT'] = $this->contentCount;
             $markerArray['EASING'] = in_array($this->conf['config.']['accordionTransition'], array('swing', 'linear')) ? '' : 'ease' . $this->conf['config.']['accordionTransitiondir'] . $this->conf['config.']['accordionTransition'];
             $markerArray['TRANS_DURATION'] = is_numeric($this->conf['config.']['accordionTransitionduration']) ? $this->conf['config.']['accordionTransitionduration'] : 1000;
             // get the template for the Javascript
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_ACCORDION_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_ACCORDION_JS is missing', true);
             }
             $easingAnimation = null;
             if (!$this->conf['config.']['accordionAnimate']) {
                 $options['animate'] = 'animate:false';
             } else {
                 $fx = array();
                 if (is_numeric($this->conf['config.']['accordionTransitionduration'])) {
                     $fx[] = "duration:'{$this->conf['config.']['accordionTransitionduration']}'";
                 }
                 if ($this->conf['config.']['accordionTransition']) {
                     $fx[] = "easing:'" . (in_array($this->conf['config.']['accordionTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['accordionTransitiondir']}") . "{$this->conf['config.']['accordionTransition']}'";
                 }
                 $options['animate'] = 'animate:{' . implode(',', $fx) . '}';
             }
             // app the open-link-template
             if ($this->confArr['openExternalLink']) {
                 $openExtLink = trim($this->cObj->getSubpart($templateCode, '###OPEN_EXTERNAL_LINK###'));
             } else {
                 $openExtLink = null;
             }
             $templateCode = trim($this->cObj->substituteSubpart($templateCode, '###OPEN_EXTERNAL_LINK###', $openExtLink, 0));
             // open tab by hash
             if ($this->confArr['tabSelectByHash']) {
                 $tabSelector = trim($this->cObj->getSubpart($templateCode, '###TAB_SELECT_BY_HASH###'));
             } else {
                 $tabSelector = null;
             }
             $templateCode = trim($this->cObj->substituteSubpart($templateCode, '###TAB_SELECT_BY_HASH###', $tabSelector, 0));
             // overwrite all options if set
             if ($this->conf['config.']['accordionOptionsOverride']) {
                 $options = array($this->conf['config.']['accordionOptions']);
             } else {
                 if ($this->conf['config.']['accordionOptions']) {
                     $options['options'] = $this->conf['config.']['accordionOptions'];
                 }
             }
             // Replace default values
             $markerArray['OPTIONS'] = implode(', ', $options);
             // Replace all markers
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
                 $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
                 $this->pagerenderer->addJsFile($this->conf['jQueryUI']);
             }
             $this->pagerenderer->addCssFile($this->conf['jQueryUIstyle']);
             $this->pagerenderer->addJS(trim($templateCode));
             break;
         case 'slider':
             // anythingslider
             $this->templatePart = 'TEMPLATE_SLIDER';
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['sliderWrap.']['wrap']);
             $this->pagerenderer->addJS($jQueryNoConflict);
             //
             if ($this->conf['config.']['sliderTransition']) {
                 $options[] = "easing: '" . (in_array($this->conf['config.']['sliderTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['sliderTransitiondir']}") . "{$this->conf['config.']['sliderTransition']}'";
             }
             if ($this->conf['config.']['sliderTransitionduration'] > 0) {
                 $options[] = "animationTime: {$this->conf['config.']['sliderTransitionduration']}";
             }
             if ($this->conf['config.']['sliderAutoplay']) {
                 $options[] = 'autoPlay: true';
             } else {
                 $options[] = 'autoPlay: false';
             }
             if ($this->conf['config.']['delayDuration'] > 0) {
                 $options[] = "delay: {$this->conf['config.']['delayDuration']}";
                 $options[] = 'startStopped: ' . ($this->conf['config.']['sliderAutoStart'] ? 'false' : 'true');
                 $options[] = 'stopAtEnd: ' . ($this->conf['config.']['sliderStopAtEnd'] ? 'true' : 'false');
             } else {
                 // Toggle only if not autoplay
                 $options[] = 'toggleArrows: ' . ($this->conf['config.']['sliderToggleArrows'] ? 'true' : 'false');
                 $options[] = 'toggleControls: ' . ($this->conf['config.']['sliderToggleControls'] ? 'true' : 'false');
             }
             $sliderWidth = trim($this->conf['config.']['sliderWidth']);
             $sliderHeight = trim($this->conf['config.']['sliderHeight']);
             if ($sliderWidth || $sliderHeight) {
                 if (is_numeric($sliderWidth)) {
                     $sliderWidth .= 'px';
                 }
                 if (is_numeric($sliderHeight)) {
                     $sliderHeight .= 'px';
                 }
                 $this->pagerenderer->addCSS("#{$this->getContentKey()} {\n" . ($sliderWidth ? "\twidth: {$sliderWidth};\n" : '') . ($sliderHeight ? "\theight: {$sliderHeight};\n" : '') . '}');
             }
             if ($this->conf['config.']['sliderResizeContents']) {
                 $options[] = 'resizeContents: true';
             }
             $this->pagerenderer->addCssFile($this->conf['sliderCSS']);
             $this->pagerenderer->addCssFileInc($this->conf['sliderCSSie7'], 'lte IE 7');
             if ($this->conf['config.']['sliderTheme']) {
                 $options[] = "theme: '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->conf['config.']['sliderTheme']) . "'";
                 if (substr($this->confArr['anythingSliderThemeFolder'], 0, 4) === 'EXT:') {
                     list($extKey, $local) = explode('/', substr($this->confArr['anythingSliderThemeFolder'], 4), 2);
                     $anythingSliderThemeFolder = t3lib_extMgm::siteRelPath($extKey) . $local;
                 } else {
                     $anythingSliderThemeFolder = $this->confArr['anythingSliderThemeFolder'];
                 }
                 $this->pagerenderer->addCssFile(\TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($anythingSliderThemeFolder) . $this->conf['config.']['sliderTheme'] . '/style.css');
             }
             if ($this->conf['config.']['sliderMode']) {
                 $options[] = "mode: '" . $this->conf['config.']['sliderMode'] . "'";
             }
             $options[] = 'buildArrows: ' . ($this->conf['config.']['sliderBuildArrows'] ? 'true' : 'false');
             $options[] = 'allowRapidChange: ' . ($this->conf['config.']['sliderAllowRapidChange'] ? 'true' : 'false');
             $options[] = 'resumeOnVideoEnd: ' . ($this->conf['config.']['sliderResumeOnVideoEnd'] ? 'true' : 'false');
             $options[] = 'playRtl: ' . ($this->conf['config.']['sliderPlayRtl'] ? 'true' : 'false');
             $options[] = 'hashTags: ' . ($this->conf['config.']['sliderHashTags'] ? 'true' : 'false');
             $options[] = 'pauseOnHover: ' . ($this->conf['config.']['sliderPauseOnHover'] ? 'true' : 'false');
             $options[] = 'buildNavigation: ' . ($this->conf['config.']['sliderNavigation'] ? 'true' : 'false');
             $options[] = 'buildStartStop: ' . ($this->conf['config.']['sliderStartStop'] ? 'true' : 'false');
             $options[] = "startText: '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->pi_getLL('slider_start')) . "'";
             $options[] = "stopText: '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->pi_getLL('slider_stop')) . "'";
             if ($this->pi_getLL('slider_forward')) {
                 $options[] = "forwardText: '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->pi_getLL('slider_forward')) . "'";
             }
             if ($this->pi_getLL('slider_back')) {
                 $options[] = "backText: '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->pi_getLL('slider_back')) . "'";
             }
             // define the paneltext
             if ($this->conf['config.']['sliderPanelFromHeader']) {
                 $tab = array();
                 for ($a = 0; $a < $this->contentCount; $a++) {
                     $tab[] = 'if(i==' . ($a + 1) . ') return ' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->titles[$a]) . ';';
                 }
                 $options[] = "navigationFormatter: function(i,p){\n\t\t\t" . implode("\n\t\t\t", $tab) . "\n\t\t}";
             } elseif (trim($this->pi_getLL('slider_panel'))) {
                 $options[] = "navigationFormatter: function(i,p){ var str = '" . \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($this->pi_getLL('slider_panel')) . "'; return str.replace('%i%',i); }";
             }
             if ($this->conf['config.']['sliderRandomContent']) {
                 $options[] = 'startPanel: Math.floor(Math.random()*' . ($this->contentCount + 1) . ')';
             } elseif ($this->conf['config.']['sliderOpen'] > 1) {
                 $options[] = 'startPanel: ' . ($this->conf['config.']['sliderOpen'] < $this->contentCount ? $this->conf['config.']['sliderOpen'] : $this->contentCount);
             }
             // overwrite all options if set
             if ($this->conf['config.']['sliderOptionsOverride']) {
                 $options = array($this->conf['config.']['sliderOptions']);
             } else {
                 if ($this->conf['config.']['sliderOptions']) {
                     $options[] = $this->conf['config.']['sliderOptions'];
                 }
             }
             // get the Template of the Javascript
             $markerArray = array();
             // get the template
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_SLIDER_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_SLIDER_JS is missing', true);
             }
             // Replace default values
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['OPTIONS'] = implode(', ', $options);
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
                 $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
             }
             $this->pagerenderer->addJsFile($this->conf['sliderJS']);
             if ($this->conf['config.']['sliderResumeOnVideoEnd']) {
                 $this->pagerenderer->addJsFile($this->conf['sliderJSvideo']);
             }
             $this->pagerenderer->addJS($templateCode);
             break;
         case 'slidedeck':
             // SlideDeck
             $this->templatePart = 'TEMPLATE_SLIDEDECK';
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['slidedeckWrap.']['wrap']);
             $this->pagerenderer->addJS($jQueryNoConflict);
             $options = array();
             if ($this->conf['config.']['slidedeckTransitionduration']) {
                 $options['speed'] = "speed: {$this->conf['config.']['slidedeckTransitionduration']}";
             }
             if ($this->conf['config.']['slidedeckTransition']) {
                 $options['transition'] = "transition: '" . (in_array($this->conf['config.']['slidedeckTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['slidedeckTransitiondir']}") . "{$this->conf['config.']['slidedeckTransition']}'";
             }
             if ($this->conf['config.']['slidedeckStart']) {
                 $options['start'] = "start: {$this->conf['config.']['slidedeckStart']}";
             }
             $options['activeCorner'] = 'activeCorner: ' . ($this->conf['config.']['slidedeckActivecorner'] ? 'true' : 'false');
             $options['index'] = 'index: ' . ($this->conf['config.']['slidedeckIndex'] ? 'true' : 'false');
             $options['scroll'] = 'scroll: ' . ($this->conf['config.']['slidedeckScroll'] ? 'true' : 'false');
             $options['keys'] = 'keys: ' . ($this->conf['config.']['slidedeckKeys'] ? 'true' : 'false');
             $options['hideSpines'] = 'hideSpines: ' . ($this->conf['config.']['slidedeckHidespines'] ? 'true' : 'false');
             if ($this->conf['config.']['delayDuration'] > 0) {
                 $options['autoPlay'] = 'autoPlay: true';
                 $options['autoPlayInterval'] = "autoPlayInterval: {$this->conf['config.']['delayDuration']}";
                 $options['cycle'] = 'cycle: ' . ($this->conf['config.']['autoplayCycle'] ? 'true' : 'false');
             }
             // overwrite all options if set
             if ($this->conf['config.']['slidedeckOptionsOverride']) {
                 $options = array($this->conf['config.']['slidedeckOptions']);
             } else {
                 if ($this->conf['config.']['slidedeckOptions']) {
                     $options['options'] = $this->conf['config.']['slidedeckOptions'];
                 }
             }
             // get the template for the Javascript
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_SLIDEDECK_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_SLIDEDECK_JS is missing', true);
             }
             // Replace default values
             $markerArray = array();
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['HEIGHT'] = $this->conf['config.']['slidedeckHeight'] > 0 ? $this->conf['config.']['slidedeckHeight'] : 300;
             $markerArray['OPTIONS'] = implode(', ', $options);
             // Replace all markers
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
                 $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
             }
             $this->pagerenderer->addJsFile($this->conf['slidedeckJS']);
             $this->pagerenderer->addCssFile($this->conf['slidedeckCSS']);
             if ($this->conf['config.']['slidedeckScroll']) {
                 $this->pagerenderer->addJsFile($this->conf['jQueryMouseWheel']);
             }
             $this->pagerenderer->addJS(trim($templateCode));
             break;
         case 'easyaccordion':
             // easyaccordion
             $this->templatePart = 'TEMPLATE_EASYACCORDION';
             $this->additionalMarker['SKIN'] = $this->conf['config.']['easyaccordionSkin'];
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['easyaccordionWrap.']['wrap']);
             $this->pagerenderer->addJS($jQueryNoConflict);
             $options = array();
             if ($this->conf['config.']['delayDuration'] > 0) {
                 $options['autoStart'] = 'autoStart: true';
                 $options['slideInterval'] = "slideInterval: {$this->conf['config.']['delayDuration']}";
             }
             $options['slideNum'] = 'slideNum: ' . ($this->conf['config.']['easyaccordionSlideNum'] ? 'true' : 'false');
             // overwrite all options if set
             if ($this->conf['config.']['optionsOverride']) {
                 $options = array($this->conf['config.']['slideOptions']);
             } else {
                 if ($this->conf['config.']['slideOptions']) {
                     $options['options'] = $this->conf['config.']['slideOptions'];
                 }
             }
             // get the template for the Javascript
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_EASYACCORDION_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_EASYACCORDION_JS is missing', true);
             }
             // Replace default values
             $markerArray = array();
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['WIDTH'] = $this->conf['config.']['easyaccordionWidth'] > 0 ? $this->conf['config.']['easyaccordionWidth'] : 600;
             $markerArray['OPTIONS'] = implode(', ', $options);
             // Replace all markers
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
             }
             $this->pagerenderer->addJsFile($this->conf['easyaccordionJS']);
             $this->pagerenderer->addCssFile($this->conf['easyaccordionCSS']);
             $this->pagerenderer->addCssFile($this->confArr['easyAccordionSkinFolder'] . $this->conf['config.']['easyaccordionSkin'] . '/style.css');
             $this->pagerenderer->addJS(trim($templateCode));
             break;
         case 'booklet':
             // easyaccordion
             $this->templatePart = 'TEMPLATE_BOOKLET';
             $this->contentWrap = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|*|', $this->conf['bookletWrap.']['wrap']);
             $this->pagerenderer->addJS($jQueryNoConflict);
             $options = array();
             if (is_numeric($this->conf['config.']['bookletWidth'])) {
                 $options['width'] = 'width: ' . $this->conf['config.']['bookletWidth'];
             }
             if (is_numeric($this->conf['config.']['bookletHeight'])) {
                 $options['height'] = 'height: ' . $this->conf['config.']['bookletHeight'];
             }
             if (is_numeric($this->conf['config.']['bookletSpeed'])) {
                 $options['speed'] = 'speed: ' . $this->conf['config.']['bookletSpeed'];
             }
             if (is_numeric($this->conf['config.']['bookletStartingPage'])) {
                 $options['startingPage'] = 'startingPage: ' . $this->conf['config.']['bookletStartingPage'];
             }
             if ($this->conf['config.']['bookletRTL']) {
                 $options['direction'] = "direction: 'RTL'";
             }
             if ($this->conf['config.']['bookletTransition']) {
                 $options['transition'] = "easing: '" . (in_array($this->conf['config.']['bookletTransition'], array('swing', 'linear')) ? '' : "ease{$this->conf['config.']['bookletTransitiondir']}") . "{$this->conf['config.']['bookletTransition']}'";
             }
             if (is_numeric($this->conf['config.']['bookletPagePadding'])) {
                 $options['pagePadding'] = 'pagePadding: ' . $this->conf['config.']['bookletPagePadding'];
             }
             $options['pageNumbers'] = 'pageNumbers: ' . ($this->conf['config.']['bookletPageNumbers'] ? 'true' : 'false');
             $options['manual'] = 'manual: ' . ($this->conf['config.']['bookletManual'] ? 'true' : 'false');
             $options['shadows'] = 'shadows: ' . ($this->conf['config.']['bookletShadows'] ? 'true' : 'false');
             $options['closed'] = 'closed: ' . ($this->conf['config.']['bookletClosed'] ? 'true' : 'false');
             $options['covers'] = 'covers: ' . ($this->conf['config.']['bookletCovers'] ? 'true' : 'false');
             $options['autoCenter'] = 'autoCenter: ' . ($this->conf['config.']['bookletAutoCenter'] ? 'true' : 'false');
             $options['hash'] = 'hash: ' . ($this->conf['config.']['bookletHash'] ? 'true' : 'false');
             $options['keyboard'] = 'keyboard: ' . ($this->conf['config.']['bookletKeyboard'] ? 'true' : 'false');
             $options['overlays'] = 'overlays: ' . ($this->conf['config.']['bookletOverlays'] ? 'true' : 'false');
             $options['arrows'] = 'arrows: ' . ($this->conf['config.']['bookletArrows'] ? 'true' : 'false');
             $options['arrowsHide'] = 'arrowsHide: ' . ($this->conf['config.']['bookletArrowsHide'] ? 'true' : 'false');
             $options['hovers'] = 'hovers: ' . ($this->conf['config.']['bookletHovers'] ? 'true' : 'false');
             // overwrite all options if set
             if ($this->conf['config.']['bookletOptionsOverride']) {
                 $options = array($this->conf['config.']['bookletOptions']);
             } else {
                 if ($this->conf['config.']['bookletOptions']) {
                     $options['options'] = $this->conf['config.']['bookletOptions'];
                 }
             }
             // get the template for the Javascript
             if (!($templateCode = trim($this->cObj->getSubpart($this->templateFileJS, '###TEMPLATE_BOOKLET_JS###')))) {
                 $templateCode = $this->outputError('Template TEMPLATE_BOOKLET_JS is missing', true);
             }
             // Replace default values
             $markerArray = array();
             $markerArray['KEY'] = $this->getContentKey();
             $markerArray['OPTIONS'] = implode(",\n\t\t", $options);
             // Replace all markers
             $templateCode = $this->cObj->substituteMarkerArray($templateCode, $markerArray, '###|###', 0);
             // Add all CSS and JS files
             if (T3JQUERY === true) {
                 tx_t3jquery::addJqJS();
             } else {
                 $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
                 $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
             }
             $this->pagerenderer->addJsFile($this->conf['bookletJS']);
             $this->pagerenderer->addCssFile($this->conf['bookletCSS']);
             $this->pagerenderer->addJS(trim($templateCode));
             break;
         default:
             return $this->outputError('NO VALID TEMPLATE SELECTED', false);
     }
     // add the CSS file
     $this->pagerenderer->addCssFile($this->conf['cssFile']);
     // Add the ressources
     if (!$this->conf['disableJs']) {
         $this->pagerenderer->addResources();
     }
     // Render the Template
     $content = $this->renderTemplate();
     return $this->pi_wrapInBaseClass($content);
 }
<?php

/* Add Hooks */
if (TYPO3_MODE != 'BE') {
    if (class_exists(t3lib_utility_VersionNumber)) {
        $TYPO3_version = t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version);
    } else {
        $TYPO3_version = t3lib_div::int_from_ver(TYPO3_version);
    }
    if ($TYPO3_version >= 4003000) {
        $confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3jquery']);
        if ($confArr['alwaysIntegrate']) {
            require_once t3lib_extMgm::extPath('t3jquery') . 'class.tx_t3jquery.php';
            tx_t3jquery::addJqJS();
        }
    }
}
Example #10
0
	/**
	 * Safe the file to disc
	 * 
	 * @param $block string
	 * @return void
	 */
	function safeJqFile($block='')
	{
		t3lib_div::writeFile($this->configDir . tx_t3jquery::getJqName(), $block);
	}
 function includeJquery()
 {
     if (t3lib_extMgm::isLoaded('t3jquery')) {
         require_once t3lib_extMgm::extPath('t3jquery') . 'class.tx_t3jquery.php';
     }
     // checks if t3jquery is loaded
     if (T3JQUERY === true) {
         tx_t3jquery::addJqJS();
         $out = "\n<!-- jquery: t3jquery -->";
     } else {
         $out = '<script src="fileadmin/res/jquery/js/jquery-1.9.1.min.js" type="text/javascript"></script>';
     }
     return $out;
 }
 /**
  * Parse all images into the template
  * 
  * @param string $dir
  * @param boolean $onlyJS
  * @return string
  */
 public function parseTemplate($dir = '', $onlyJS = false)
 {
     $this->pagerenderer = t3lib_div::makeInstance('tx_imagecarousel_pagerenderer');
     $this->pagerenderer->setConf($this->conf);
     // define the directory of images
     if ($dir == '') {
         $dir = $this->imageDir;
     }
     // define the contentKey if not exist
     if ($this->getContentKey() == '') {
         $this->setContentKey($this->extKey . '_key');
     }
     // define the jQuery mode and function
     if ($this->conf['jQueryNoConflict']) {
         $jQueryNoConflict = "jQuery.noConflict();";
     } else {
         $jQueryNoConflict = "";
     }
     preg_match("/^([0-9]*)/i", $this->conf['imagewidth'], $reg_width);
     preg_match("/^([0-9]*)/i", $this->conf['imageheight'], $reg_height);
     $css_width = is_numeric($reg_width[1]) ? $reg_width[1] . "px" : $this->conf['imagewidth'];
     $css_height = is_numeric($reg_height[1]) ? $reg_height[1] . "px" : $this->conf['imageheight'];
     // add CSS file for skin
     $skin_class = null;
     if ($this->conf['skin']) {
         $confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['imagecarousel']);
         $this->pagerenderer->addCssFile("{$confArr['skinFolder']}/{$this->conf['skin']}/skin.css");
         $skin_class = "jcarousel-skin-{$this->conf['skin']}";
     }
     // checks if t3jquery is loaded
     if (T3JQUERY === true) {
         tx_t3jquery::addJqJS();
     } else {
         $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
         $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
     }
     // define the js files
     $this->pagerenderer->addJsFile($this->conf['jQueryCarousel']);
     $this->pagerenderer->addJsFile($this->conf['jsScript']);
     // get the options from config
     $options = array();
     $options[] = "size: " . count($this->images);
     if ($this->conf['vertical']) {
         // turn off the externalcontrol
         $this->conf['externalcontrol'] = 0;
         $options[] = "vertical: true";
     }
     if ($this->conf['auto'] > 0) {
         $options[] = "auto: " . $this->conf['auto'] / 1000;
     }
     if (in_array($this->conf['transition'], array('linear', 'swing'))) {
         $options[] = "easing: '{$this->conf['transition']}'";
     } elseif ($this->conf['transitiondir'] && $this->conf['transition']) {
         $options[] = "easing: 'ease{$this->conf['transitiondir']}{$this->conf['transition']}'";
     }
     if ($this->conf['transitionduration'] > 0) {
         $options[] = "animation: {$this->conf['transitionduration']}";
     }
     if (in_array($this->conf['movewrap'], array("first", "last", "both", "circular"))) {
         if (!($this->conf['externalcontrol'] && $this->conf['movewrap'] == "circular")) {
             $options[] = "wrap: '{$this->conf['movewrap']}'";
         }
     }
     if ($this->conf['rtl']) {
         $options[] = "rtl: true";
     }
     if ($this->conf['scroll'] > 0) {
         if ($this->conf['scroll'] > count($this->images)) {
             $this->conf['scroll'] = count($this->images);
         }
         $options[] = "scroll: {$this->conf['scroll']}";
     }
     // init Callback
     $initCallback[] = "imagecarousel.initCallback('#{$this->getContentKey()}',carousel,state)";
     if ($this->conf['stoponmouseover'] == 1) {
         $initCallback[] = "imagecarousel.initCallbackMouseover(carousel,state)";
     }
     $options[] = "initCallback: function(carousel,state){" . implode(";", $initCallback) . ";}";
     // hide buttons
     if ($this->conf['hidenextbutton']) {
         $options[] = "buttonNextHTML: null";
     }
     if ($this->conf['hidepreviousbutton']) {
         $options[] = "buttonPrevHTML: null";
     }
     // fallback for childElem
     if (!$this->conf['carousel.'][$this->type . '.']['childElem']) {
         $this->conf['carousel.'][$this->type . '.']['childElem'] = 'li';
     }
     $random_script = null;
     if ($this->conf['random']) {
         $random_script = "\n\timagecarousel.randomize('#{$this->getContentKey()}','{$this->conf['carousel.'][$this->type . '.']['childElem']}');";
     }
     // caption
     $jQueryCaptify = null;
     if ($this->conf['showCaption']) {
         $captions = array();
         if ($this->conf['animation']) {
             $captions[] = "animation: " . t3lib_div::quoteJSvalue($this->conf['animation']);
         }
         if ($this->conf['position']) {
             $captions[] = "position: " . t3lib_div::quoteJSvalue($this->conf['position']);
         }
         if ($this->conf['speedOver']) {
             $captions[] = "speedOver: " . t3lib_div::quoteJSvalue($this->conf['speedOver']);
         }
         if ($this->conf['speedOut']) {
             $captions[] = "speedOut: " . t3lib_div::quoteJSvalue($this->conf['speedOut']);
         }
         if ($this->conf['hideDelay']) {
             $captions[] = "hideDelay: " . t3lib_div::quoteJSvalue($this->conf['hideDelay']);
         }
         if ($this->conf['prefix']) {
             $captions[] = "prefix: " . t3lib_div::quoteJSvalue($this->conf['prefix']);
         }
         if ($this->conf['opacity']) {
             $captions[] = "opacity: " . t3lib_div::quoteJSvalue($this->conf['opacity']);
         }
         if ($this->conf['className']) {
             $captions[] = "className: " . t3lib_div::quoteJSvalue($this->conf['className']);
         }
         if ($this->conf['spanWidth']) {
             $captions[] = "spanWidth: " . t3lib_div::quoteJSvalue($this->conf['spanWidth']);
         }
         $this->pagerenderer->addJsFile($this->conf['jQueryCaptify']);
         $jQueryCaptify = "\n\tjQuery('#{$this->getContentKey()} img.captify').captify(" . (count($captions) ? "{\n\t\t" . implode(",\n\t\t", $captions) . "\n\t}" : "") . ");";
     }
     $this->pagerenderer->addJS($jQueryNoConflict . "\njQuery(document).ready(function() { {$random_script}\n\tjQuery('#{$this->getContentKey()}-outer').css('display', 'block');\n\tjQuery('#{$this->getContentKey()}').jcarousel(" . (count($options) ? "{\n\t\t" . implode(",\n\t\t", $options) . "\n\t}" : "") . ");{$jQueryCaptify}\n});\n");
     if (is_numeric($this->conf['carouselwidth'])) {
         $this->pagerenderer->addCSS("\n#c{$this->cObj->data['uid']} .jcarousel-clip-horizontal,\n#c{$this->cObj->data['uid']} .jcarousel-container-horizontal {\n\twidth: {$this->conf['carouselwidth']}px;" . ($this->conf['carouselheight'] ? "\n\theight: {$this->conf['carouselheight']}px;" : "") . "\n}\n");
     }
     if (is_numeric($this->conf['carouselheight'])) {
         $this->pagerenderer->addCSS("\n#c{$this->cObj->data['uid']} .jcarousel-clip-vertical,\n#c{$this->cObj->data['uid']} .jcarousel-container-vertical {\n\theight: {$this->conf['carouselheight']}px;" . ($this->conf['carouselwidth'] ? "\n\twidth: {$this->conf['carouselwidth']}px;" : "") . "\n}\n");
     }
     $this->pagerenderer->addCSS("\n#{$this->getContentKey()}-outer {\n\tdisplay: none;\n}\n#c{$this->cObj->data['uid']} .jcarousel-item {\n\twidth: {$css_width};\n\theight: {$css_height};\n}");
     // Add the ressources
     $this->pagerenderer->addResources();
     if ($onlyJS === true) {
         return true;
     }
     $return_string = null;
     $images = null;
     $navigation = null;
     $markerArray = array();
     $GLOBALS['TSFE']->register['key'] = $this->getContentKey();
     $GLOBALS['TSFE']->register['class'] = $skin_class;
     $GLOBALS['TSFE']->register['imagewidth'] = $this->conf['imagewidth'];
     $GLOBALS['TSFE']->register['imageheight'] = $this->conf['imageheight'];
     $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = 0;
     if (count($this->images) > 0) {
         foreach ($this->images as $key => $image_name) {
             $image = null;
             $imgConf = $this->conf['carousel.'][$this->type . '.']['image.'];
             $totalImagePath = $this->imageDir . $image_name;
             $GLOBALS['TSFE']->register['file'] = $totalImagePath;
             $GLOBALS['TSFE']->register['href'] = $this->hrefs[$key];
             $GLOBALS['TSFE']->register['caption'] = $this->captions[$key];
             $GLOBALS['TSFE']->register['description'] = $this->description[$key];
             $GLOBALS['TSFE']->register['CURRENT_ID'] = $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] + 1;
             if ($this->hrefs[$key]) {
                 $imgConf['imageLinkWrap.'] = $imgConf['imageHrefWrap.'];
             }
             $image = $this->cObj->IMAGE($imgConf);
             $images .= $this->cObj->typolink($image, $imgConf['imageLinkWrap.']);
             // create the navigation
             if ($this->conf['externalcontrol']) {
                 $navigation .= trim($this->cObj->cObjGetSingle($this->conf['carousel.'][$this->type . '.']['navigation'], $this->conf['carousel.'][$this->type . '.']['navigation.']));
             }
             $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT']++;
         }
         $markerArray['NAVIGATION'] = $this->cObj->stdWrap($navigation, $this->conf['carousel.'][$this->type . '.']['navigationWrap.']);
         // the stdWrap
         $images = $this->cObj->stdWrap($images, $this->conf['carousel.'][$this->type . '.']['stdWrap.']);
         $return_string = $this->cObj->substituteMarkerArray($images, $markerArray, '###|###', 0);
     }
     return $this->pi_wrapInBaseClass($return_string);
 }
 /**
  * The main method of the PlugIn
  *
  * @param	string		$content: The PlugIn content
  * @param	array		$conf: The PlugIn configuration
  * @return	The content that is displayed on the website
  */
 function main($content, $conf)
 {
     $this->conf = $conf;
     $this->pagerenderer = t3lib_div::makeInstance('tx_feuserfriends_pagerenderer');
     $this->pagerenderer->setConf($this->conf);
     $this->pi_USER_INT_obj = 1;
     $this->pi_setPiVarDefaults();
     $this->pi_loadLL();
     if (!is_numeric($this->conf['ajaxTypeNum'])) {
         $this->conf['ajaxTypeNum'] = 500;
     }
     $this->internal['currentTable'] = 'fe_users';
     $GLOBALS["TSFE"]->set_no_cache();
     //
     $this->img_fields = t3lib_div::trimExplode(',', $this->conf['imageFields'], TRUE);
     $this->url_fields = t3lib_div::trimExplode(',', $this->conf['linkFields'], TRUE);
     $this->rte_fields = t3lib_div::trimExplode(',', $this->conf['rteFields'], TRUE);
     // define the id for detaile
     $this->detailId = is_numeric($this->conf['detailId']) ? $this->conf['detailId'] : $GLOBALS['TSFE']->id;
     // define the loggedin feuser
     $this->feuserId = $GLOBALS['TSFE']->fe_user->user['uid'];
     // The template
     if ($this->conf['templateFile']) {
         $this->templateFile = $this->cObj->fileResource($this->conf['templateFile']);
     } else {
         return '<p>NO TEMPLATE FOUND!</p>';
     }
     // prepare for handling by code in class piBase
     $this->conf['pidList'] = $this->cObj->stdWrap($this->conf['pidList'], $this->conf['pidList.']);
     unset($this->conf['pidList.']);
     $this->conf['recursive'] = $this->cObj->stdWrap($this->conf['recursive'], $this->conf['recursive.']);
     unset($this->conf['recursive.']);
     // look for the view type
     if ($this->cObj->data['tx_feuserfriends_view'] == 1) {
         // detail view
         $content = $this->singleView();
     } elseif ($this->cObj->data['tx_feuserfriends_view'] == 2) {
         // friends request view
         $content = $this->friendsRequestView();
     } elseif ($this->cObj->data['tx_feuserfriends_view'] == 3) {
         // friends view (list)
         $content = $this->listView(true);
     } elseif ($this->cObj->data['tx_feuserfriends_view'] == 4) {
         // message view (list)
         $content = $this->messageView();
     } else {
         if ($this->conf['ajax']) {
             // AJAX
             if ($this->piVars['addfriendrequest']) {
                 return $this->addfriendrequestView($this->piVars['addfriendrequest'], $this->piVars['send']);
             }
             if ($this->piVars['removefriend']) {
                 return $this->removeFriendView($this->piVars['removefriend'], $this->piVars['send']);
             }
             if ($this->piVars['showfriendrequest']) {
                 return $this->showfriendrequestView($this->piVars['showfriendrequest']);
             }
             if ($this->piVars['acceptfriend']) {
                 return $this->acceptFriend($this->piVars['acceptfriend']);
             }
             if ($this->piVars['rejectfriend']) {
                 return $this->rejectFriend($this->piVars['rejectfriend']);
             }
             if ($this->piVars['sendmessage']) {
                 return $this->sendMessageView($this->piVars['sendmessage'], $this->piVars['send']);
             }
         } else {
             // Fallback View
             if ($this->piVars['showUid']) {
                 $content = $this->singleView();
             } else {
                 $content = $this->listView(false);
             }
         }
     }
     $this->pi_addJS();
     $this->pagerenderer->addCssFile($this->conf['jQueryUIstyle']);
     // checks if t3jquery is loaded
     if (T3JQUERY === true) {
         tx_t3jquery::addJqJS();
     } else {
         $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);
         $this->pagerenderer->addJsFile($this->conf['jQueryEasing']);
         $this->pagerenderer->addJsFile($this->conf['jQueryUI']);
     }
     $this->pagerenderer->addResources();
     return $this->pi_wrapInBaseClass($content);
 }
 /**
  * Adds "t3jquery" extension's library to page header.
  *
  * @access	public
  *
  * @return	boolean		TRUE on success or FALSE on error
  */
 public static function loadJQuery()
 {
     // Ensure extension "t3jquery" is available.
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3jquery')) {
         require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3jquery') . 'class.tx_t3jquery.php';
     }
     // Is "t3jquery" loaded?
     if (T3JQUERY === TRUE) {
         tx_t3jquery::addJqJS();
         return TRUE;
     } else {
         if (TYPO3_DLOG) {
             \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadJQuery()] JQuery not available', self::$extKey, SYSLOG_SEVERITY_ERROR);
         }
         return FALSE;
     }
 }
    /**
     * Shows the update Message
     * @return	string
     */
    public function displayMessage(&$params, &$tsObj)
    {
        $out = '';
        if (tx_t3jquery::getIntFromVersion(TYPO3_version) < 4003000) {
            // 4.3.0 comes with flashmessages styles. For older versions we include the needed styles here
            $cssPath = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('t3jquery');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        // get all supported UI-Versions from folder
        $supportedUiVersions = t3lib_div::get_dirs(t3lib_div::getFileAbsFileName("EXT:t3jquery/res/jquery/ui/"));
        if (is_array($supportedUiVersions)) {
            foreach ($supportedUiVersions as $supportedUiVersion) {
                if (file_exists(t3lib_div::getFileAbsFileName("EXT:t3jquery/res/jquery/ui/") . $supportedUiVersion . '/jquery.xml')) {
                    $this->supportedUiVersion[] = $supportedUiVersion;
                }
            }
        }
        // get all supported TOOLS-Versions from folder
        $supportedToolsVersions = t3lib_div::get_dirs(t3lib_div::getFileAbsFileName("EXT:t3jquery/res/jquery/tools/"));
        if (is_array($supportedToolsVersions)) {
            foreach ($supportedToolsVersions as $supportedToolsVersion) {
                if (file_exists(t3lib_div::getFileAbsFileName("EXT:t3jquery/res/jquery/tools/") . $supportedToolsVersion . '/jquery.xml')) {
                    $this->supportedToolsVersion[] = $supportedToolsVersion;
                }
            }
        }
        // get the conf array
        $this->confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3jquery']);
        // if form is submited, the POST values are taken
        $post = t3lib_div::_POST();
        if (count($post) > 0) {
            $jQueryUiVersion = $post['data']['jQueryUiVersion'];
            $jQueryToolsVersion = $post['data']['jQueryTOOLSVersion'];
            $jQueryVersion = $post['data']['jQueryVersion'] . "-" . $post['data']['jQueryUiVersion'] . ($post['data']['jQueryTOOLSVersion'] ? "-" . $post['data']['jQueryTOOLSVersion'] : "");
            $configDir = $post['data']['configDir'] . (preg_match("/\\/\$/", $configDir) ? "" : "/");
        } else {
            $jQueryUiVersion = $this->confArr['jQueryUiVersion'];
            $jQueryToolsVersion = $this->confArr['jQueryTOOLSVersion'];
            $jQueryVersion = T3JQUERYVERSION;
            $configDir = tx_t3jquery::getJqPath();
        }
        if ($this->checkConfig() === FALSE) {
            $out .= '
	<div class="typo3-message message-warning">
		<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.checkConfigHeader') . '</div>
		<div class="message-body">
			' . $GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.checkConfig') . '
		</div>
	</div>';
        } elseif ($this->confArr['integrateFromCDN'] || $post['data']['integrateFromCDN']) {
            // Nothing to check
        } else {
            // check the actual version
            if ($jQueryUiVersion && !in_array($jQueryUiVersion, $this->supportedUiVersion) || $jQueryToolsVersion && !in_array($jQueryToolsVersion, $this->supportedToolsVersion)) {
                $out .= '
	<div class="typo3-message message-information">
		<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.updatermsgHeader') . '</div>
		<div class="message-body">
			' . $GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.updatermsg') . '
		</div>
	</div>';
            }
            // Check if the library exists
            if (!file_exists(PATH_site . $configDir . tx_t3jquery::getJqName())) {
                $out .= '
	<a href="javascript:void();" onclick="top.goToModule(\'tools_txt3jqueryM1\',\'\',\'createLib=1\');this.blur();return false;">
		<div class="typo3-message message-warning">
			<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.updatermsgHeader2') . '</div>
			<div class="message-body">
				' . sprintf($GLOBALS['LANG']->sL('LLL:EXT:t3jquery/locallang.xml:extmng.updatermsg2'), $configDir . tx_t3jquery::getJqName()) . '
			</div>
		</div>
	</a>';
            }
        }
        $out = '<div style="position:absolute;top:10px;right:10px; width:300px;">' . $out . '</div>';
        return $out;
    }
    /**
     * The main method of the PlugIn
     *
     * @param    string        $content: The PlugIn content
     * @param    array        $conf: The PlugIn configuration
     * @return    The content that is displayed on the website
     */
    function main($content, $conf) {
        $this->conf = $conf;
        $this->pi_setPiVarDefaults();
        $this->pi_loadLL();

        // Read Flexform    
        $this->pi_initPIflexForm();

        // Add API
        $GLOBALS['TSFE']->additionalHeaderData[$extKey] = '<script type="text/javascript" src="' . $this->conf['apiUrl'] . '"></script>';

        // Add CSS
        $GLOBALS['TSFE']->additionalHeaderData[$extKey] .= '<link rel="stylesheet" href="' . $this->conf['cssFile'] . '" />';

        // Get flexform values
        $lat = $this->getFlexform('latitude');
        $lng = $this->getFlexform('longitude');
        $address = $this->getFlexform('address');
        $zip = $this->getFlexform('zip');
        $city = $this->getFlexform('city');
        $country = $this->getFlexform('country');
        $infoText = $this->pi_RTEcssText($this->getFlexform('infoText'));
        $width = $this->getFlexform('width', 'options');
        $height = $this->getFlexform('height', 'options');
        $zoom = $this->getFlexform('zoom', 'options');
        $mapType = $this->getFlexform('mapType', 'options');
        $controls = $this->getFlexform('controls', 'options');
        $infoWindowAutoOpen = $this->getFlexform('infoWindowAutoOpen', 'options');
        $navigation = $this->getFlexform('navigation', 'options');
        $ceID = $this->cObj->data['uid'];

        // Default values
        if (!$width)
            $width = '450px';
        if (!$height)
            $height = '250';
        if (!$zoom || !is_numeric($zoom))
            $zoom = 10;
        if (!$mapType)
            $mapType = 'MapTypeId.ROADMAP';

        // Controls
        if ($controls) {
            $controlsArr = explode(",", $controls);
            $controlsConfig = ',';
            foreach ($controlsArr as $c) {
                if ($c == 'scaleControl') {
                    $controlsConfig .= '
                        ' . $c . ': true,
                    ';
                } else {
                    $controlsConfig .= '
                        ' . $c . ': false,
                    ';
                }
            }
            $controlsConfig = substr($controlsConfig, 0, -1);
        }

        // Navigation
        if ($navigation == 1) {
            // Checks if t3jquery is loaded
            if (t3lib_extMgm::isLoaded('t3jquery')) {
                require_once(t3lib_extMgm::extPath('t3jquery') . 'class.tx_t3jquery.php');
            }

            // If t3jquery is loaded and the custom library had been created
            if (T3JQUERY === true) {
                tx_t3jquery::addJqJS();

                // Read t3jquery extConf
                $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3jquery']);
                $integrateToFooter = $this->extConf['integrateToFooter'];

                // Include JS to footer
                if ($integrateToFooter == 1) {
                    $GLOBALS['TSFE']->additionalFooterData[$extKey] .= '<script type="text/javascript" src="' . $this->conf['jsFile'] . '"></script>';
                } else {
                    $GLOBALS['TSFE']->additionalHeaderData[$extKey] .= '<script type="text/javascript" src="' . $this->conf['jsFile'] . '"></script>';
                }
            } else {
                $GLOBALS['TSFE']->additionalHeaderData[$extKey] .= '<script src="' . $this->conf['jQueryLibrary'] . '" type="text/javascript"></script>';
                $GLOBALS['TSFE']->additionalHeaderData[$extKey] .= '<script type="text/javascript" src="' . $this->conf['jsFile'] . '"></script>';
            }

            // Address
            $address_final = $address . ', ' . $zip . ' ' . $city . ', ' . $country;

            // Template
            $this->templateHtml = $this->cObj->fileResource($this->conf['templateFile']);
            $template['route'] = $this->cObj->getSubpart($this->templateHtml, '###TEMPLATE###');
            
            $markerArray['###CE_ID###'] = $ceID;  
            $markerArray['###FROM_HERE_LABEL###'] = $this->pi_getLL("from_here");  
            $markerArray['###TO_HERE_LABEL###'] = $this->pi_getLL("to_here");  
            $markerArray['###ROUTE_LABEL###'] = $this->pi_getLL("calculate_route");  
            $markerArray['###ADDRESS###'] = $address_final;  
            $markerArray['###BUTTON_CLASSES###'] = $this->conf['googleMapsSubmitClasses'];
            
            // Output route template
            $navigationOutput = $this->cObj->substituteMarkerArrayCached($template['route'], $markerArray, array());

            $infoWindowContent = $infoText . $navigationOutput;
        } else {
            $infoWindowContent = $infoText;
        }

        // Display map
        $content .= '<div id="map_canvas_' . $ceID . '" style="width:' . $width . ';height:' . $height . 'px;"></div>';

        // Build map
        $content .= '
            <script type="text/javascript">
                var map' . $ceID . ';
                function initialize() {
                  var myLatlng' . $ceID . ' = new google.maps.LatLng(' . $lat . ', ' . $lng . ');
                  
                  var myOptions' . $ceID . ' = {
                      zoom: ' . $zoom . ',
                      center: myLatlng' . $ceID . ',
                      mapTypeId: google.maps.' . $mapType . '
                      ' . $controlsConfig . '
                  }
                  map' . $ceID . ' = new google.maps.Map(document.getElementById("map_canvas_' . $ceID . '"), myOptions' . $ceID . ');
                  
                  var contentString' . $ceID . ' = \'' . str_replace(array("\n", "\r"), array("", ""), $infoWindowContent) . '\';
  
                  var infowindow' . $ceID . ' = new google.maps.InfoWindow({
                      content: contentString' . $ceID . '
                  });
  
                  var marker' . $ceID . ' = new google.maps.Marker({
                      position: myLatlng' . $ceID . ', 
                      map: map' . $ceID . '
                  });                     
        ';

        if ($infoWindowAutoOpen == 1) {
            $content .= '
                setTimeout(function() {    
                    infowindow' . $ceID . '.open(map' . $ceID . ', marker' . $ceID . ');
                },1250);
            ';
        }

        $content .= '
                google.maps.event.addListener(marker' . $ceID . ', \'click\', function() {
                  infowindow' . $ceID . '.open(map' . $ceID . ',marker' . $ceID . ');
                });   
                }
                google.maps.event.addDomListener(window, \'load\', initialize);             
            </script>            
        ';

        // Output map
        return $this->pi_wrapInBaseClass($content);
    }