RomanL 8 лет назад
Родитель
Сommit
bc60876d4d

+ 1 - 1
install/sql/system.sql

@@ -340,7 +340,7 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 (@iCategoryId, 'template', '_adm_stg_cpt_option_template', '', 'select', 'a:3:{s:6:"module";s:6:"system";s:6:"method";s:13:"get_templates";s:5:"class";s:21:"TemplTemplateServices";}', 'Template', '_adm_stg_err_option_template', 1);
-
+(@iCategoryId, 'rgbcolorpallete', '_adm_stg_cpt_option_rgbcolorpallete', '', 'digit', '', '', '', 2);
 
 --
 -- CATEGORY: Cache

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1327,6 +1327,7 @@
 	<string name="_adm_stg_cpt_option_sys_template_cache_minify_js_enable"><![CDATA[Enable lessening for JS files (cache should be enabled)]]></string>
 	<string name="_adm_stg_cpt_option_sys_transcoder_queue_storage"><![CDATA[Remote video transcoding]]></string>
 	<string name="_adm_stg_cpt_option_template"><![CDATA[Default Template]]></string>
+	<string name="_adm_stg_cpt_option_rgbcolorpallete"><![CDATA[Value for theme-color metatag (ex. #4285f4)]]></string>
 	<string name="_adm_stg_err_option_template"><![CDATA[Template cannot be empty and must have a valid name.]]></string>
 	<string name="_adm_stg_cpt_option_use_like_operator"><![CDATA[Use operator LIKE for search (recommended for small content)]]></string>
 	<string name="_adm_stg_cpt_type_system"><![CDATA[System]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -1325,6 +1325,7 @@
 	<string name="_adm_stg_cpt_option_sys_template_cache_minify_js_enable"><![CDATA[Задействовать уменьшение для файлов JS (кэш должен быть задействован)]]></string>
 	<string name="_adm_stg_cpt_option_sys_transcoder_queue_storage"><![CDATA[Удалённая раскодировка видео]]></string>
 	<string name="_adm_stg_cpt_option_template"><![CDATA[Основная тема]]></string>
+	<string name="_adm_stg_cpt_option_rgbcolorpallete"><![CDATA[Значение метатага theme-color (например #4285f4)]]></string>
 	<string name="_adm_stg_err_option_template"><![CDATA[Тема не может быть пустой и должна иметь приемлемое название.]]></string>
 	<string name="_adm_stg_cpt_option_use_like_operator"><![CDATA[Использовать для поиска оператор LIKE (рекомендуется для небольшого содержимого)]]></string>
 	<string name="_adm_stg_cpt_type_system"><![CDATA[Система]]></string>

+ 6 - 0
template/scripts/BxBaseFunctions.php

@@ -531,6 +531,12 @@ class BxBaseFunctions extends BxDolFactory implements iBxDolSingleton
     {
         return BxDolLiveUpdates::getInstance()->init();
     }
+    
+    protected function getInjHeadMetaColor() 
+    {
+        if (getParam('rgbcolorpallete') != '')
+            return '<meta name="theme-color" content="' . getParam('rgbcolorpallete') . '">';
+    }
 
     protected function getInjHeaderPushNotifications() 
     {