Beispiel #1
0
 protected function tearDown()
 {
     $this->testingFramework->cleanUp();
     tx_seminars_registrationmanager::purgeInstance();
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 4007000) {
         $GLOBALS['TYPO3_CONF_VARS']['BE'] = $this->backEndConfigurationBackup;
     }
 }
 /**
  * @param string $versionNumber
  * @return integer
  */
 public static function convertVersionNumberToInteger($versionNumber)
 {
     if (class_exists('t3lib_utility_VersionNumber') && is_callable('t3lib_utility_VersionNumber::convertVersionNumberToInteger')) {
         return t3lib_utility_VersionNumber::convertVersionNumberToInteger($versionNumber);
     } else {
         return t3lib_div::int_from_ver($versionNumber);
     }
 }
 /**
  * The uploadRTE section will be hidden
  * @return array
  */
 function hideRTE($PA, $fobj)
 {
     if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4004000) {
         $classes = array('.t3-form-field-label-flexsection', '.t3-form-field-toggle-flexsection', '.t3-form-field-container-flexsection', '.t3-form-field-add-flexsection');
         return t3lib_div::wrapJS("\$\$('" . implode(',', $classes) . "').each(function(n){n.hide();});");
     } elseif (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4003000) {
         return t3lib_div::wrapJS("\$\$('div.bgColor2').each(function(n){n.next(0).hide();n.next(1).hide();n.next(2).hide();n.hide();})");
     }
 }
	/**
	 * Renders an input element that allows to enter the charset to be used.
	 *
	 * @param	array				$params: Field information to be rendered
	 * @param	t3lib_tsStyleConfig		$pObj: The calling parent object.
	 * @return	string				The HTML input field
	 */
	public function buildCharsetField(array $params, t3lib_tsStyleConfig $pObj) {
		$fieldName = substr($params['fieldName'], 5, -1);

		$typo3Version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
		$readonly = ($typo3Version < 4007000) ? '' : ' readonly="readonly"';
		$field = '<input id="' . $fieldName . '" name="' . $params['fieldName'] . '" value="utf-8"' . $readonly . ' />';

		return $field;
	}
Beispiel #5
0
 function getSingleField_preProcess($table, $field, &$row, $altName, $palette, $extra, $pal, &$pObj)
 {
     if ($table == 'tx_woehrlseminare_domain_model_event') {
         // bugfix for TYPO3 < 6.1
         if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < '6001000') {
             if ($row['location'] == 0) {
                 $row['location'] = '';
             }
         }
     }
 }
 /**
  * Returns TRUE if the current TYPO3 version is compatible to the input version
  * Notice that this function compares branches, not versions
  * (4.0.1 would be > 4.0.0 although they use the same compat_version)
  *
  * @param string $verNumberStr Minimum branch number: format "4.0" NOT "4.0.0"
  * @return boolean Returns TRUE if compatible with the provided version number
  */
 public static function convertVersionNumberToInteger($verNumberStr)
 {
     $result = '';
     if (self::isEqualOrHigherSixZero()) {
         $result = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($verNumberStr);
     } elseif (class_exists('t3lib_utility_VersionNumber')) {
         $result = t3lib_utility_VersionNumber::convertVersionNumberToInteger($verNumberStr);
     } else {
         $result = t3lib_div::int_from_ver($verNumberStr);
     }
     return $result;
 }
 /**
  * Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
  *
  * @return	The array with language labels
  */
 function includeLocalLang()
 {
     $llFile = t3lib_extMgm::extPath('ods_osm') . 'locallang.xml';
     $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
     if ($version >= 4007000) {
         $object = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
         $LOCAL_LANG = $object->getParsedData($llFile, $GLOBALS['LANG']->lang);
     } else {
         $LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
     }
     return $LOCAL_LANG;
 }
 /**
  * Returns the current TYPO3 version number as an integer, eg. 4005000 for version 4.5
  *
  * @return int
  */
 public function getNumericTYPO3versionNumber()
 {
     if (class_exists(VersionNumberUtility)) {
         $numeric_typo3_version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
     } else {
         if (class_exists('t3lib_utility_VersionNumber')) {
             $numeric_typo3_version = t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version);
         } else {
             $numeric_typo3_version = t3lib_div::int_from_ver(TYPO3_version);
         }
     }
     return $numeric_typo3_version;
 }
 /**
  * Initialize repository
  *
  * @return void
  */
 public function initializeObject()
 {
     /** @var $defaultQuerySettings Tx_Extbase_Persistence_Typo3QuerySettings */
     $defaultQuerySettings = $this->objectManager->get('Tx_Extbase_Persistence_Typo3QuerySettings');
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 6000000) {
         $defaultQuerySettings->setIgnoreEnableFields(TRUE);
     } else {
         $defaultQuerySettings->setRespectEnableFields(FALSE);
     }
     $defaultQuerySettings->setRespectStoragePage(FALSE);
     $defaultQuerySettings->setReturnRawQueryResult(TRUE);
     $this->setDefaultQuerySettings($defaultQuerySettings);
 }
 /**
  * Initializes the view before invoking an action method.
  *
  * Override this method to solve assign variables common for all actions
  * or prepare the view in another way before the action is called.
  *
  * @param Tx_Extbase_MVC_View_ViewInterface $view The view to be initialized
  * @return void
  * @api
  */
 protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view)
 {
     // Evaluate write access on all tables
     $globalWriteAccess = $this->configurationRepository->findGlobalWriteAccess();
     $view->assign('globalWriteAccess', $globalWriteAccess);
     $view->assign('view', strtolower($this->request->getControllerActionName()));
     // If TYPO3 version is lower then 4.7, use the old icon name for refresh
     // (this is necessary due to the way the Fluid BE View Helper for icon buttons was coded)
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_branch) < '4007000') {
         $this->refreshIcon = 'refresh_n';
     }
     $view->assign('refresh_icon', $this->refreshIcon);
 }
 /**
  * Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
  *
  * @return array The array with language labels
  */
 protected function includeLocalLang()
 {
     $llFile = t3lib_extMgm::extPath('medfancyboxcontent') . 'locallang.xml';
     $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
     if ($version < 4006000) {
         $LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
     } else {
         /** @var $llxmlParser t3lib_l10n_parser_Llxml */
         $llxmlParser = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
         $LOCAL_LANG = $llxmlParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
     }
     return $LOCAL_LANG;
 }
    /**
     * Check if TYPO3 Version is correct
     *
     * @return 	boolean
     */
    public function render() {
		// settings
		global $EM_CONF, $_EXTKEY;
		$_EXTKEY = 'powermail';
		require_once(t3lib_extMgm::extPath('powermail') . 'ext_emconf.php');
		$versionString = $EM_CONF[$_EXTKEY]['constraints']['depends']['typo3'];
		$versions = explode('-', $versionString);

		$isAboveMinVersion = (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) > t3lib_utility_VersionNumber::convertVersionNumberToInteger($versions[0]));
		$isBelowMaxVersion = (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < t3lib_utility_VersionNumber::convertVersionNumberToInteger($versions[1]));
		if ($isAboveMinVersion && $isBelowMaxVersion) {
			return true;
		}
		return false;
    }
    /**
     * Main function, returning the HTML content of the module
     *
     * @return	string		HTML
     */
    public function main()
    {
        $out = '';
        if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 4003000) {
            // add flashmessages styles
            $cssPath = $GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('jfmulticontent');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        $this->flexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_flexformtools');
        // analyze
        $this->contentElements = $this->getContentElements();
        $this->wrongLanguage = $this->getWrongLanguage();
        $this->wrongStyle = $this->getWrongStyle();
        if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('do_update')) {
            $out .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('do_update' => '', 'func' => '')) . '">' . $GLOBALS['LANG']->sL($this->ll . 'back') . '</a><br/>';
            $func = trim(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('func'));
            if (method_exists($this, $func)) {
                $out .= '
<div style="padding:15px 15px 20px 0;">
	<div class="typo3-message message-ok">
		<div class="message-header">' . $GLOBALS['LANG']->sL($this->ll . 'updateresults') . '</div>
		<div class="message-body">
		' . $this->{$func}() . '
		</div>
	</div>
</div>';
            } else {
                $out .= '
<div style="padding:15px 15px 20px 0;">
	<div class="typo3-message message-error">
		<div class="message-body">ERROR: ' . $func . '() not found</div>
	</div>
</div>';
            }
        } else {
            $out .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('do_update' => '', 'func' => '')) . '">' . $GLOBALS['LANG']->sL($this->ll . 'reload') . '
			<img style="vertical-align:bottom;" ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/refresh_n.gif', 'width="18" height="16"') . '></a><br/>';
            $out .= $this->displayWarning();
            $out .= '<h3>' . $GLOBALS['LANG']->sL($this->ll . 'actions') . '</h3>';
            // Update all flexform
            $out .= $this->displayUpdateOption('searchFlexForm', count($this->contentElements), 'updateFlexForm');
            // Update wrong Style
            $out .= $this->displayUpdateOption('searchWrongStyle', count($this->wrongStyle), 'updateWrongStyle');
            // Update wrong  language
            $out .= $this->displayUpdateOption('searchWrongLanguage', count($this->wrongLanguage), 'updateWrongLanguage');
        }
        return $out;
    }
 public static function getTypoVersion()
 {
     $result = FALSE;
     $callingClassName = '\\TYPO3\\CMS\\Core\\Utility\\VersionNumberUtility';
     if (class_exists($callingClassName) && method_exists($callingClassName, 'convertVersionNumberToInteger')) {
         $result = call_user_func($callingClassName . '::convertVersionNumberToInteger', TYPO3_version);
     } else {
         if (class_exists('t3lib_utility_VersionNumber') && method_exists('t3lib_utility_VersionNumber', 'convertVersionNumberToInteger')) {
             $result = t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version);
         } else {
             if (class_exists('t3lib_div') && method_exists('t3lib_div', 'int_from_ver')) {
                 $result = t3lib_div::int_from_ver(TYPO3_version);
             }
         }
     }
     return $result;
 }
 /**
  * Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
  * @return    The array with language labels
  */
 function includeLocalLang()
 {
     $llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'locallang.xml';
     // TYPO3 V6 fix
     //						$LOCAL_LANG =  \TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
     //$version=class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) :  \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver(TYPO3_version);
     // TYPO3 V7 fix
     $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
     if ($version >= 4007000) {
         //$localizationParser= \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_l10n_parser_Llxml');
         //$LOCAL_LANG=$localizationParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
         // TYPO3 V7 fix
         $LOCAL_LANG = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llFile, $GLOBALS['LANG']->lang);
     } else {
         $LOCAL_LANG = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
     }
     return $LOCAL_LANG;
 }
 /**
  * Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
  *
  * @return	The array with language labels
  */
 function includeLocalLang()
 {
     $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
     if ($version >= 6000000) {
         $llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('myquizpoll') . 'locallang.xml';
         $localLanguageParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser');
         $LOCAL_LANG = $localLanguageParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
     } else {
         if ($version >= 4007000) {
             $llFile = t3lib_extMgm::extPath('myquizpoll') . 'locallang.xml';
             $localizationParser = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
             $LOCAL_LANG = $localizationParser->getParsedData($llFile, $GLOBALS['LANG']->lang);
         } else {
             $llFile = t3lib_extMgm::extPath('myquizpoll') . 'locallang.xml';
             $LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
         }
     }
     return $LOCAL_LANG;
 }
    /**
     * Shows the update Message
     *
     * @return	string
     */
    function displayMessage(&$params, &$tsObj)
    {
        $out = '';
        if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(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('jfmulticontent');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        $checkConfig = NULL;
        if ($this->checkConfig() === FALSE) {
            $checkConfig = '
	<div class="typo3-message message-warning">
		<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:jfmulticontent/locallang.xml:extmng.classInnerHeader') . '</div>
		<div class="message-body">
			' . $GLOBALS['LANG']->sL('LLL:EXT:jfmulticontent/locallang.xml:extmng.classInner') . '
		</div>
	</div>';
        }
        if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
            $url = 'index.php?&amp;id=0&amp;CMD[showExt]=jfmulticontent&amp;SET[singleDetails]=updateModule';
        } else {
            $url = 'mod.php?&id=0&M=tools_em&CMD[showExt]=jfmulticontent&SET[singleDetails]=updateModule';
        }
        $out .= '
<div style="position:absolute;top:10px;right:10px; width:300px;">
	<div class="typo3-message message-information">
		<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:jfmulticontent/locallang.xml:extmng.updatermsgHeader') . '</div>
		<div class="message-body">
			' . $GLOBALS['LANG']->sL('LLL:EXT:jfmulticontent/locallang.xml:extmng.updatermsg') . '<br />
			<a style="text-decoration:underline;" href="' . $url . '">
			' . $GLOBALS['LANG']->sL('LLL:EXT:jfmulticontent/locallang.xml:extmng.updatermsgLink') . '</a>
		</div>
	</div>
	' . $checkConfig . '
</div>';
        return $out;
    }
    /**
     * Shows the update Message
     *
     * @return	string
     */
    public function displayMessage(&$params, &$tsObj)
    {
        $out = '';
        if (class_exists(t3lib_utility_VersionNumber) && t3lib_utility_VersionNumber::convertVersionNumberToInteger(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('imagecarousel');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        $checkConfig = null;
        if ($this->checkConfig() === false) {
            $checkConfig .= '
	<div class="typo3-message message-warning">
		<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:imagecarousel/locallang.xml:extmng.updatermsgHeader') . '</div>
		<div class="message-body">
			' . $GLOBALS['LANG']->sL('LLL:EXT:imagecarousel/locallang.xml:extmng.updatermsg') . '
		</div>
	</div>';
        }
        $out .= '
<div style="position:absolute;top:10px;right:10px; width:300px;">
	' . $checkConfig . '
</div>';
        return $out;
    }
 /**
  * The constructor for this class.
  *
  * This testing framework can be instantiated for one extension at a time.
  * Example: In your testcase, you'll have something similar to this line of code:
  * $this->fixture = new Tx_Phpunit_Framework('tx_seminars');
  * The parameter you provide is the prefix of the table names of that particular
  * extension. Like this, we ensure that the testing framework creates and
  * deletes records only on table with this prefix.
  *
  * If you need dummy records on tables of multiple extensions, you'll have to
  * instantiate the testing frame work multiple times (once per extension).
  *
  * @param string $tablePrefix
  *        the table name prefix of the extension for which this instance of
  *        the testing framework should be used
  * @param array $additionalTablePrefixes
  *        the additional table name prefixes of the extensions for which
  *        this instance of the testing framework should be used, may be empty
  */
 public function __construct($tablePrefix, array $additionalTablePrefixes = array())
 {
     $this->tablePrefix = $tablePrefix;
     $this->additionalTablePrefixes = $additionalTablePrefixes;
     $this->createListOfOwnAllowedTables();
     $this->createListOfAdditionalAllowedTables();
     $this->uploadFolderPath = PATH_site . 'uploads/' . $this->tablePrefix . '/';
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 6000000) {
         $this->allowedSystemTables = array_merge($this->allowedSystemTables, array('sys_file', 'sys_file_collection', 'sys_file_reference', 'sys_category', 'sys_category_record_mm'));
     }
 }
 if (version_compare(TYPO3_version, '6.0.0', '>=')) {
     \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'tools', 'administration', '', array('Administration' => 'index,setSite,setCore'), array('access' => 'admin', 'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Icons/ModuleAdministration.png', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/ModuleAdministration.xlf'));
     $iconPath = $GLOBALS['PATHrel_solr'] . 'Resources/Public/Images/Icons/';
     \TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(array('ModuleOverview' => $iconPath . 'Search.png', 'ModuleIndexQueue' => $iconPath . 'IndexQueue.png', 'ModuleIndexMaintenance' => $iconPath . 'IndexMaintenance.png', 'ModuleIndexFields' => $iconPath . 'IndexFields.png', 'ModuleSynonyms' => $iconPath . 'Synonyms.png'), $_EXTKEY);
     ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'Overview', array('index'));
     ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexQueue', array('index,initializeIndexQueue'));
     ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexMaintenance', array('index,cleanUpIndex,emptyIndex,reloadIndexConfiguration'));
     ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'IndexFields', array('index'));
     ApacheSolrForTypo3\Solr\Backend\SolrModule\AdministrationModuleManager::registerModule('ApacheSolrForTypo3.' . $_EXTKEY, 'Synonyms', array('index,addSynonyms,deleteSynonyms'));
 } else {
     t3lib_extMgm::addModulePath('tools_txsolrMAdmin', t3lib_extMgm::extPath($_EXTKEY) . 'ModAdmin/');
     t3lib_extMgm::addModule('tools', 'txsolrMAdmin', '', t3lib_extMgm::extPath($_EXTKEY) . 'ModAdmin/');
 }
 // registering reports
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['solr'] = array('Tx_Solr_Report_SchemaStatus', 'Tx_Solr_Report_SolrconfigStatus', 'Tx_Solr_Report_SolrConfigurationStatus', 'Tx_Solr_Report_SolrStatus', 'Tx_Solr_Report_SolrVersionStatus', 'Tx_Solr_Report_AccessFilterPluginInstalledStatus', 'Tx_Solr_Report_AllowUrlFOpenStatus', 'Tx_Solr_Report_FilterVarStatus');
 if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) < 6000000) {
     // registering the index report with the reports module
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_solr']['index'] = array('title' => 'LLL:EXT:solr/Resources/Private/Language/ModuleReports.xml:index_title', 'description' => 'LLL:EXT:solr/Resources/Private/Language/ModuleReports.xml:index_description', 'report' => 'Tx_Solr_Report_IndexReport', 'icon' => 'EXT:solr/Report/tx_solr_report.gif');
 }
 // Index Inspector
 t3lib_extMgm::insertModuleFunction('web_info', 'Tx_Solr_ModIndex_IndexInspector', $GLOBALS['PATH_solr'] . 'ModIndex/IndexInspector.php', 'LLL:EXT:solr/Resources/Private/Language/Backend.xml:module_indexinspector');
 // register Clear Cache Menu hook
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']['clearSolrConnectionCache'] = '&Tx_Solr_ConnectionManager';
 // register Clear Cache Menu ajax call
 $TYPO3_CONF_VARS['BE']['AJAX']['solr::clearSolrConnectionCache'] = 'Tx_Solr_ConnectionManager->updateConnections';
 // hooking into TCE Main to monitor record updates that may require reindexing by the index queue
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'Tx_Solr_IndexQueue_RecordMonitor';
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'Tx_Solr_IndexQueue_RecordMonitor';
 // hooking into TCE Main to monitor record updates that may require deleting documents from the index
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = '&Tx_Solr_GarbageCollector';
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = '&Tx_Solr_GarbageCollector';
 /**
  * Returns an associative array, containing fieldname/value pairs that need
  * to be updated in the database. Update means "set the title" so far.
  *
  * @return string[] data to update the database entry of the timeslot, might be empty
  */
 public function getUpdateArray()
 {
     $updateArray = array();
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 4007000) {
         $charset = 'utf-8';
     } else {
         $charset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'utf-8';
     }
     $updateArray['title'] = html_entity_decode($this->getDate(), ENT_COMPAT, $charset);
     return $updateArray;
 }
    /**
     * Switch between the basic operations. Calls the different modules and puts
     * their content into a basic framework.
     *
     * @return    HTML code for the kickstarter containing the module content
     */
    function mgm_wizard()
    {
        $this->wizard =& $this;
        $this->initWizArray();
        $this->sections = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['sections'];
        /* HOOK: Place a hook here, so additional things can be done */
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['wizard_beforeSectionsHook'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['wizard_beforeSectionsHook'] as $_funcRef) {
                $conf = array('pObj' => $this);
                t3lib_div::callUserFunction($_funcRef, $conf, $this);
            }
        }
        foreach ($this->sections as $k => $v) {
            $this->options[$k] = array($v['title'], $v['description']);
        }
        $this->wizArray['save']['extension_key'] = str_replace('-', '_', $this->wizArray['save']['extension_key']);
        $saveKey = $this->saveKey = $this->wizArray['save']['extension_key'] = substr(strtolower(trim($this->wizArray['save']['extension_key'])), 0, 30);
        $this->outputWOP = $this->wizArray['save']['print_wop_comments'] ? 1 : 0;
        if ($saveKey) {
            $this->extKey = $saveKey;
            $this->extKey_nusc = str_replace('_', '', $saveKey);
        }
        if ($this->modData['viewResult'] || $this->modData['updateResult']) {
            $this->modData['wizAction'] = '';
            $this->modData['wizSubCmd'] = '';
            if ($saveKey) {
                $content = $this->view_result();
            } else {
                $content = $this->fw('<strong>Error:</strong> Please enter an extension key first!<br /><br />');
            }
        } elseif ($this->modData['WRITE']) {
            $this->modData['wizAction'] = '';
            $this->modData['wizSubCmd'] = '';
            if ($saveKey) {
                $this->makeFilesArray($this->saveKey);
                $uploadArray = $this->makeUploadArray($this->saveKey, $this->fileArray);
                $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
                if ($version < 4000000) {
                    // Syntax for TYPO3 3.8 and older
                    $this->pObj->importExtFromRep(0, $this->modData['loc'], 0, $uploadArray, 0, 0, 1);
                } else {
                    // TYPO3 4.0+ syntax
                    $this->pObj->importExtFromRep('', '', $this->modData['loc'], 0, 1, $uploadArray);
                }
            } else {
                $content = $this->fw('<strong>Error:</strong> Please enter an extension key first!<br /><br />');
            }
        } elseif ($this->modData['totalForm']) {
            $content = $this->totalForm();
        } elseif ($this->modData['downloadAsFile']) {
            if ($saveKey) {
                $this->makeFilesArray($this->saveKey);
                $uploadArray = $this->makeUploadArray($this->saveKey, $this->fileArray);
                $backUpData = $this->makeUploadDataFromArray($uploadArray);
                $filename = 'T3X_' . $saveKey . '-' . str_replace('.', '_', '0.0.0') . '.t3x';
                $mimeType = 'application/octet-stream';
                Header('Content-Type: ' . $mimeType);
                Header('Content-Disposition: attachment; filename=' . $filename);
                echo $backUpData;
                exit;
            } else {
                $content = $this->fw('<strong>Error:</strong> Please enter an extension key first!<br /><br />');
            }
        } else {
            $action = explode(':', $this->modData['wizAction']);
            if ((string) $action[0] == 'deleteEl') {
                unset($this->wizArray[$action[1]][$action[2]]);
            }
            $content = $this->getFormContent();
        }
        $wasContent = $content ? 1 : 0;
        $content = '
		<script language="javascript" type="text/javascript">
			function setFormAnchorPoint(anchor)	{
				document.' . $this->varPrefix . '_wizard.action = unescape("' . rawurlencode($this->linkThisCmd()) . '")+"#"+anchor;
			}
		</script>
		<table border="0" cellpadding="0" cellspacing="0">
			<form action="' . $this->linkThisCmd() . '" method="POST" name="' . $this->varPrefix . '_wizard">
			<tr>
				<td valign="top">' . $this->sidemenu() . '</td>
				<td>&nbsp;&nbsp;&nbsp;</td>
				<td valign="top">' . $content . '
					<input type="hidden" name="' . $this->piFieldName("wizArray_ser") . '" value="' . htmlspecialchars(base64_encode(serialize($this->wizArray))) . '" /><br />';
        if ((string) $this->modData['wizSubCmd']) {
            if ($wasContent) {
                $content .= '<input name="update2" type="submit" value="Update..." /> ';
            }
        }
        $content .= '
					<input type="hidden" name="' . $this->piFieldName("wizAction") . '" value="' . $this->modData["wizAction"] . '" />
					<input type="hidden" name="' . $this->piFieldName("wizSubCmd") . '" value="' . $this->modData["wizSubCmd"] . '" />
					' . $this->cmdHiddenField() . '
				</td>
			</tr>
			</form>
		</table>' . $this->afterContent;
        return $content;
    }
 /**
  * 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);
 }
    /**
     * Creates the TCA for fields
     *
     * @param	array		&$DBfields: array of fields (PASSED BY REFERENCE)
     * @param	array		$columns: $array of fields (PASSED BY REFERENCE)
     * @param	array		$fConf: field config
     * @param	string		$WOP: ???
     * @param	string		$table: tablename
     * @param	string		$extKey: extensionkey
     * @return	void
     */
    function makeFieldTCA(&$DBfields, &$columns, $fConf, $WOP, $table, $extKey)
    {
        if (!(string) $fConf['type']) {
            return;
        }
        $id = $table . '_' . $fConf['fieldname'];
        $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
        $configL = array();
        $t = (string) $fConf['type'];
        switch ($t) {
            case 'input':
            case 'input+':
                $isString = true;
                $configL[] = '\'type\' => \'input\',	' . $this->WOPcomment('WOP:' . $WOP . '[type]');
                if ($version < 4006000) {
                    $configL[] = '\'size\' => \'' . t3lib_div::intInRange($fConf['conf_size'], 5, 48, 30) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_size]');
                    if (intval($fConf['conf_max'])) {
                        $configL[] = '\'max\' => \'' . t3lib_div::intInRange($fConf['conf_max'], 1, 255) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_max]');
                    }
                } else {
                    $configL[] = '\'size\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_size'], 5, 48, 30) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_size]');
                    if (intval($fConf['conf_max'])) {
                        $configL[] = '\'max\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_max'], 1, 255) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_max]');
                    }
                }
                $evalItems = array();
                if ($fConf['conf_required']) {
                    $evalItems[0][] = 'required';
                    $evalItems[1][] = $WOP . '[conf_required]';
                }
                if ($t == 'input+') {
                    $isString = (bool) (!$fConf['conf_eval']) || t3lib_div::inList('alphanum,upper,lower', $fConf['conf_eval']);
                    $isDouble2 = (bool) (!$fConf['conf_eval']) || t3lib_div::inList('double2', $fConf['conf_eval']);
                    if ($fConf['conf_varchar'] && $isString) {
                        $evalItems[0][] = 'trim';
                        $evalItems[1][] = $WOP . '[conf_varchar]';
                    }
                    if ($fConf['conf_eval'] === 'int+') {
                        $configL[] = '\'range\' => array(\'lower\' => 0, \'upper\' => 1000),	' . $this->WOPcomment('WOP:' . $WOP . '[conf_eval] = int+ results in a range setting');
                        $fConf['conf_eval'] = 'int';
                    }
                    if ($fConf['conf_eval']) {
                        $evalItems[0][] = $fConf['conf_eval'];
                        $evalItems[1][] = $WOP . '[conf_eval]';
                    }
                    if ($fConf['conf_check']) {
                        $configL[] = '\'checkbox\' => \'' . ($isString ? '' : '0') . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_check]');
                    }
                    if ($fConf['conf_stripspace']) {
                        $evalItems[0][] = 'nospace';
                        $evalItems[1][] = $WOP . '[conf_stripspace]';
                    }
                    if ($fConf['conf_pass']) {
                        $evalItems[0][] = 'password';
                        $evalItems[1][] = $WOP . '[conf_pass]';
                    }
                    if ($fConf['conf_md5']) {
                        $evalItems[0][] = 'md5';
                        $evalItems[1][] = $WOP . '[conf_md5]';
                    }
                    if ($fConf['conf_unique']) {
                        if ($fConf['conf_unique'] == 'L') {
                            $evalItems[0][] = 'uniqueInPid';
                            $evalItems[1][] = $WOP . '[conf_unique] = Local (unique in this page (PID))';
                        }
                        if ($fConf['conf_unique'] == 'G') {
                            $evalItems[0][] = 'unique';
                            $evalItems[1][] = $WOP . '[conf_unique] = Global (unique in whole database)';
                        }
                    }
                    $wizards = array();
                    if ($fConf['conf_wiz_color']) {
                        $wizards[] = trim($this->sPS('
							' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_color]') . '
							\'color\' => array(
								\'title\' => \'Color:\',
								\'type\' => \'colorbox\',
								\'dim\' => \'12x12\',
								\'tableStyle\' => \'border:solid 1px black;\',
								\'script\' => \'wizard_colorpicker.php\',
								\'JSopenParams\' => \'height=300,width=250,status=0,menubar=0,scrollbars=1\',
							),
						'));
                    }
                    if ($fConf['conf_wiz_link']) {
                        $wizards[] = trim($this->sPS('
							' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_link]') . '
							\'link\' => array(
								\'type\' => \'popup\',
								\'title\' => \'Link\',
								\'icon\' => \'link_popup.gif\',
								\'script\' => \'browse_links.php?mode=wizard\',
								\'JSopenParams\' => \'height=300,width=500,status=0,menubar=0,scrollbars=1\'
							),
						'));
                    }
                    if (count($wizards)) {
                        $configL[] = trim($this->wrapBody('
							\'wizards\' => array(
								\'_PADDING\' => 2,
								', implode(chr(10), $wizards), '
							),
						'));
                    }
                } else {
                    if ($fConf['conf_varchar']) {
                        $evalItems[0][] = 'trim';
                        $evalItems[1][] = $WOP . '[conf_varchar]';
                    }
                }
                if (count($evalItems)) {
                    $configL[] = '\'eval\' => \'' . implode(",", $evalItems[0]) . '\',	' . $this->WOPcomment('WOP:' . implode(' / ', $evalItems[1]));
                }
                if (!$isString && !$isDouble2) {
                    $DBfields[] = $fConf['fieldname'] . ' int(11) DEFAULT \'0\' NOT NULL,';
                } elseif (!$isString && $isDouble2) {
                    $DBfields[] = $fConf["fieldname"] . " double(11,2) DEFAULT '0.00' NOT NULL,";
                } elseif (!$fConf['conf_varchar']) {
                    $DBfields[] = $fConf['fieldname'] . ' tinytext,';
                } else {
                    if ($version < 4006000) {
                        $varCharLn = intval($fConf['conf_max']) ? t3lib_div::intInRange($fConf['conf_max'], 1, 255) : 255;
                    } else {
                        $varCharLn = intval($fConf['conf_max']) ? t3lib_utility_Math::forceIntegerInRange($fConf['conf_max'], 1, 255) : 255;
                    }
                    $DBfields[] = $fConf['fieldname'] . ' ' . ($varCharLn > $this->wizard->charMaxLng ? 'var' : '') . 'char(' . $varCharLn . ') DEFAULT \'\' NOT NULL,';
                }
                break;
            case 'link':
                $DBfields[] = $fConf['fieldname'] . ' tinytext,';
                $configL[] = trim($this->sPS('
					\'type\'     => \'input\',
					\'size\'     => \'15\',
					\'max\'      => \'255\',
					\'checkbox\' => \'\',
					\'eval\'     => \'trim\',
					\'wizards\'  => array(
						\'_PADDING\' => 2,
						\'link\'     => array(
							\'type\'         => \'popup\',
							\'title\'        => \'Link\',
							\'icon\'         => \'link_popup.gif\',
							\'script\'       => \'browse_links.php?mode=wizard\',
							\'JSopenParams\' => \'height=300,width=500,status=0,menubar=0,scrollbars=1\'
						)
					)
				'));
                break;
            case 'datetime':
            case 'date':
                $DBfields[] = $fConf['fieldname'] . ' int(11) DEFAULT \'0\' NOT NULL,';
                $configL[] = trim($this->sPS('
					\'type\'     => \'input\',
					\'size\'     => \'' . ($t == "datetime" ? 12 : 8) . '\',
					\'max\'      => \'20\',
					\'eval\'     => \'' . $t . '\',
					\'checkbox\' => \'0\',
					\'default\'  => \'0\'
				'));
                break;
            case 'integer':
                $DBfields[] = $fConf['fieldname'] . ' int(11) DEFAULT \'0\' NOT NULL,';
                $configL[] = trim($this->sPS('
					\'type\'     => \'input\',
					\'size\'     => \'4\',
					\'max\'      => \'4\',
					\'eval\'     => \'int\',
					\'checkbox\' => \'0\',
					\'range\'    => array(
						\'upper\' => \'1000\',
						\'lower\' => \'10\'
					),
					\'default\' => 0
				'));
                break;
            case 'textarea':
            case 'textarea_nowrap':
                $DBfields[] = $fConf['fieldname'] . ' text,';
                $configL[] = '\'type\' => \'text\',';
                if ($t == 'textarea_nowrap') {
                    $configL[] = '\'wrap\' => \'OFF\',';
                }
                if ($version < 4006000) {
                    $configL[] = '\'cols\' => \'' . t3lib_div::intInRange($fConf['conf_cols'], 5, 48, 30) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_cols]');
                    $configL[] = '\'rows\' => \'' . t3lib_div::intInRange($fConf['conf_rows'], 1, 20, 5) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rows]');
                } else {
                    $configL[] = '\'cols\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_cols'], 5, 48, 30) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_cols]');
                    $configL[] = '\'rows\' => \'' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_rows'], 1, 20, 5) . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rows]');
                }
                if ($fConf["conf_wiz_example"]) {
                    $wizards = array();
                    $wizards[] = trim($this->sPS('
						' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_example]') . '
						\'example\' => array(
							\'title\'         => \'Example Wizard:\',
							\'type\'          => \'script\',
							\'notNewRecords\' => 1,
							\'icon\'          => t3lib_extMgm::extRelPath(\'' . $extKey . '\').\'' . $id . '/wizard_icon.gif\',
							\'script\'        => t3lib_extMgm::extRelPath(\'' . $extKey . '\').\'' . $id . '/index.php\',
						),
					'));
                    $cN = $this->returnName($extKey, 'class', $id . 'wiz');
                    $this->writeStandardBE_xMod($extKey, array('title' => 'Example Wizard title...'), $id . '/', $cN, 0, $id . 'wiz');
                    $this->addFileToFileArray($id . '/wizard_icon.gif', t3lib_div::getUrl(t3lib_extMgm::extPath('kickstarter') . 'res/notfound.gif'));
                    $configL[] = trim($this->wrapBody('
						\'wizards\' => array(
							\'_PADDING\' => 2,
							', implode(chr(10), $wizards), '
						),
					'));
                }
                break;
            case 'textarea_rte':
                $DBfields[] = $fConf['fieldname'] . ' text,';
                $configL[] = '\'type\' => \'text\',';
                $configL[] = '\'cols\' => \'30\',';
                $configL[] = '\'rows\' => \'5\',';
                if ($fConf['conf_rte_fullscreen']) {
                    $wizards = array();
                    $wizards[] = trim($this->sPS('
						' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_fullscreen]') . '
						\'RTE\' => array(
							\'notNewRecords\' => 1,
							\'RTEonly\'       => 1,
							\'type\'          => \'script\',
							\'title\'         => \'Full screen Rich Text Editing|Formatteret redigering i hele vinduet\',
							\'icon\'          => \'wizard_rte2.gif\',
							\'script\'        => \'wizard_rte.php\',
						),
					'));
                    $configL[] = trim($this->wrapBody('
						\'wizards\' => array(
							\'_PADDING\' => 2,
							', implode(chr(10), $wizards), '
						),
					'));
                }
                $rteImageDir = '';
                if ($fConf['conf_rte_separateStorageForImages'] && t3lib_div::inList('moderate,basic,custom', $fConf['conf_rte'])) {
                    $this->wizard->EM_CONF_presets['createDirs'][] = $this->ulFolder($extKey) . 'rte/';
                    $rteImageDir = '|imgpath=' . $this->ulFolder($extKey) . 'rte/';
                }
                $transformation = 'ts_images-ts_reglinks';
                if ($fConf['conf_mode_cssOrNot'] && t3lib_div::inList('moderate,custom', $fConf['conf_rte'])) {
                    $transformation = 'ts_css';
                }
                switch ($fConf['conf_rte']) {
                    case 'tt_content':
                        $typeP = 'richtext[]:rte_transform[mode=ts]';
                        break;
                    case 'moderate':
                        $typeP = 'richtext[]:rte_transform[mode=' . $transformation . '' . $rteImageDir . ']';
                        break;
                    case 'basic':
                        $typeP = 'richtext[]:rte_transform[mode=ts_css' . $rteImageDir . ']';
                        $this->wizard->ext_localconf[] = trim($this->wrapBody("\n\t\t\t\t\t\t\t\tt3lib_extMgm::addPageTSConfig('\n\n\t\t\t\t\t\t\t\t\t# ***************************************************************************************\n\t\t\t\t\t\t\t\t\t# CONFIGURATION of RTE in table \"" . $table . "\", field \"" . $fConf["fieldname"] . "\"\n\t\t\t\t\t\t\t\t\t# ***************************************************************************************\n\n\t\t\t\t\t\t\t\t\t", trim($this->slashValueForSingleDashes(str_replace(chr(9), "  ", $this->sPS("\n\t\t\t\t\t\t\t\t\t\tRTE.config." . $table . "." . $fConf["fieldname"] . " {\n\t\t\t\t\t\t\t\t\t\t\thidePStyleItems = H1, H4, H5, H6\n\t\t\t\t\t\t\t\t\t\t\tproc.exitHTMLparser_db=1\n\t\t\t\t\t\t\t\t\t\t\tproc.exitHTMLparser_db {\n\t\t\t\t\t\t\t\t\t\t\t\tkeepNonMatchedTags=1\n\t\t\t\t\t\t\t\t\t\t\t\ttags.font.allowedAttribs= color\n\t\t\t\t\t\t\t\t\t\t\t\ttags.font.rmTagIfNoAttrib = 1\n\t\t\t\t\t\t\t\t\t\t\t\ttags.font.nesting = global\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t")))), "\n\t\t\t\t\t\t\t\t');\n\t\t\t\t\t\t", 0));
                        break;
                    case 'none':
                        $typeP = 'richtext[]';
                        break;
                    case 'custom':
                        $enabledButtons = array();
                        $traverseList = explode(',', 'cut,copy,paste,formatblock,class,fontstyle,fontsize,textcolor,bold,italic,underline,left,center,right,orderedlist,unorderedlist,outdent,indent,link,table,image,line,user,chMode');
                        $HTMLparser = array();
                        $fontAllowedAttrib = array();
                        $allowedTags_WOP = array();
                        $allowedTags = array();
                        while (list(, $lI) = each($traverseList)) {
                            $nothingDone = 0;
                            if ($fConf['conf_rte_b_' . $lI]) {
                                $enabledButtons[] = $lI;
                                switch ($lI) {
                                    case 'formatblock':
                                    case 'left':
                                    case 'center':
                                    case 'right':
                                        $allowedTags[] = 'div';
                                        $allowedTags[] = 'p';
                                        break;
                                    case 'class':
                                        $allowedTags[] = 'span';
                                        break;
                                    case 'fontstyle':
                                        $allowedTags[] = 'font';
                                        $fontAllowedAttrib[] = 'face';
                                        break;
                                    case 'fontsize':
                                        $allowedTags[] = 'font';
                                        $fontAllowedAttrib[] = 'size';
                                        break;
                                    case 'textcolor':
                                        $allowedTags[] = 'font';
                                        $fontAllowedAttrib[] = 'color';
                                        break;
                                    case 'bold':
                                        $allowedTags[] = 'b';
                                        $allowedTags[] = 'strong';
                                        break;
                                    case 'italic':
                                        $allowedTags[] = 'i';
                                        $allowedTags[] = 'em';
                                        break;
                                    case 'underline':
                                        $allowedTags[] = 'u';
                                        break;
                                    case 'orderedlist':
                                        $allowedTags[] = 'ol';
                                        $allowedTags[] = 'li';
                                        break;
                                    case 'unorderedlist':
                                        $allowedTags[] = 'ul';
                                        $allowedTags[] = 'li';
                                        break;
                                    case 'outdent':
                                    case 'indent':
                                        $allowedTags[] = 'blockquote';
                                        break;
                                    case 'link':
                                        $allowedTags[] = 'a';
                                        break;
                                    case 'table':
                                        $allowedTags[] = 'table';
                                        $allowedTags[] = 'tr';
                                        $allowedTags[] = 'td';
                                        break;
                                    case 'image':
                                        $allowedTags[] = 'img';
                                        break;
                                    case 'line':
                                        $allowedTags[] = 'hr';
                                        break;
                                    default:
                                        $nothingDone = 1;
                                        break;
                                }
                                if (!$nothingDone) {
                                    $allowedTags_WOP[] = $WOP . '[conf_rte_b_' . $lI . ']';
                                }
                            }
                        }
                        if (count($fontAllowedAttrib)) {
                            $HTMLparser[] = 'tags.font.allowedAttribs = ' . implode(',', $fontAllowedAttrib);
                            $HTMLparser[] = 'tags.font.rmTagIfNoAttrib = 1';
                            $HTMLparser[] = 'tags.font.nesting = global';
                        }
                        if (count($enabledButtons)) {
                            $typeP = 'richtext[' . implode('|', $enabledButtons) . ']:rte_transform[mode=' . $transformation . '' . $rteImageDir . ']';
                        }
                        $rte_colors = array();
                        $setupUpColors = array();
                        for ($a = 1; $a <= 3; $a++) {
                            if ($fConf['conf_rte_color' . $a]) {
                                $rte_colors[$id . '_color' . $a] = trim($this->sPS('
									' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_color' . $a . ']') . '
									' . $id . '_color' . $a . ' {
										name = Color ' . $a . '
										value = ' . $fConf['conf_rte_color' . $a] . '
									}
								'));
                                $setupUpColors[] = trim($fConf['conf_rte_color' . $a]);
                            }
                        }
                        $rte_classes = array();
                        for ($a = 1; $a <= 6; $a++) {
                            if ($fConf['conf_rte_class' . $a]) {
                                $rte_classes[$id . '_class' . $a] = trim($this->sPS('
									' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_class' . $a . ']') . '
									' . $id . '_class' . $a . ' {
										name = ' . $fConf['conf_rte_class' . $a] . '
										value = ' . $fConf['conf_rte_class' . $a . '_style'] . '
									}
								'));
                            }
                        }
                        $PageTSconfig = array();
                        if ($fConf['conf_rte_removecolorpicker']) {
                            $PageTSconfig[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_removecolorpicker]');
                            $PageTSconfig[] = 'disableColorPicker = 1';
                        }
                        if (count($rte_classes)) {
                            $PageTSconfig[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_class*]');
                            $PageTSconfig[] = 'classesParagraph = ' . implode(', ', array_keys($rte_classes));
                            $PageTSconfig[] = 'classesCharacter = ' . implode(', ', array_keys($rte_classes));
                            if (in_array('p', $allowedTags) || in_array('div', $allowedTags)) {
                                $HTMLparser[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_class*]');
                                if (in_array('p', $allowedTags)) {
                                    $HTMLparser[] = 'p.fixAttrib.class.list = ,' . implode(',', array_keys($rte_classes));
                                }
                                if (in_array('div', $allowedTags)) {
                                    $HTMLparser[] = 'div.fixAttrib.class.list = ,' . implode(',', array_keys($rte_classes));
                                }
                            }
                        }
                        if (count($rte_colors)) {
                            $PageTSconfig[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_color*]');
                            $PageTSconfig[] = 'colors = ' . implode(', ', array_keys($rte_colors));
                            if (in_array('color', $fontAllowedAttrib) && $fConf['conf_rte_removecolorpicker']) {
                                $HTMLparser[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_removecolorpicker]');
                                $HTMLparser[] = 'tags.font.fixAttrib.color.list = ,' . implode(',', $setupUpColors);
                                $HTMLparser[] = 'tags.font.fixAttrib.color.removeIfFalse = 1';
                            }
                        }
                        if (!strcmp($fConf['conf_rte_removePdefaults'], 1)) {
                            $PageTSconfig[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_removePdefaults]');
                            $PageTSconfig[] = 'hidePStyleItems = H1, H2, H3, H4, H5, H6, PRE';
                        } elseif ($fConf['conf_rte_removePdefaults'] == 'H2H3') {
                            $PageTSconfig[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_removePdefaults]');
                            $PageTSconfig[] = 'hidePStyleItems = H1, H4, H5, H6';
                        } else {
                            $allowedTags[] = 'h1';
                            $allowedTags[] = 'h2';
                            $allowedTags[] = 'h3';
                            $allowedTags[] = 'h4';
                            $allowedTags[] = 'h5';
                            $allowedTags[] = 'h6';
                            $allowedTags[] = 'pre';
                        }
                        $allowedTags = array_unique($allowedTags);
                        if (count($allowedTags)) {
                            $HTMLparser[] = '	' . $this->WOPcomment('WOP:' . implode(' / ', $allowedTags_WOP));
                            $HTMLparser[] = 'allowTags = ' . implode(', ', $allowedTags);
                        }
                        if ($fConf['conf_rte_div_to_p']) {
                            $HTMLparser[] = '	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rte_div_to_p]');
                            $HTMLparser[] = 'tags.div.remap = P';
                        }
                        if (count($HTMLparser)) {
                            $PageTSconfig[] = trim($this->wrapBody('
								proc.exitHTMLparser_db=1
								proc.exitHTMLparser_db {
									', implode(chr(10), $HTMLparser), '
								}
							'));
                        }
                        $finalPageTSconfig = array();
                        if (count($rte_colors)) {
                            $finalPageTSconfig[] = trim($this->wrapBody('
								RTE.colors {
								', implode(chr(10), $rte_colors), '
								}
							'));
                        }
                        if (count($rte_classes)) {
                            $finalPageTSconfig[] = trim($this->wrapBody('
								RTE.classes {
								', implode(chr(10), $rte_classes), '
								}
							'));
                        }
                        if (count($PageTSconfig)) {
                            $finalPageTSconfig[] = trim($this->wrapBody('
								RTE.config.' . $table . '.' . $fConf['fieldname'] . ' {
								', implode(chr(10), $PageTSconfig), '
								}
							'));
                        }
                        if (count($finalPageTSconfig)) {
                            $this->wizard->ext_localconf[] = trim($this->wrapBody("\n\t\t\t\t\t\t\t\tt3lib_extMgm::addPageTSConfig('\n\n\t\t\t\t\t\t\t\t\t# ***************************************************************************************\n\t\t\t\t\t\t\t\t\t# CONFIGURATION of RTE in table \"" . $table . "\", field \"" . $fConf["fieldname"] . "\"\n\t\t\t\t\t\t\t\t\t# ***************************************************************************************\n\n\t\t\t\t\t\t\t\t", trim($this->slashValueForSingleDashes(str_replace(chr(9), "  ", implode(chr(10) . chr(10), $finalPageTSconfig)))), "\n\t\t\t\t\t\t\t\t');\n\t\t\t\t\t\t\t", 0));
                        }
                        break;
                }
                $this->wizard->_typeP[$fConf['fieldname']] = $typeP;
                break;
            case 'check':
            case 'check_4':
            case 'check_10':
                $configL[] = '\'type\' => \'check\',';
                if ($t == 'check') {
                    $DBfields[] = $fConf['fieldname'] . ' tinyint(3) DEFAULT \'0\' NOT NULL,';
                    if ($fConf['conf_check_default']) {
                        $configL[] = '\'default\' => 1,	' . $this->WOPcomment('WOP:' . $WOP . '[conf_check_default]');
                    }
                } else {
                    $DBfields[] = $fConf['fieldname'] . ' int(11) DEFAULT \'0\' NOT NULL,';
                }
                if ($t == 'check_4' || $t == 'check_10') {
                    $configL[] = '\'cols\' => 4,';
                    $cItems = array();
                    $aMax = intval($fConf["conf_numberBoxes"]);
                    for ($a = 0; $a < $aMax; $a++) {
                        $cItems[] = 'array(\'' . addslashes($this->getSplitLabels_reference($fConf, "conf_boxLabel_" . $a, $table . "." . $fConf["fieldname"] . ".I." . $a)) . '\', \'\'),';
                    }
                    $configL[] = trim($this->wrapBody('
						\'items\' => array(
							', implode(chr(10), $cItems), '
						),
					'));
                }
                break;
            case 'radio':
            case 'select':
                $configL[] = '\'type\' => \'' . ($t == 'select' ? 'select' : 'radio') . '\',';
                $notIntVal = 0;
                $len = array();
                $numberOfItems = $version < 4006000 ? t3lib_div::intInRange($fConf['conf_select_items'], 1, 20) : t3lib_utility_Math::forceIntegerInRange($fConf['conf_select_items'], 1, 20);
                for ($a = 0; $a < $numberOfItems; $a++) {
                    $val = $fConf["conf_select_itemvalue_" . $a];
                    if ($version < 4006000) {
                        $notIntVal += t3lib_div::testInt($val) ? 0 : 1;
                    } else {
                        $notIntVal += t3lib_utility_Math::canBeInterpretedAsInteger($val) ? 0 : 1;
                    }
                    $len[] = strlen($val);
                    if ($fConf["conf_select_icons"] && $t == "select") {
                        $icon = ', t3lib_extMgm::extRelPath(\'' . $extKey . '\').\'' . 'selicon_' . $id . '_' . $a . '.gif' . '\'';
                        // Add wizard icon
                        $this->addFileToFileArray("selicon_" . $id . "_" . $a . ".gif", t3lib_div::getUrl(t3lib_extMgm::extPath("kickstarter") . "res/wiz.gif"));
                    } else {
                        $icon = "";
                    }
                    //					$cItems[]='Array("'.str_replace("\\'","'",addslashes($this->getSplitLabels($fConf,"conf_select_item_".$a))).'", "'.addslashes($val).'"'.$icon.'),';
                    $cItems[] = 'array(\'' . addslashes($this->getSplitLabels_reference($fConf, "conf_select_item_" . $a, $table . "." . $fConf["fieldname"] . ".I." . $a)) . '\', \'' . addslashes($val) . '\'' . $icon . '),';
                }
                $configL[] = trim($this->wrapBody('
					' . $this->WOPcomment('WOP:' . $WOP . '[conf_select_items]') . '
					\'items\' => array(
						', implode(chr(10), $cItems), '
					),
				'));
                if ($fConf['conf_select_pro'] && $t == 'select') {
                    $cN = $this->returnName($extKey, 'class', $id);
                    $configL[] = '\'itemsProcFunc\' => \'' . $cN . '->main\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_select_pro]');
                    $classContent = $this->sPS('class ' . $cN . ' {

	/**
	 * [Describe function...]
	 *
	 * @param	[type]		$$params: ...
	 * @param	[type]		$pObj: ...
	 * @return	[type]		...
	 */
							function main(&$params,&$pObj)	{
/*
								debug(\'Hello World!\',1);
								debug(\'$params:\',1);
								debug($params);
								debug(\'$pObj:\',1);
								debug($pObj);
*/
									// Adding an item!
								$params[\'items\'][] = array($pObj->sL(\'Added label by PHP function|Tilfjet Dansk tekst med PHP funktion\'), 999);

								// No return - the $params and $pObj variables are passed by reference, so just change content in then and it is passed back automatically...
							}
						}
					', 0);
                    $this->addFileToFileArray('class.' . $cN . '.php', $this->PHPclassFile($extKey, 'class.' . $cN . '.php', $classContent, 'Class/Function which manipulates the item-array for table/field ' . $id . '.'));
                    $this->wizard->ext_tables[] = $this->sPS('
						' . $this->WOPcomment('WOP:' . $WOP . '[conf_select_pro]:') . '
						if (TYPO3_MODE === \'BE\')	{
							include_once(t3lib_extMgm::extPath(\'' . $extKey . '\').\'' . 'class.' . $cN . '.php\');
						}
					');
                }
                $numberOfRelations = $version < 4006000 ? t3lib_div::intInRange($fConf['conf_relations'], 1, 100) : t3lib_utility_Math::forceIntegerInRange($fConf['conf_relations'], 1, 100);
                if ($t == 'select') {
                    if ($version < 4006000) {
                        $configL[] = '\'size\' => ' . t3lib_div::intInRange($fConf['conf_relations_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_selsize]');
                    } else {
                        $configL[] = '\'size\' => ' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_relations_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_selsize]');
                    }
                    $configL[] = '\'maxitems\' => ' . $numberOfRelations . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations]');
                }
                if ($numberOfRelations > 1 && $t == "select") {
                    if ($numberOfRelations * 4 < 256) {
                        $DBfields[] = $fConf["fieldname"] . " varchar(" . $numberOfRelations * 4 . ") DEFAULT '' NOT NULL,";
                    } else {
                        $DBfields[] = $fConf["fieldname"] . " text,";
                    }
                } elseif ($notIntVal) {
                    $varCharLn = $version < 4006000 ? t3lib_div::intInRange(max($len), 1) : t3lib_utility_Math::forceIntegerInRange(max($len), 1);
                    $DBfields[] = $fConf["fieldname"] . " " . ($varCharLn > $this->wizard->charMaxLng ? 'var' : '') . "char(" . $varCharLn . ") DEFAULT '' NOT NULL,";
                } else {
                    $DBfields[] = $fConf["fieldname"] . ' int(11) DEFAULT \'0\' NOT NULL,';
                }
                break;
            case 'rel':
                if ($fConf["conf_rel_type"] == "group") {
                    $configL[] = '\'type\' => \'group\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_type]');
                    $configL[] = '\'internal_type\' => \'db\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_type]');
                } else {
                    $configL[] = '\'type\' => \'select\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_type]');
                }
                if ($fConf["conf_rel_type"] != "group" && $fConf["conf_relations"] == 1 && $fConf["conf_rel_dummyitem"]) {
                    $configL[] = trim($this->wrapBody('
						' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_dummyitem]') . '
						\'items\' => array(
							', 'array(\'\', 0),', '
						),
					'));
                }
                if (t3lib_div::inList("tt_content,fe_users,fe_groups", $fConf["conf_rel_table"])) {
                    $this->wizard->EM_CONF_presets["dependencies"][] = "cms";
                }
                if ($fConf["conf_rel_table"] == "_CUSTOM") {
                    $fConf["conf_rel_table"] = $fConf["conf_custom_table_name"] ? $fConf["conf_custom_table_name"] : "NO_TABLE_NAME_AVAILABLE";
                }
                if ($fConf["conf_rel_type"] == "group") {
                    $configL[] = '\'allowed\' => \'' . ($fConf["conf_rel_table"] != "_ALL" ? $fConf["conf_rel_table"] : "*") . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_table]');
                    if ($fConf["conf_rel_table"] == "_ALL") {
                        $configL[] = '\'prepend_tname\' => 1,	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_table]=_ALL');
                    }
                } else {
                    switch ($fConf["conf_rel_type"]) {
                        case "select_cur":
                            $where = "AND " . $fConf["conf_rel_table"] . ".pid=###CURRENT_PID### ";
                            break;
                        case "select_root":
                            $where = "AND " . $fConf["conf_rel_table"] . ".pid=###SITEROOT### ";
                            break;
                        case "select_storage":
                            $where = "AND " . $fConf["conf_rel_table"] . ".pid=###STORAGE_PID### ";
                            break;
                        default:
                            $where = "";
                            break;
                    }
                    $configL[] = '\'foreign_table\' => \'' . $fConf["conf_rel_table"] . '\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_table]');
                    $configL[] = '\'foreign_table_where\' => \'' . $where . 'ORDER BY ' . $fConf["conf_rel_table"] . '.uid\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_rel_type]');
                }
                if ($version < 4006000) {
                    $configL[] = '\'size\' => ' . t3lib_div::intInRange($fConf['conf_relations_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_selsize]');
                    $configL[] = '\'minitems\' => 0,';
                    $configL[] = '\'maxitems\' => ' . t3lib_div::intInRange($fConf['conf_relations'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations]');
                    $confRelations = t3lib_div::intInRange($fConf['conf_relations'], 1, 100);
                } else {
                    $configL[] = '\'size\' => ' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_relations_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_selsize]');
                    $configL[] = '\'minitems\' => 0,';
                    $configL[] = '\'maxitems\' => ' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_relations'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations]');
                    $confRelations = t3lib_utility_Math::forceIntegerInRange($fConf['conf_relations'], 1, 100);
                }
                if ($fConf["conf_relations_mm"]) {
                    $mmTableName = $id . "_mm";
                    $configL[] = '"MM" => "' . $mmTableName . '",	' . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_mm]');
                    $DBfields[] = $fConf["fieldname"] . ' int(11) DEFAULT \'0\' NOT NULL,';
                    $createTable = $this->sPS("\n\t\t\t\t\t\t#\n\t\t\t\t\t\t# Table structure for table '" . $mmTableName . "'\n\t\t\t\t\t\t# " . $this->WOPcomment('WOP:' . $WOP . '[conf_relations_mm]') . "\n\t\t\t\t\t\t#\n\t\t\t\t\t\tCREATE TABLE " . $mmTableName . " (\n\t\t\t\t\t\t  uid_local int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t  uid_foreign int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t  tablenames varchar(30) DEFAULT '' NOT NULL,\n\t\t\t\t\t\t  sorting int(11) DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t  KEY uid_local (uid_local),\n\t\t\t\t\t\t  KEY uid_foreign (uid_foreign)\n\t\t\t\t\t\t);\n\t\t\t\t\t");
                    $this->wizard->ext_tables_sql[] = chr(10) . $createTable . chr(10);
                } elseif ($confRelations > 1 || $fConf["conf_rel_type"] == "group") {
                    $DBfields[] = $fConf["fieldname"] . " text,";
                } else {
                    $DBfields[] = $fConf["fieldname"] . ' int(11) DEFAULT \'0\' NOT NULL,';
                }
                if ($fConf["conf_rel_type"] != "group") {
                    $wTable = $fConf["conf_rel_table"];
                    $wizards = array();
                    if ($fConf["conf_wiz_addrec"]) {
                        $wizards[] = trim($this->sPS('
							' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_addrec]') . '
							\'add\' => array(
								\'type\'   => \'script\',
								\'title\'  => \'Create new record\',
								\'icon\'   => \'add.gif\',
								\'params\' => array(
									\'table\'    => \'' . $wTable . '\',
									\'pid\'      => \'###CURRENT_PID###\',
									\'setValue\' => \'prepend\'
								),
								\'script\' => \'wizard_add.php\',
							),
						'));
                    }
                    if ($fConf["conf_wiz_listrec"]) {
                        $wizards[] = trim($this->sPS('
							' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_listrec]') . '
							\'list\' => array(
								\'type\'   => \'script\',
								\'title\'  => \'List\',
								\'icon\'   => \'list.gif\',
								\'params\' => array(
									\'table\' => \'' . $wTable . '\',
									\'pid\'   => \'###CURRENT_PID###\',
								),
								\'script\' => \'wizard_list.php\',
							),
						'));
                    }
                    if ($fConf["conf_wiz_editrec"]) {
                        $wizards[] = trim($this->sPS('
							' . $this->WOPcomment('WOP:' . $WOP . '[conf_wiz_editrec]') . '
							\'edit\' => array(
								\'type\'                     => \'popup\',
								\'title\'                    => \'Edit\',
								\'script\'                   => \'wizard_edit.php\',
								\'popup_onlyOpenIfSelected\' => 1,
								\'icon\'                     => \'edit2.gif\',
								\'JSopenParams\'             => \'height=350,width=580,status=0,menubar=0,scrollbars=1\',
							),
						'));
                    }
                    if (count($wizards)) {
                        $configL[] = trim($this->wrapBody('
							\'wizards\' => array(
								\'_PADDING\'  => 2,
								\'_VERTICAL\' => 1,
								', implode(chr(10), $wizards), '
							),
						'));
                    }
                }
                break;
            case "files":
                $configL[] = '\'type\' => \'group\',';
                $configL[] = '\'internal_type\' => \'file\',';
                switch ($fConf["conf_files_type"]) {
                    case "images":
                        $configL[] = '\'allowed\' => $GLOBALS[\'TYPO3_CONF_VARS\'][\'GFX\'][\'imagefile_ext\'],	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_type]');
                        break;
                    case "webimages":
                        $configL[] = '\'allowed\' => \'gif,png,jpeg,jpg\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_type]');
                        // TODO use web images definition from install tool
                        break;
                    case "all":
                        $configL[] = '\'allowed\' => \'\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_type]');
                        $configL[] = '\'disallowed\' => \'php,php3\',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_type]');
                        break;
                }
                $configL[] = '\'max_size\' => $GLOBALS[\'TYPO3_CONF_VARS\'][\'BE\'][\'maxFileSize\'],	' . $this->WOPcomment('WOP:' . $WOP . '[conf_max_filesize]');
                $this->wizard->EM_CONF_presets["uploadfolder"] = 1;
                $ulFolder = 'uploads/tx_' . str_replace("_", "", $extKey);
                $configL[] = '\'uploadfolder\' => \'' . $ulFolder . '\',';
                if ($fConf['conf_files_thumbs']) {
                    $configL[] = '\'show_thumbs\' => 1,	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_thumbs]');
                }
                if ($version < 4006000) {
                    $configL[] = '\'size\' => ' . t3lib_div::intInRange($fConf['conf_files_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_selsize]');
                    $configL[] = '\'minitems\' => 0,';
                    $configL[] = '\'maxitems\' => ' . t3lib_div::intInRange($fConf['conf_files'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files]');
                } else {
                    $configL[] = '\'size\' => ' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_files_selsize'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files_selsize]');
                    $configL[] = '\'minitems\' => 0,';
                    $configL[] = '\'maxitems\' => ' . t3lib_utility_Math::forceIntegerInRange($fConf['conf_files'], 1, 100) . ',	' . $this->WOPcomment('WOP:' . $WOP . '[conf_files]');
                }
                $DBfields[] = $fConf["fieldname"] . " text,";
                break;
            case 'flex':
                $DBfields[] = $fConf['fieldname'] . ' mediumtext,';
                $configL[] = trim($this->sPS('
					\'type\' => \'flex\',
		\'ds\' => array(
			\'default\' => \'FILE:EXT:' . $extKey . '/flexform_' . $table . '_' . $fConf['fieldname'] . '.xml\',
		),
				'));
                $this->addFileToFileArray('flexform_' . $table . '_' . $fConf['fieldname'] . '.xml', $this->createFlexForm());
                break;
            case "none":
                $DBfields[] = $fConf["fieldname"] . " tinytext,";
                $configL[] = trim($this->sPS('
					\'type\' => \'none\',
				'));
                break;
            case "passthrough":
                $DBfields[] = $fConf["fieldname"] . " tinytext,";
                $configL[] = trim($this->sPS('
					\'type\' => \'passthrough\',
				'));
                break;
            case 'inline':
                #$DBfields=$this->getInlineDBfields($fConf);
                if ($DBfields) {
                    $DBfields = array_merge($DBfields, $this->getInlineDBfields($table, $fConf));
                }
                $configL = $this->getInlineTCAconfig($table, $fConf);
                break;
            default:
                debug("Unknown type: " . (string) $fConf["type"]);
                break;
        }
        if ($t == "passthrough") {
            $columns[$fConf["fieldname"]] = trim($this->wrapBody('
				\'' . $fConf["fieldname"] . '\' => array(		' . $this->WOPcomment('WOP:' . $WOP . '[fieldname]') . '
					\'config\' => array(
						', implode(chr(10), $configL), '
					)
				),
			', 2));
        } else {
            $columns[$fConf["fieldname"]] = trim($this->wrapBody('
				\'' . $fConf["fieldname"] . '\' => array(		' . $this->WOPcomment('WOP:' . $WOP . '[fieldname]') . '
					\'exclude\' => ' . ($fConf["excludeField"] ? 1 : 0) . ',		' . $this->WOPcomment('WOP:' . $WOP . '[excludeField]') . '
					\'label\' => \'' . addslashes($this->getSplitLabels_reference($fConf, "title", $table . "." . $fConf["fieldname"])) . '\',		' . $this->WOPcomment('WOP:' . $WOP . '[title]') . '
					\'config\' => array(
						', implode(chr(10), $configL), '
					)
				),
			', 2));
        }
    }
 /**
  * Returns TRUE if the current TYPO3 version (or compatibility version) is compatible to the input version
  * Notice that this function compares branches, not versions (4.0.1 would be > 4.0.0 although they use the same compat_version)
  *
  * @param string $verNumberStr	Minimum branch number required (format x.y / e.g. "4.0" NOT "4.0.0"!)
  * @return boolean Returns TRUE if this setup is compatible with the provided version number
  * @todo Still needs a function to convert versions to branches
  */
 public static function compat_version($verNumberStr)
 {
     $currVersionStr = $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] : TYPO3_branch;
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger($currVersionStr) < t3lib_utility_VersionNumber::convertVersionNumberToInteger($verNumberStr)) {
         return FALSE;
     } else {
         return TRUE;
     }
 }
 /**
  * Returns the keys of the loaded extensions.
  *
  * @return array<string> the keys of the loaded extensions, might be empty
  */
 protected function getLoadedExtensionKeys()
 {
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 6000000) {
         $allExtensionKeys = t3lib_extMgm::getLoadedExtensionListArray();
     } else {
         $requiredExtensionList = t3lib_extMgm::getRequiredExtensionList();
         $loadedExtensionList = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']) ? $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] : '';
         $allExtensionKeys = array_unique(t3lib_div::trimExplode(',', $loadedExtensionList . ',' . $requiredExtensionList, TRUE));
     }
     return $allExtensionKeys;
 }
 /**
  * Return the integer value of a version string
  * 
  * @param string $versionString
  * @return integer
  */
 function getIntFromVersion($versionString = NULL)
 {
     if (class_exists(t3lib_utility_VersionNumber)) {
         return t3lib_utility_VersionNumber::convertVersionNumberToInteger($versionString);
     } else {
         return t3lib_div::int_from_ver($versionString);
     }
 }
 /**
  * @test
  */
 public function getLoadedExtensionKeysReturnsKeysOfLoadedExtensionsBelowVersionSix()
 {
     if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) >= 6000000) {
         $this->markTestSkipped('This test is available in TYPO3 below version 6.0.');
     }
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = 'bar';
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = '';
     $this->assertContains('bar', $this->fixture->getLoadedExtensionKeys());
 }
 /**
  * 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;
         }
     }
 }
Beispiel #30
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
t3lib_extMgm::allowTableOnStandardPages('tx_myquizpoll_question');
$TCA['tx_myquizpoll_question'] = array('ctrl' => array('title' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_question', 'label' => 'title', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'versioningWS' => TRUE, 'origUid' => 't3_origuid', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', 'sortby' => 'sorting', 'delete' => 'deleted', 'enablecolumns' => array('disabled' => 'hidden', 'fe_group' => 'fe_group'), 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php', 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_myquizpoll_question.gif'));
t3lib_extMgm::allowTableOnStandardPages('tx_myquizpoll_voting');
$TCA['tx_myquizpoll_voting'] = array('ctrl' => array('title' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_voting', 'label' => 'answer_no', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', 'default_sortby' => 'ORDER BY crdate', 'enablecolumns' => array('disabled' => 'hidden'), 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php', 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_myquizpoll_voting.gif'));
t3lib_extMgm::allowTableOnStandardPages('tx_myquizpoll_result');
$TCA['tx_myquizpoll_result'] = array('ctrl' => array('title' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_result', 'label' => 'name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', 'default_sortby' => 'ORDER BY crdate', 'enablecolumns' => array('disabled' => 'hidden'), 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php', 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_myquizpoll_result.gif'));
t3lib_extMgm::allowTableOnStandardPages('tx_myquizpoll_relation');
$TCA['tx_myquizpoll_relation'] = array('ctrl' => array('title' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_relation', 'label' => 'uid', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', 'default_sortby' => 'ORDER BY crdate', 'enablecolumns' => array('disabled' => 'hidden'), 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php', 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_myquizpoll_relation.gif'));
t3lib_extMgm::allowTableOnStandardPages('tx_myquizpoll_category');
$TCA['tx_myquizpoll_category'] = array('ctrl' => array('title' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_category', 'label' => 'name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'default_sortby' => 'ORDER BY name', 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php', 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_myquizpoll_category.gif'));
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4008000) {
    t3lib_div::loadTCA('tt_content');
}
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY . '_pi1', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml');
t3lib_extMgm::addPlugin(array('LLL:EXT:myquizpoll/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1', t3lib_extMgm::extRelPath($_EXTKEY) . 'ext_icon.gif'), 'list_type');
if (TYPO3_MODE == 'BE') {
    $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_myquizpoll_pi1_wizicon'] = t3lib_extMgm::extPath($_EXTKEY) . 'pi1/class.tx_myquizpoll_pi1_wizicon.php';
}
t3lib_extMgm::addStaticFile($_EXTKEY, 'pi1/static/', 'My quiz and poll: default styles');
t3lib_extMgm::addStaticFile($_EXTKEY, 'static/defaultsettings/', 'My quiz and poll: default settings');
t3lib_extMgm::addStaticFile($_EXTKEY, 'static/starrating/', 'My quiz and poll: star rating (question type)');
t3lib_extMgm::addStaticFile($_EXTKEY, 'static/uistars/', 'My quiz and poll: star rating (rating)');
$TCA['pages']['columns']['module']['config']['items'][] = array('My Quiz and Poll', 'myquizpoll', t3lib_extMgm::extRelPath($_EXTKEY) . 'ext_icon_myquizpoll_folder.gif');