initial commit
This commit is contained in:
155
Configuration/TCA/Overrides/100_pages.php
Normal file
155
Configuration/TCA/Overrides/100_pages.php
Normal file
@ -0,0 +1,155 @@
|
||||
<?php //
|
||||
|
||||
/*
|
||||
* This file is part of the package t3g/blog.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (!defined('TYPO3')) {
|
||||
die('Access denied.');
|
||||
}
|
||||
|
||||
$ll = 'LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:';
|
||||
//
|
||||
//// Add folder configuration
|
||||
//$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
|
||||
// 0 => $ll . 'blog-folder',
|
||||
// 1 => 'blog',
|
||||
// 2 => 'record-folder-contains-blog',
|
||||
//];
|
||||
//$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-blog'] = 'record-folder-contains-blog';
|
||||
//
|
||||
//// Add new page types as possible select item:
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-post',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'record-blog-post',
|
||||
// ],
|
||||
// '1',
|
||||
// 'after'
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE,
|
||||
// 'record-blog-page',
|
||||
// ],
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'after'
|
||||
//);
|
||||
//
|
||||
//// Add icon for new page types:
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE . '-root' => 'record-blog-page-root',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => 'record-blog-post',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//
|
||||
// Register fields
|
||||
$GLOBALS['TCA']['pages']['columns'] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['pages']['columns'],
|
||||
[
|
||||
'rel_map_entries' => [
|
||||
'exclude' => true,
|
||||
'label' => '' . $ll . 'pages.rel_coordinate',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gmaps_domain_model_mapentry',
|
||||
'foreign_table_where' => ' AND tx_a2gmaps_domain_model_mapentry.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'foreign_field' => 'rel_travel_post',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
// 'foreign_sortby' => 'sorting',
|
||||
'minitems' => 0,
|
||||
'maxitems' => 10,
|
||||
'appearance' => [
|
||||
'collapseAll' => 1,
|
||||
'expandSingle' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
'authors' => [
|
||||
'label' => $ll . 'pages.authors',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'multiple' => 0,
|
||||
'foreign_table' => 'tx_blog_domain_model_author',
|
||||
'foreign_table_where' => 'AND tx_blog_domain_model_author.sys_language_uid IN (0,-1) ORDER BY tx_blog_domain_model_author.name ASC',
|
||||
'MM' => 'tx_blog_post_author_mm',
|
||||
'minitems' => 0,
|
||||
'maxitems' => 99999,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
|
||||
'tags' => [
|
||||
'label' => $ll . 'pages.tags',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'size' => 10,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 9999,
|
||||
'autoSizeMax' => 10,
|
||||
'multiple' => 0,
|
||||
'foreign_table' => 'tx_blog_domain_model_tag',
|
||||
'foreign_table_where' => 'AND tx_blog_domain_model_tag.sys_language_uid IN (0,-1) ORDER BY tx_blog_domain_model_tag.title ASC',
|
||||
'MM' => 'tx_blog_tag_pages_mm',
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
]
|
||||
]
|
||||
);
|
||||
//
|
||||
///** @noinspection UnsupportedStringOffsetOperationsInspection */
|
||||
//$GLOBALS['TCA']['pages']['types'][\T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST]['columnsOverrides'] = [
|
||||
// 'categories' => [
|
||||
// 'config' => [
|
||||
// 'foreign_table_where' => 'AND sys_category.sys_language_uid IN (0,-1) AND sys_category.pid = ###PAGE_TSCONFIG_ID###',
|
||||
// ]
|
||||
// ]
|
||||
//];
|
||||
//
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('pages', 'rel_coordinate', 'rel_map_entries');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
'pages',
|
||||
'--div--;' . $ll . 'pages.tabs.travel_blog,
|
||||
--palette--;' . $ll . 'pages.palettes.travel_blog; rel_coordinate'
|
||||
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST
|
||||
);
|
21
Configuration/TCA/Overrides/101_sys_template.php
Normal file
21
Configuration/TCA/Overrides/101_sys_template.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die();
|
||||
|
||||
/***************
|
||||
* TypoScript: Full Package
|
||||
* This includes the full setup including all configurations
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'a2g_travel_blog',
|
||||
'Configuration/TypoScript',
|
||||
'Altogether Travel Blog: Full Package'
|
||||
);
|
||||
|
||||
/***************
|
||||
* TypoScript: Base Package
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'a2g_travel_blog',
|
||||
'Configuration/TypoScript/Base',
|
||||
'Altogether Travel Blog: Base Package'
|
||||
);
|
41
Configuration/TCA/Overrides/102_tt_content.php
Normal file
41
Configuration/TCA/Overrides/102_tt_content.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die();
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gTravelBlog',
|
||||
'timeline',
|
||||
'Travel Blog Timeline'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gTravelBlog',
|
||||
'map',
|
||||
'Travel Blog Map'
|
||||
);
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gTravelBlog',
|
||||
'mapConfig',
|
||||
'Travel Blog Map Config'
|
||||
);
|
||||
|
||||
|
||||
|
||||
$pluginSignatures = [
|
||||
'a2gtravelblog_timeline' => 'flexform_timeline',
|
||||
'a2gtravelblog_map' => 'flexform_map'
|
||||
];
|
||||
|
||||
foreach ($pluginSignatures as $pluginSignature => $flexform) {
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:a2g_travel_blog/Configuration/FlexForms/' . $flexform . '.xml');
|
||||
|
||||
// \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
// // 'list_type' does not apply here
|
||||
// '*',
|
||||
// // Flexform configuration schema file
|
||||
// 'FILE:EXT:example/Configuration/FlexForms/Registration.xml',
|
||||
// // ctype
|
||||
// $pluginSignature
|
||||
//);
|
||||
|
||||
}
|
813
Configuration/TCA/Overrides/103_sys_category.php
Normal file
813
Configuration/TCA/Overrides/103_sys_category.php
Normal file
@ -0,0 +1,813 @@
|
||||
<?php
|
||||
|
||||
//
|
||||
|
||||
/*
|
||||
* This file is part of the package t3g/blog.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (!defined('TYPO3')) {
|
||||
die('Access denied.');
|
||||
}
|
||||
|
||||
$ll = 'LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:';
|
||||
//
|
||||
//// Add folder configuration
|
||||
//$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
|
||||
// 0 => $ll . 'blog-folder',
|
||||
// 1 => 'blog',
|
||||
// 2 => 'record-folder-contains-blog',
|
||||
//];
|
||||
//$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-blog'] = 'record-folder-contains-blog';
|
||||
//
|
||||
//// Add new page types as possible select item:
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-post',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'record-blog-post',
|
||||
// ],
|
||||
// '1',
|
||||
// 'after'
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE,
|
||||
// 'record-blog-page',
|
||||
// ],
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'after'
|
||||
//);
|
||||
//
|
||||
//// Add icon for new page types:
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE . '-root' => 'record-blog-page-root',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => 'record-blog-post',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//
|
||||
// Register fields
|
||||
$GLOBALS['TCA']['sys_category']['columns'] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['sys_category']['columns'],
|
||||
[
|
||||
'iso_a2_country_code' => [
|
||||
'exclude' => true,
|
||||
'label' => '' . $ll . 'category.iso_a2_country_code',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
[
|
||||
"no map relation",
|
||||
""
|
||||
],
|
||||
[
|
||||
"Afghanistan",
|
||||
"AF"
|
||||
],
|
||||
[
|
||||
"Angola",
|
||||
"AO"
|
||||
],
|
||||
[
|
||||
"Albania",
|
||||
"AL"
|
||||
],
|
||||
[
|
||||
"United Arab Emirates",
|
||||
"AE"
|
||||
],
|
||||
[
|
||||
"Argentina",
|
||||
"AR"
|
||||
],
|
||||
[
|
||||
"Armenia",
|
||||
"AM"
|
||||
],
|
||||
[
|
||||
"Antarctica",
|
||||
"AQ"
|
||||
],
|
||||
[
|
||||
"Fr. S. Antarctic Lands",
|
||||
"TF"
|
||||
],
|
||||
[
|
||||
"Australia",
|
||||
"AU"
|
||||
],
|
||||
[
|
||||
"Austria",
|
||||
"AT"
|
||||
],
|
||||
[
|
||||
"Azerbaijan",
|
||||
"AZ"
|
||||
],
|
||||
[
|
||||
"Burundi",
|
||||
"BI"
|
||||
],
|
||||
[
|
||||
"Belgium",
|
||||
"BE"
|
||||
],
|
||||
[
|
||||
"Benin",
|
||||
"BJ"
|
||||
],
|
||||
[
|
||||
"Burkina Faso",
|
||||
"BF"
|
||||
],
|
||||
[
|
||||
"Bangladesh",
|
||||
"BD"
|
||||
],
|
||||
[
|
||||
"Bulgaria",
|
||||
"BG"
|
||||
],
|
||||
[
|
||||
"Bahamas",
|
||||
"BS"
|
||||
],
|
||||
[
|
||||
"Bosnia and Herz.",
|
||||
"BA"
|
||||
],
|
||||
[
|
||||
"Belarus",
|
||||
"BY"
|
||||
],
|
||||
[
|
||||
"Belize",
|
||||
"BZ"
|
||||
],
|
||||
[
|
||||
"Bolivia",
|
||||
"BO"
|
||||
],
|
||||
[
|
||||
"Brazil",
|
||||
"BR"
|
||||
],
|
||||
[
|
||||
"Brunei",
|
||||
"BN"
|
||||
],
|
||||
[
|
||||
"Bhutan",
|
||||
"BT"
|
||||
],
|
||||
[
|
||||
"Botswana",
|
||||
"BW"
|
||||
],
|
||||
[
|
||||
"Central African Rep.",
|
||||
"CF"
|
||||
],
|
||||
[
|
||||
"Canada",
|
||||
"CA"
|
||||
],
|
||||
[
|
||||
"Switzerland",
|
||||
"CH"
|
||||
],
|
||||
[
|
||||
"Chile",
|
||||
"CL"
|
||||
],
|
||||
[
|
||||
"China",
|
||||
"CN"
|
||||
],
|
||||
[
|
||||
"Cte d'Ivoire",
|
||||
"CI"
|
||||
],
|
||||
[
|
||||
"Cameroon",
|
||||
"CM"
|
||||
],
|
||||
[
|
||||
"Dem. Rep. Congo",
|
||||
"CD"
|
||||
],
|
||||
[
|
||||
"Congo",
|
||||
"CG"
|
||||
],
|
||||
[
|
||||
"Colombia",
|
||||
"CO"
|
||||
],
|
||||
[
|
||||
"Costa Rica",
|
||||
"CR"
|
||||
],
|
||||
[
|
||||
"Cuba",
|
||||
"CU"
|
||||
],
|
||||
[
|
||||
"Cyprus",
|
||||
"CY"
|
||||
],
|
||||
[
|
||||
"Czech Rep.",
|
||||
"CZ"
|
||||
],
|
||||
[
|
||||
"Germany",
|
||||
"DE"
|
||||
],
|
||||
[
|
||||
"Djibouti",
|
||||
"DJ"
|
||||
],
|
||||
[
|
||||
"Denmark",
|
||||
"DK"
|
||||
],
|
||||
[
|
||||
"Dominican Rep.",
|
||||
"DO"
|
||||
],
|
||||
[
|
||||
"Algeria",
|
||||
"DZ"
|
||||
],
|
||||
[
|
||||
"Ecuador",
|
||||
"EC"
|
||||
],
|
||||
[
|
||||
"Egypt",
|
||||
"EG"
|
||||
],
|
||||
[
|
||||
"Eritrea",
|
||||
"ER"
|
||||
],
|
||||
[
|
||||
"Spain",
|
||||
"ES"
|
||||
],
|
||||
[
|
||||
"Estonia",
|
||||
"EE"
|
||||
],
|
||||
[
|
||||
"Ethiopia",
|
||||
"ET"
|
||||
],
|
||||
[
|
||||
"Finland",
|
||||
"FI"
|
||||
],
|
||||
[
|
||||
"Fiji",
|
||||
"FJ"
|
||||
],
|
||||
[
|
||||
"Falkland Is.",
|
||||
"FK"
|
||||
],
|
||||
[
|
||||
"France",
|
||||
"FR"
|
||||
],
|
||||
[
|
||||
"Gabon",
|
||||
"GA"
|
||||
],
|
||||
[
|
||||
"United Kingdom",
|
||||
"GB"
|
||||
],
|
||||
[
|
||||
"Georgia",
|
||||
"GE"
|
||||
],
|
||||
[
|
||||
"Ghana",
|
||||
"GH"
|
||||
],
|
||||
[
|
||||
"Guinea",
|
||||
"GN"
|
||||
],
|
||||
[
|
||||
"Gambia",
|
||||
"GM"
|
||||
],
|
||||
[
|
||||
"Guinea-Bissau",
|
||||
"GW"
|
||||
],
|
||||
[
|
||||
"Eq. Guinea",
|
||||
"GQ"
|
||||
],
|
||||
[
|
||||
"Greece",
|
||||
"GR"
|
||||
],
|
||||
[
|
||||
"Greenland",
|
||||
"GL"
|
||||
],
|
||||
[
|
||||
"Guatemala",
|
||||
"GT"
|
||||
],
|
||||
[
|
||||
"Guyana",
|
||||
"GY"
|
||||
],
|
||||
[
|
||||
"Honduras",
|
||||
"HN"
|
||||
],
|
||||
[
|
||||
"Croatia",
|
||||
"HR"
|
||||
],
|
||||
[
|
||||
"Haiti",
|
||||
"HT"
|
||||
],
|
||||
[
|
||||
"Hungary",
|
||||
"HU"
|
||||
],
|
||||
[
|
||||
"Indonesia",
|
||||
"ID"
|
||||
],
|
||||
[
|
||||
"India",
|
||||
"IN"
|
||||
],
|
||||
[
|
||||
"Ireland",
|
||||
"IE"
|
||||
],
|
||||
[
|
||||
"Iran",
|
||||
"IR"
|
||||
],
|
||||
[
|
||||
"Iraq",
|
||||
"IQ"
|
||||
],
|
||||
[
|
||||
"Iceland",
|
||||
"IS"
|
||||
],
|
||||
[
|
||||
"Israel",
|
||||
"IL"
|
||||
],
|
||||
[
|
||||
"Italy",
|
||||
"IT"
|
||||
],
|
||||
[
|
||||
"Jamaica",
|
||||
"JM"
|
||||
],
|
||||
[
|
||||
"Jordan",
|
||||
"JO"
|
||||
],
|
||||
[
|
||||
"Japan",
|
||||
"JP"
|
||||
],
|
||||
[
|
||||
"Kazakhstan",
|
||||
"KZ"
|
||||
],
|
||||
[
|
||||
"Kenya",
|
||||
"KE"
|
||||
],
|
||||
[
|
||||
"Kyrgyzstan",
|
||||
"KG"
|
||||
],
|
||||
[
|
||||
"Cambodia",
|
||||
"KH"
|
||||
],
|
||||
[
|
||||
"Korea",
|
||||
"KR"
|
||||
],
|
||||
[
|
||||
"Kuwait",
|
||||
"KW"
|
||||
],
|
||||
[
|
||||
"Lao PDR",
|
||||
"LA"
|
||||
],
|
||||
[
|
||||
"Lebanon",
|
||||
"LB"
|
||||
],
|
||||
[
|
||||
"Liberia",
|
||||
"LR"
|
||||
],
|
||||
[
|
||||
"Libya",
|
||||
"LY"
|
||||
],
|
||||
[
|
||||
"Sri Lanka",
|
||||
"LK"
|
||||
],
|
||||
[
|
||||
"Lesotho",
|
||||
"LS"
|
||||
],
|
||||
[
|
||||
"Lithuania",
|
||||
"LT"
|
||||
],
|
||||
[
|
||||
"Luxembourg",
|
||||
"LU"
|
||||
],
|
||||
[
|
||||
"Latvia",
|
||||
"LV"
|
||||
],
|
||||
[
|
||||
"Morocco",
|
||||
"MA"
|
||||
],
|
||||
[
|
||||
"Moldova",
|
||||
"MD"
|
||||
],
|
||||
[
|
||||
"Madagascar",
|
||||
"MG"
|
||||
],
|
||||
[
|
||||
"Mexico",
|
||||
"MX"
|
||||
],
|
||||
[
|
||||
"Macedonia",
|
||||
"MK"
|
||||
],
|
||||
[
|
||||
"Mali",
|
||||
"ML"
|
||||
],
|
||||
[
|
||||
"Myanmar",
|
||||
"MM"
|
||||
],
|
||||
[
|
||||
"Montenegro",
|
||||
"ME"
|
||||
],
|
||||
[
|
||||
"Mongolia",
|
||||
"MN"
|
||||
],
|
||||
[
|
||||
"Mozambique",
|
||||
"MZ"
|
||||
],
|
||||
[
|
||||
"Mauritania",
|
||||
"MR"
|
||||
],
|
||||
[
|
||||
"Malawi",
|
||||
"MW"
|
||||
],
|
||||
[
|
||||
"Malaysia",
|
||||
"MY"
|
||||
],
|
||||
[
|
||||
"Namibia",
|
||||
"NA"
|
||||
],
|
||||
[
|
||||
"New Caledonia",
|
||||
"NC"
|
||||
],
|
||||
[
|
||||
"Niger",
|
||||
"NE"
|
||||
],
|
||||
[
|
||||
"Nigeria",
|
||||
"NG"
|
||||
],
|
||||
[
|
||||
"Nicaragua",
|
||||
"NI"
|
||||
],
|
||||
[
|
||||
"Netherlands",
|
||||
"NL"
|
||||
],
|
||||
[
|
||||
"Norway",
|
||||
"NO"
|
||||
],
|
||||
[
|
||||
"Nepal",
|
||||
"NP"
|
||||
],
|
||||
[
|
||||
"New Zealand",
|
||||
"NZ"
|
||||
],
|
||||
[
|
||||
"Oman",
|
||||
"OM"
|
||||
],
|
||||
[
|
||||
"Pakistan",
|
||||
"PK"
|
||||
],
|
||||
[
|
||||
"Panama",
|
||||
"PA"
|
||||
],
|
||||
[
|
||||
"Peru",
|
||||
"PE"
|
||||
],
|
||||
[
|
||||
"Philippines",
|
||||
"PH"
|
||||
],
|
||||
[
|
||||
"Papua New Guinea",
|
||||
"PG"
|
||||
],
|
||||
[
|
||||
"Poland",
|
||||
"PL"
|
||||
],
|
||||
[
|
||||
"Puerto Rico",
|
||||
"PR"
|
||||
],
|
||||
[
|
||||
"Dem. Rep. Korea",
|
||||
"KP"
|
||||
],
|
||||
[
|
||||
"Portugal",
|
||||
"PT"
|
||||
],
|
||||
[
|
||||
"Paraguay",
|
||||
"PY"
|
||||
],
|
||||
[
|
||||
"Palestine",
|
||||
"PS"
|
||||
],
|
||||
[
|
||||
"Qatar",
|
||||
"QA"
|
||||
],
|
||||
[
|
||||
"Romania",
|
||||
"RO"
|
||||
],
|
||||
[
|
||||
"Russia",
|
||||
"RU"
|
||||
],
|
||||
[
|
||||
"Rwanda",
|
||||
"RW"
|
||||
],
|
||||
[
|
||||
"W. Sahara",
|
||||
"EH"
|
||||
],
|
||||
[
|
||||
"Saudi Arabia",
|
||||
"SA"
|
||||
],
|
||||
[
|
||||
"Sudan",
|
||||
"SD"
|
||||
],
|
||||
[
|
||||
"S. Sudan",
|
||||
"SS"
|
||||
],
|
||||
[
|
||||
"Senegal",
|
||||
"SN"
|
||||
],
|
||||
[
|
||||
"Solomon Is.",
|
||||
"SB"
|
||||
],
|
||||
[
|
||||
"Sierra Leone",
|
||||
"SL"
|
||||
],
|
||||
[
|
||||
"El Salvador",
|
||||
"SV"
|
||||
],
|
||||
[
|
||||
"Somalia",
|
||||
"SO"
|
||||
],
|
||||
[
|
||||
"Serbia",
|
||||
"RS"
|
||||
],
|
||||
[
|
||||
"Suriname",
|
||||
"SR"
|
||||
],
|
||||
[
|
||||
"Slovakia",
|
||||
"SK"
|
||||
],
|
||||
[
|
||||
"Slovenia",
|
||||
"SI"
|
||||
],
|
||||
[
|
||||
"Sweden",
|
||||
"SE"
|
||||
],
|
||||
[
|
||||
"Swaziland",
|
||||
"SZ"
|
||||
],
|
||||
[
|
||||
"Syria",
|
||||
"SY"
|
||||
],
|
||||
[
|
||||
"Chad",
|
||||
"TD"
|
||||
],
|
||||
[
|
||||
"Togo",
|
||||
"TG"
|
||||
],
|
||||
[
|
||||
"Thailand",
|
||||
"TH"
|
||||
],
|
||||
[
|
||||
"Tajikistan",
|
||||
"TJ"
|
||||
],
|
||||
[
|
||||
"Turkmenistan",
|
||||
"TM"
|
||||
],
|
||||
[
|
||||
"Timor-Leste",
|
||||
"TL"
|
||||
],
|
||||
[
|
||||
"Trinidad and Tobago",
|
||||
"TT"
|
||||
],
|
||||
[
|
||||
"Tunisia",
|
||||
"TN"
|
||||
],
|
||||
[
|
||||
"Turkey",
|
||||
"TR"
|
||||
],
|
||||
[
|
||||
"Taiwan",
|
||||
"TW"
|
||||
],
|
||||
[
|
||||
"Tanzania",
|
||||
"TZ"
|
||||
],
|
||||
[
|
||||
"Uganda",
|
||||
"UG"
|
||||
],
|
||||
[
|
||||
"Ukraine",
|
||||
"UA"
|
||||
],
|
||||
[
|
||||
"Uruguay",
|
||||
"UY"
|
||||
],
|
||||
[
|
||||
"United States",
|
||||
"US"
|
||||
],
|
||||
[
|
||||
"Uzbekistan",
|
||||
"UZ"
|
||||
],
|
||||
[
|
||||
"Venezuela",
|
||||
"VE"
|
||||
],
|
||||
[
|
||||
"Vietnam",
|
||||
"VN"
|
||||
],
|
||||
[
|
||||
"Vanuatu",
|
||||
"VU"
|
||||
],
|
||||
[
|
||||
"Yemen",
|
||||
"YE"
|
||||
],
|
||||
[
|
||||
"South Africa",
|
||||
"ZA"
|
||||
],
|
||||
[
|
||||
"Zambia",
|
||||
"ZM"
|
||||
],
|
||||
[
|
||||
"Zimbabwe",
|
||||
"ZW"
|
||||
]
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
);
|
||||
//
|
||||
///** @noinspection UnsupportedStringOffsetOperationsInspection */
|
||||
//$GLOBALS['TCA']['pages']['types'][\T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST]['columnsOverrides'] = [
|
||||
// 'categories' => [
|
||||
// 'config' => [
|
||||
// 'foreign_table_where' => 'AND sys_category.sys_language_uid IN (0,-1) AND sys_category.pid = ###PAGE_TSCONFIG_ID###',
|
||||
// ]
|
||||
// ]
|
||||
//];
|
||||
//
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('sys_category', 'travel_blog_fields', 'iso_a2_country_code');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
'sys_category',
|
||||
'--div--;' . $ll . 'pages.tabs.travel_blog,
|
||||
--palette--;' . $ll . 'pages.palettes.travel_blog; travel_blog_fields'
|
||||
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST
|
||||
);
|
@ -0,0 +1,99 @@
|
||||
<?php //
|
||||
|
||||
/*
|
||||
* This file is part of the package t3g/blog.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (!defined('TYPO3')) {
|
||||
die('Access denied.');
|
||||
}
|
||||
|
||||
$ll = 'LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:';
|
||||
//
|
||||
//// Add folder configuration
|
||||
//$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
|
||||
// 0 => $ll . 'blog-folder',
|
||||
// 1 => 'blog',
|
||||
// 2 => 'record-folder-contains-blog',
|
||||
//];
|
||||
//$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-blog'] = 'record-folder-contains-blog';
|
||||
//
|
||||
//// Add new page types as possible select item:
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-post',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'record-blog-post',
|
||||
// ],
|
||||
// '1',
|
||||
// 'after'
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
// 'pages',
|
||||
// 'doktype',
|
||||
// [
|
||||
// 'LLL:EXT:blog/Resources/Private/Language/locallang_tca.xlf:pages.doktype.blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE,
|
||||
// 'record-blog-page',
|
||||
// ],
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST,
|
||||
// 'after'
|
||||
//);
|
||||
//
|
||||
//// Add icon for new page types:
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE . '-root' => 'record-blog-page-root',
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => 'record-blog-post',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_POST => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
// $GLOBALS['TCA']['pages'],
|
||||
// [
|
||||
// 'ctrl' => [
|
||||
// 'typeicon_classes' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => 'record-blog-page',
|
||||
// ],
|
||||
// ],
|
||||
// 'types' => [
|
||||
// (string) \T3G\AgencyPack\Blog\Constants::DOKTYPE_BLOG_PAGE => $GLOBALS['TCA']['pages']['types'][\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_DEFAULT],
|
||||
// ],
|
||||
// ]
|
||||
//);
|
||||
//
|
||||
// Register fields
|
||||
$GLOBALS['TCA']['tx_blog_domain_model_author']['columns'] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['tx_blog_domain_model_author']['columns'],
|
||||
[
|
||||
'rel_map_marker' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:relMarker',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingleBox',
|
||||
'foreign_table' => 'tx_a2gmaps_domain_model_marker',
|
||||
'foreign_table_where' => ' AND tx_a2gmaps_domain_model_marker.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) '
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tx_blog_domain_model_author', 'travelblog_map_icon', 'rel_map_marker');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
'tx_blog_domain_model_author',
|
||||
'--div--;' . $ll . 'pages.tabs.travel_blog,
|
||||
--palette--;' . $ll . 'pages.palettes.travel_blog; travelblog_map_icon'
|
||||
);
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the package t3g/blog.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (!defined('TYPO3')) {
|
||||
die('Access denied.');
|
||||
}
|
||||
|
||||
$ll = 'LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:';
|
||||
|
||||
$GLOBALS['TCA']['tx_a2gmaps_domain_model_mapentry']['columns'] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['tx_a2gmaps_domain_model_mapentry']['columns'],
|
||||
[
|
||||
|
||||
'rel_travel_post' => [
|
||||
'label' => 'rel_travel_post',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType'=> 'selectSingle',
|
||||
'foreign_table' => 'pages',
|
||||
'foreign_table_where' => ' AND pages.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
],
|
||||
]
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tx_a2gmaps_domain_model_mapentry', 'travelblog_rel_post', 'travelblog_rel_post');
|
||||
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
// 'tx_blog_domain_model_author',
|
||||
// '--div--;' . $ll . 'pages.tabs.travel_blog,
|
||||
// --palette--;' . $ll . 'pages.palettes.travel_blog; travelblog_map_icon'
|
||||
//);
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the package t3g/blog.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (!defined('TYPO3')) {
|
||||
die('Access denied.');
|
||||
}
|
||||
|
||||
$ll = 'LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:';
|
||||
|
||||
$GLOBALS['TCA']['tx_a2gmaps_domain_model_marker']['columns'] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['tx_a2gmaps_domain_model_marker']['columns'],
|
||||
[
|
||||
'rel_travel_author' => [
|
||||
'label' => 'rel_travel_author',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tx_a2gmaps_domain_model_marker', 'travel_author', 'rel_travel_author');
|
Reference in New Issue
Block a user