/**
  * 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;
 }
//
// Add static typoscript configurations
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Bootstrap Core');
// Only if enables in ext conf
if (isset($extConf['enableHeaderRenderingOption']) && $extConf['enableHeaderRenderingOption']) {
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Header', 'Headers rendering option');
}
// Set custom flexform for tt_content ctype table
$GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds']['*,table'] = 'FILE:EXT:bootstrap_core/Configuration/FlexForm/flexform_table.xml';
// --------------------------------------------------------------------
// Additional fields
//
// Define field
$tempColumn = array('tx_bootstrapcore_visibility' => array('exclude' => 0, 'displayCond' => 'FIELD:section_frame:!=:66', 'label' => 'LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.tx_bootstrapcore_visibility', 'config' => array('type' => 'select', 'renderType' => 'selectSingle', 'items' => array(array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.visibility.notset', ''), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.visible.xs', 'visible-xs'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.visible.sm-xs', 'visible-xs visible-sm'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.visible.md-lg', 'visible-md visible-lg'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.visible.lg', 'visible-lg'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.hidden.xs', 'hidden-xs'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.hidden.sm-xs', 'hidden-xs hidden-sm'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.hidden.md-lg', 'hidden-md hidden-lg'), array('LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.hidden.lg', 'hidden-lg')), 'size' => 1, 'maxitems' => 1)));
// re-add removed field in 7.2
if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7002000) {
    // labels still available in 7.3.1
    $tempColumn['imagecaption_position'] = array('label' => 'LLL:EXT:cms/locallang_ttc.xlf:imagecaption_position', 'config' => array('type' => 'select', 'renderType' => 'selectSingle', 'items' => array(array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', ''), array('LLL:EXT:cms/locallang_ttc.xlf:imagecaption_position.I.1', 'center'), array('LLL:EXT:cms/locallang_ttc.xlf:imagecaption_position.I.2', 'right'), array('LLL:EXT:cms/locallang_ttc.xlf:imagecaption_position.I.3', 'left')), 'default' => ''));
}
// Add field to tt_content
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumn, 1);
// Add to forms
// visiblity below frames
$GLOBALS['TCA']['tt_content']['palettes']['frames']['showitem'] .= ',--linebreak--, tx_bootstrapcore_visibility;LLL:EXT:bootstrap_core/Resources/Private/Language/locallang_db.xlf:tt_content.tx_bootstrapcore_visibility';
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles();
/**
 * Extension: news
 * File: /Users/oliverkierepka/DEV/phpstorm_projects/vkmh_typo3/typo3conf/ext/news/ext_tables.php
 */
$_EXTKEY = 'news';
$_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY];
Esempio n. 3
0
    if (!isset($TBE_MODULES['DirectMailNavFrame'])) {
        $temp_TBE_MODULES = array();
        foreach ($TBE_MODULES as $key => $val) {
            if ($key == 'help') {
                $temp_TBE_MODULES['DirectMailNavFrame'] = '';
                $temp_TBE_MODULES[$key] = $val;
            } else {
                $temp_TBE_MODULES[$key] = $val;
            }
        }
        $TBE_MODULES = $temp_TBE_MODULES;
    }
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', '', '', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\NavFrame::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangNavFrame.xlf')));
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'DirectMail', 'bottom', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\Dmail::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame_DirectMail', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-directmail.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangDirectMail.xlf'), 'navigationFrameModule' => 'DirectMailNavFrame', 'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_DirectMail')));
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'RecipientList', 'bottom', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\RecipientList::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame_RecipientList', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-recipient-list.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangRecipientList.xlf'), 'navigationFrameModule' => 'DirectMailNavFrame', 'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_RecipientList')));
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Statistics', 'bottom', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\Statistics::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame_Statistics', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-statistics.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangStatistics.xlf'), 'navigationFrameModule' => 'DirectMailNavFrame', 'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_Statistics')));
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'MailerEngine', 'bottom', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\MailerEngine::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame_MailerEngine', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-mailer-engine.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangMailerEngine.xlf'), 'navigationFrameModule' => 'DirectMailNavFrame', 'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_MailerEngine')));
    TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Configuration', 'bottom', '', array('routeTarget' => DirectMailTeam\DirectMail\Module\Configuration::class . '::mainAction', 'access' => 'group,user', 'name' => 'DirectMailNavFrame_Configuration', 'workspaces' => 'online', 'labels' => array('tabs_images' => array('tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-configuration.svg'), 'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangConfiguration.xlf'), 'navigationFrameModule' => 'DirectMailNavFrame', 'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_Configuration')));
}
$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif';
if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) {
    $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail';
}
if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('tt_address')) <= TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('2.3.5')) {
    include_once TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . "Configuration/TCA/Overrides/tt_address.php";
}
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon('direct_mail_newmail', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/newmail.gif']);
$iconRegistry->registerIcon('direct_mail_preview_html', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/preview_html.gif']);
$iconRegistry->registerIcon('direct_mail_preview_plain', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/preview_txt.gif']);
Esempio n. 4
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
// check Multishop version
if (!$this->ms['MODULES']['GLOBAL_MODULES']['MULTISHOP_VERSION']) {
    $this->runUpdate = 1;
} else {
    $info = mslib_befe::getExtensionInfo($this->DOCUMENT_ROOT_MS, 'multishop');
    //$current_version=class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger($this->ms['MODULES']['GLOBAL_MODULES']['MULTISHOP_VERSION']) :  \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($this->ms['MODULES']['GLOBAL_MODULES']['MULTISHOP_VERSION']);
    // TYPO3 V7 FIX
    $current_version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger($this->ms['MODULES']['GLOBAL_MODULES']['MULTISHOP_VERSION']) : TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($this->ms['MODULES']['GLOBAL_MODULES']['MULTISHOP_VERSION']);
    //$new_version=class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger($info['version']) :  \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($info['version']);
    // TYPO3 V7 FIX
    $new_version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger($info['version']) : TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($info['version']);
    if ($current_version < $new_version) {
        // update current_version
        $array = array();
        $array['configuration_value'] = $info['version'];
        $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_configuration', 'configuration_key=\'MULTISHOP_VERSION\'', $array);
        $res = $GLOBALS['TYPO3_DB']->sql_query($query);
        //TODO later we will execute the update method from here, instead of outside this if statement
        $this->runUpdate = 1;
    }
}
if ($this->runUpdate) {
    $runAutoUpdate = 1;
    if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/meta_tags.php']['runAutoUpdatePreProc'])) {
        $params = array('runAutoUpdate' => &$runAutoUpdate);
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/meta_tags.php']['runAutoUpdatePreProc'] as $funcRef) {
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
/**
 * [CLASS/FUNCTION INDEX of SCRIPT]
 * Hint: use extdeveval to insert/update function index above.
 */
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
if ($version < 6000000) {
    require_once PATH_tslib . 'class.tslib_pibase.php';
}
/**
 * Plugin 'multishop' for the 'multishop' extension.
 * @author    BVB Media BV - Bas van Beek <*****@*****.**>
 * @package    TYPO3
 * @subpackage    tx_multishop
 */
class tx_multishop_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
    var $cObj;
    // reference to the calling object.
    var $prefixId = 'tx_multishop_pi1';
    // Same as class name