From e2d268181fb73d60b441d175622f72eac78ce9a8 Mon Sep 17 00:00:00 2001 From: Florin-Ciprian Bodin Date: Tue, 31 Oct 2023 21:45:52 +0200 Subject: [PATCH] Update Template.php Assigned information for footer. --- classes/Template.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/classes/Template.php b/classes/Template.php index dc267d3..b25a49e 100644 --- a/classes/Template.php +++ b/classes/Template.php @@ -1,9 +1,8 @@ __get(strtolower($m[1])); + return $words->__get(strtolower($m[1])); } /** @@ -68,7 +67,7 @@ class Template private static function callback_include($m) { $temp = new Template($m[1]); - return $temp -> __toString(); + return $temp->__toString(); } /** @@ -78,7 +77,7 @@ class Template private static function callback_config($m) { global $config; - return $config -> __get(strtolower($m[1])); + return $config->__get(strtolower($m[1])); } /** @@ -97,8 +96,8 @@ class Template */ public function __construct($filename) { - global $config, $dir, $subdir; - $full_filename = $config -> __get('template') . $filename; + global $config, $dir, $subdir, $words, $mobile_device_detect; + $full_filename = $config ->__get('template') . $filename; if (!@is_file($full_filename)) { throw new ExceptionFatal('Template file ' . Url::html_output($full_filename) . ' cannot be found.'); @@ -119,7 +118,12 @@ class Template '{info:dir}' => (isset($dir) ? Url::html_output($dir) : ''), '{info:subdir}' => (isset($subdir) ? Url::html_output($subdir) : ''), '{info:version}' => VERSION, - '{info:page_time}' => round((microtime(true) - START_TIME) * 1000, 1)); + '{info:page_time}' => round((microtime(true) - START_TIME) * 1000, 1), + '{info:statinfo}' => $mobile_device_detect->detect()->getInfo(), + '{info:message}' => $words->__get('cookie consent msg'), + '{info:dismiss}' => $words->__get('cookie consent OK'), + '{info:link}' => $words->__get('cookie consent info'), + '{info:href}' => $words->__get('privacy')); $contents = preg_replace_callback('/\{\s*words?\s*:\s*(.+)\s*\}/Ui', array('self', 'callback_words'), strtr($contents, $tr));