-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove support for TYPO3 before 7.6
- Loading branch information
Showing
24 changed files
with
1,351 additions
and
793 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with TYPO3 source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
|
||
namespace JambageCom\Jfmulticontent\Controller\Plugin; | ||
|
||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | ||
|
||
/** | ||
* Class that adds the wizard icon. | ||
* | ||
* @category Plugin | ||
* @package TYPO3 | ||
* @subpackage jfmulticontent | ||
* @author Franz Holzinger <franz@ttproducts.de> | ||
* @license http://www.gnu.org/copyleft/gpl.html | ||
*/ | ||
class WizardIcon | ||
{ | ||
/** | ||
* Processes the wizard items array. | ||
* | ||
* @param array $wizardItems The wizard items | ||
* @return array Modified array with wizard items | ||
*/ | ||
public function proc(array $wizardItems) | ||
{ | ||
$wizardIcon = 'pi1/ce_wiz.gif'; | ||
$listType = JFMULTICONTENT_EXT . '_pi1'; | ||
$params = '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=' . $listType; | ||
|
||
$wizardItem = array( | ||
'title' => $GLOBALS['LANG']->sL('LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang.xml:pi1_title'), | ||
'description' => $GLOBALS['LANG']->sL('LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang.xml:pi1_plus_wiz_description'), | ||
'params' => $params | ||
); | ||
|
||
$iconIdentifier = 'extensions-jfmulticontent-wizard'; | ||
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */ | ||
$iconRegistry = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); | ||
$iconRegistry->registerIcon( | ||
$iconIdentifier, | ||
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, | ||
array( | ||
'source' => 'EXT:' . JFMULTICONTENT_EXT . '/' . $wizardIcon, | ||
) | ||
); | ||
$wizardItem['iconIdentifier'] = $iconIdentifier; | ||
|
||
$wizardItems['plugins_tx_' . $listType] = $wizardItem; | ||
|
||
return $wizardItems; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
<?php | ||
defined('TYPO3_MODE') || die('Access denied.'); | ||
|
||
$table = 'tt_content'; | ||
|
||
$listType = JFMULTICONTENT_EXT . '_pi1'; | ||
|
||
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist'][$listType] = 'layout,select_key,pages'; | ||
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$listType] = 'tx_jfmulticontent_view,tx_jfmulticontent_pages,tx_jfmulticontent_contents,tx_jfmulticontent_irre,pi_flexform'; | ||
// Add reload field to tt_content | ||
$GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] .= ($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] ? ',' : '') . 'tx_jfmulticontent_view'; | ||
|
||
$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][JFMULTICONTENT_EXT]); | ||
|
||
$colPosOfIrreContent = intval($confArr['colPosOfIrreContent']); | ||
|
||
if (!isset($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'][$colPosOfIrreContent])) { | ||
// Add the new colPos to the array, only if the ID does not exist... | ||
$GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'][$colPosOfIrreContent] = [ | ||
'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.colPosOfIrreContent', | ||
$colPosOfIrreContent | ||
]; | ||
// $GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['disableNoMatchingValueElement'] = 1; // neu FHO | ||
} | ||
|
||
|
||
|
||
$temporaryColumns = array( | ||
'tx_jfmulticontent_view' => array( | ||
'exclude' => 1, | ||
'onChange' => 'reload', | ||
'label' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.view', | ||
'config' => array ( | ||
'type' => 'select', | ||
'size' => 1, | ||
'maxitems' => 1, | ||
'default' => 'content', | ||
'items' => array( | ||
array('LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.view.I.0', 'content'), | ||
array('LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.view.I.1', 'page'), | ||
array('LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.view.I.2', 'irre'), | ||
), | ||
'itemsProcFunc' => 'EXT:' . JFMULTICONTENT_EXT . '/lib/class.tx_jfmulticontent_itemsProcFunc.php:&tx_jfmulticontent_itemsProcFunc->getViews', | ||
) | ||
), | ||
'tx_jfmulticontent_pages' => array( | ||
'exclude' => 1, | ||
'displayCond' => 'FIELD:tx_jfmulticontent_view:IN:page', | ||
'label' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.pages', | ||
'config' => array ( | ||
'type' => 'group', | ||
'internal_type' => 'db', | ||
'allowed' => 'pages', | ||
'size' => 12, | ||
'minitems' => 0, | ||
'maxitems' => 1000, | ||
'wizards' => array( | ||
'suggest' => array( | ||
'type' => 'suggest', | ||
), | ||
), | ||
) | ||
), | ||
'tx_jfmulticontent_irre' => Array ( | ||
'exclude' => 1, | ||
'displayCond' => 'FIELD:tx_jfmulticontent_view:IN:irre', | ||
'label' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.irre', | ||
'config' => array ( | ||
'type' => 'inline', | ||
'foreign_table' => 'tt_content', | ||
'foreign_field' => 'tx_jfmulticontent_irre_parentid', | ||
'foreign_sortby' => 'sorting', | ||
'foreign_label' => 'header', | ||
'maxitems' => 1000, | ||
'appearance' => array( | ||
'showSynchronizationLink' => FALSE, | ||
'showAllLocalizationLink' => FALSE, | ||
'showPossibleLocalizationRecords' => FALSE, | ||
'showRemovedLocalizationRecords' => FALSE, | ||
'expandSingle' => TRUE, | ||
'newRecordLinkAddTitle' => TRUE, | ||
'useSortable' => TRUE, | ||
), | ||
'behaviour' => array( | ||
'localizeChildrenAtParentLocalization' => 1, | ||
'localizationMode' => 'select', | ||
), | ||
) | ||
), | ||
); | ||
|
||
|
||
if ($confArr["useStoragePidOnly"]) { | ||
$temporaryColumns['tx_jfmulticontent_contents'] = array( | ||
'exclude' => 1, | ||
'displayCond' => 'FIELD:tx_jfmulticontent_view:IN:,content', | ||
'label' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents', | ||
'config' => array ( | ||
'type' => 'select', | ||
'foreign_table' => 'tt_content', | ||
'foreign_table_where' => 'AND tt_content.pid=###STORAGE_PID### AND tt_content.hidden=0 AND tt_content.deleted=0 AND tt_content.sys_language_uid IN (0,-1) ORDER BY tt_content.uid', | ||
'size' => 12, | ||
'minitems' => 0, | ||
'maxitems' => 1000, | ||
'wizards' => array( | ||
'_PADDING' => 2, | ||
'_VERTICAL' => 1, | ||
'add' => array( | ||
'type' => 'script', | ||
'title' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents_add', | ||
'icon' => 'add.gif', | ||
'script' => 'wizard_add.php', | ||
'params' => array( | ||
'table' => 'tt_content', | ||
'pid' => '###STORAGE_PID###', | ||
'setValue' => 'prepend' | ||
), | ||
), | ||
'list' => array( | ||
'type' => 'script', | ||
'title' => 'List', | ||
'icon' => 'list.gif', | ||
'script' => 'wizard_list.php', | ||
'params' => array( | ||
'table' => 'tt_content', | ||
'pid' => '###STORAGE_PID###', | ||
), | ||
), | ||
'edit' => array( | ||
'type' => 'popup', | ||
'title' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents_edit', | ||
'icon' => 'edit2.gif', | ||
'script' => 'wizard_edit.php', | ||
'popup_onlyOpenIfSelected' => 1, | ||
'JSopenParams' => 'height=600,width=800,status=0,menubar=0,scrollbars=1', | ||
), | ||
), | ||
) | ||
); | ||
} else { | ||
$temporaryColumns['tx_jfmulticontent_contents'] = array( | ||
'exclude' => 1, | ||
'displayCond' => 'FIELD:tx_jfmulticontent_view:IN:,content', | ||
'label' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents', | ||
'config' => array ( | ||
'type' => 'group', | ||
'internal_type' => 'db', | ||
'allowed' => 'tt_content', | ||
'size' => 12, | ||
'minitems' => 0, | ||
'maxitems' => 1000, | ||
'wizards' => array( | ||
'_PADDING' => 2, | ||
'_VERTICAL' => 1, | ||
'add' => array( | ||
'type' => 'script', | ||
'title' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents_add', | ||
'icon' => 'add.gif', | ||
'script' => 'wizard_add.php', | ||
'params' => array( | ||
'table' => 'tt_content', | ||
'pid' => '###STORAGE_PID###', | ||
'setValue' => 'prepend' | ||
), | ||
), | ||
'list' => array( | ||
'type' => 'script', | ||
'title' => 'List', | ||
'icon' => 'list.gif', | ||
'script' => 'wizard_list.php', | ||
'params' => array( | ||
'table' => 'tt_content', | ||
'pid' => '###STORAGE_PID###', | ||
), | ||
), | ||
'edit' => array( | ||
'type' => 'popup', | ||
'title' => 'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.tx_jfmulticontent.contents_edit', | ||
'icon' => 'edit2.gif', | ||
'script' => 'wizard_edit.php', | ||
'popup_onlyOpenIfSelected' => 1, | ||
'JSopenParams' => 'height=600,width=800,status=0,menubar=0,scrollbars=1', | ||
), | ||
), | ||
) | ||
); | ||
} | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns($table, $temporaryColumns); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($listType, 'FILE:EXT:' . JFMULTICONTENT_EXT . '/flexform_ds.xml'); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( | ||
array( | ||
'LLL:EXT:' . JFMULTICONTENT_EXT . '/locallang_db.xml:tt_content.list_type_pi1', | ||
$listType, | ||
'EXT:' . JFMULTICONTENT_EXT . '/ext_icon.gif' | ||
), | ||
'list_type', | ||
JFMULTICONTENT_EXT | ||
); | ||
|
||
|
||
|
0
static/constants.txt → ...tion/TypoScript/PluginSetup/constants.txt
100644 → 100755
File renamed without changes.
0
static/setup.txt → ...guration/TypoScript/PluginSetup/setup.txt
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# TYPO3 extension jfmulticontent | ||
|
||
I have started to develop the existing jfmulticontent extension for the TYPO3 version 8.7. If persons are interested, then I will continue the work for TYPO3 9 and future versions. | ||
Any contributions are welcome. Just create an issue or write a pull request. | ||
|
||
The extension t3jquery seems not to exist any more. Its support will therefore be dropped soon. | ||
|
||
|
||
|
||
Any contributions are welcome. Just create an issue or write a pull request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.