From 969f1c1f8bd266e08e382d4d1808bd079b016df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darko=20Sele=C5=A1i?= Date: Thu, 16 Jul 2020 17:33:58 +0200 Subject: [PATCH 1/2] Update tl_page.php Added support for new "rootfallback" palette, which is in use since C 4.9.0 --- dca/tl_page.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dca/tl_page.php b/dca/tl_page.php index af5e7e8..5aa1cc7 100644 --- a/dca/tl_page.php +++ b/dca/tl_page.php @@ -24,6 +24,12 @@ , $GLOBALS['TL_DCA']['tl_page']['palettes']['root'] ); +$GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] = str_replace( + '{dns_legend' +, $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{dns_legend' +, $GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] +); + $GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] = str_replace( '{protected_legend' , $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{protected_legend' From f2a6331c9d7b18731fac02c678a9f7bf0568a7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darko=20Sele=C5=A1i?= Date: Thu, 16 Jul 2020 17:45:25 +0200 Subject: [PATCH 2/2] Update tl_page.php Added version compare --- dca/tl_page.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dca/tl_page.php b/dca/tl_page.php index 5aa1cc7..72e48a3 100644 --- a/dca/tl_page.php +++ b/dca/tl_page.php @@ -23,13 +23,14 @@ , $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{dns_legend' , $GLOBALS['TL_DCA']['tl_page']['palettes']['root'] ); - -$GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] = str_replace( - '{dns_legend' -, $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{dns_legend' -, $GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] -); - +if (version_compare(VERSION, '4.9', '>=')) +{ + $GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] = str_replace( + '{dns_legend' + , $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{dns_legend' + , $GLOBALS['TL_DCA']['tl_page']['palettes']['rootfallback'] + ); +} $GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] = str_replace( '{protected_legend' , $GLOBALS['TL_DCA']['opengraph_fields']['palettes']['default'].'{protected_legend'