aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Settings/Display.php11
-rw-r--r--view/theme/redbasic/php/config.php2
-rwxr-xr-xview/tpl/settings_display.tpl1
3 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index dbc383135..d35c54a90 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -30,7 +30,8 @@ class Display {
$channel_list_mode = ((x($_POST,'channel_list_mode')) ? intval($_POST['channel_list_mode']) : 0);
$network_list_mode = ((x($_POST,'network_list_mode')) ? intval($_POST['network_list_mode']) : 0);
$manual_update = ((array_key_exists('manual_update',$_POST)) ? intval($_POST['manual_update']) : 0);
- $start_menu = ((x($_POST,'start_menu')) ? intval($_POST['start_menu']) : 0);
+ $start_menu = ((x($_POST,'start_menu')) ? intval($_POST['start_menu']) : 0);
+ $advanced_theming = ((x($_POST,'advanced_theming')) ? intval($_POST['advanced_theming']) : 0);
$channel_divmore_height = ((x($_POST,'channel_divmore_height')) ? intval($_POST['channel_divmore_height']) : 400);
if($channel_divmore_height < 50)
@@ -62,6 +63,7 @@ class Display {
set_pconfig(local_channel(),'system','manual_conversation_update', $manual_update);
set_pconfig(local_channel(),'system','channel_menu', $channel_menu);
set_pconfig(local_channel(),'system','start_menu', $start_menu);
+ set_pconfig(local_channel(),'system','advanced_theming', $advanced_theming);
$newschema = '';
if($theme){
@@ -179,6 +181,8 @@ class Display {
$title_tosource = get_pconfig(local_channel(),'system','title_tosource');
$title_tosource = (($title_tosource===false)? '0': $title_tosource); // default if not set: 0
+ $advanced_theming = get_pconfig(local_channel(),'system','advanced_theming', 0);
+
$theme_config = "";
if(($themeconfigfile = $this->get_theme_config_file($theme)) != null){
require_once($themeconfigfile);
@@ -216,12 +220,13 @@ class Display {
'$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, '', $yes_no),
'$layout_editor' => t('System Page Layout Editor - (advanced)'),
'$theme_config' => $theme_config,
- '$expert' => feature_enabled(local_channel(),'advanced_theming'),
+ '$expert' => $advanced_theming,
'$channel_list_mode' => array('channel_list_mode', t('Use blog/list mode on channel page'), get_pconfig(local_channel(),'system','channel_list_mode'), t('(comments displayed separately)'), $yes_no),
'$network_list_mode' => array('network_list_mode', t('Use blog/list mode on grid page'), get_pconfig(local_channel(),'system','network_list_mode'), t('(comments displayed separately)'), $yes_no),
'$channel_divmore_height' => array('channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','channel_divmore_height')) ? get_pconfig(local_channel(),'system','channel_divmore_height') : 400), t('click to expand content exceeding this height')),
'$network_divmore_height' => array('network_divmore_height', t('Grid page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','network_divmore_height')) ? get_pconfig(local_channel(),'system','network_divmore_height') : 400) , t('click to expand content exceeding this height')),
- '$start_menu' => ['start_menu', t('New Member Links'), $start_menu, t('Display new member quick links menu'), $yes_no]
+ '$start_menu' => ['start_menu', t('New Member Links'), $start_menu, t('Display new member quick links menu'), $yes_no],
+ '$advanced_theming' => ['advanced_theming', t('Advanced Theme and Layout Settings'), $advanced_theming, t('Allows fine tuning of themes and page layouts'), $yes_no]
));
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index f98182739..ae926d07b 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -85,7 +85,7 @@ class RedbasicConfig {
function form($arr) {
- if(feature_enabled(local_channel(),'advanced_theming'))
+ if(get_pconfig(local_channel(), 'system', 'advanced_theming'))
$expert = 1;
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index 1500ea0d3..ee0e137b5 100755
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -69,6 +69,7 @@
{{include file="field_checkbox.tpl" field=$preload_images}}
{{include file="field_checkbox.tpl" field=$manual_update}}
{{include file="field_checkbox.tpl" field=$start_menu}}
+ {{include file="field_checkbox.tpl" field=$advanced_theming}}
{{if $expert}}
<div class="form-group">
<a class="btn btn-outline-secondary "href="pdledit">{{$layout_editor}}</a>