Default Settings: Array type modifications, change Theme background color to type array instead of text, add order field to v_default_settings table.
This commit is contained in:
@@ -77,6 +77,10 @@
|
|||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the value.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the value.";
|
||||||
$z++;
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_order";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_enabled";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_enabled";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
@@ -84,4 +88,5 @@
|
|||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_description";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_description";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -44,16 +44,18 @@ if ($domains_processed == 1) {
|
|||||||
$array[$x]['default_setting_description'] = 'Specify a folder path or file path/url to enable background image(s) within a selected compatible template.';
|
$array[$x]['default_setting_description'] = 'Specify a folder path or file path/url to enable background image(s) within a selected compatible template.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'theme';
|
$array[$x]['default_setting_category'] = 'theme';
|
||||||
$array[$x]['default_setting_subcategory'] = 'background_color_1';
|
$array[$x]['default_setting_subcategory'] = 'background_color';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '#ffffff';
|
$array[$x]['default_setting_value'] = '#ffffff';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
|
$array[$x]['default_setting_order'] = '0';
|
||||||
$array[$x]['default_setting_description'] = 'Enter a background (HTML compatible) color.';
|
$array[$x]['default_setting_description'] = 'Enter a background (HTML compatible) color.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'theme';
|
$array[$x]['default_setting_category'] = 'theme';
|
||||||
$array[$x]['default_setting_subcategory'] = 'background_color_2';
|
$array[$x]['default_setting_subcategory'] = 'background_color';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '#f0f2f6';
|
$array[$x]['default_setting_value'] = '#f0f2f6';
|
||||||
|
$array[$x]['default_setting_order'] = '1';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Enter a secondary background (HTML compatible) color, for a gradient effect.';
|
$array[$x]['default_setting_description'] = 'Enter a secondary background (HTML compatible) color, for a gradient effect.';
|
||||||
$x++;
|
$x++;
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ DIV#page {
|
|||||||
<?php
|
<?php
|
||||||
if (
|
if (
|
||||||
isset($_SESSION['theme']['background_image']['text']) ||
|
isset($_SESSION['theme']['background_image']['text']) ||
|
||||||
isset($_SESSION['theme']['background_color_1']['text']) ||
|
$_SESSION['theme']['background_color'][0] != '' ||
|
||||||
isset($_SESSION['theme']['background_color_2']['text'])
|
$_SESSION['theme']['background_color'][1] != ''
|
||||||
) { ?>
|
) { ?>
|
||||||
/* Set the position and dimensions of the background image. */
|
/* Set the position and dimensions of the background image. */
|
||||||
DIV#page-background {
|
DIV#page-background {
|
||||||
@@ -77,18 +77,18 @@ if (
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (
|
if (
|
||||||
isset($_SESSION['theme']['background_color_1']['text']) &&
|
$_SESSION['theme']['background_color'][0] != '' &&
|
||||||
isset($_SESSION['theme']['background_color_2']['text'])
|
$_SESSION['theme']['background_color'][1] != ''
|
||||||
) {
|
) {
|
||||||
?>
|
?>
|
||||||
.page-background-gradient {
|
.page-background-gradient {
|
||||||
background-color: <?php echo $_SESSION['theme']['background_color_1']['text']?>;
|
background-color: <?php echo $_SESSION['theme']['background_color'][0]?>;
|
||||||
background-image: -ms-linear-gradient(top, <?php echo $_SESSION['theme']['background_color_1']['text']?> 0%, <?php echo $_SESSION['theme']['background_color_2']['text']?> 100%);
|
background-image: -ms-linear-gradient(top, <?php echo $_SESSION['theme']['background_color'][0]?> 0%, <?php echo $_SESSION['theme']['background_color'][1]?> 100%);
|
||||||
background-image: -moz-linear-gradient(top , <?php echo $_SESSION['theme']['background_color_1']['text']?> 0%, <?php echo $_SESSION['theme']['background_color_2']['text']?> 100%);
|
background-image: -moz-linear-gradient(top , <?php echo $_SESSION['theme']['background_color'][0]?> 0%, <?php echo $_SESSION['theme']['background_color'][1]?> 100%);
|
||||||
background-image: -o-linear-gradient(top , <?php echo $_SESSION['theme']['background_color_1']['text']?> 0%, <?php echo $_SESSION['theme']['background_color_2']['text']?> 100%);
|
background-image: -o-linear-gradient(top , <?php echo $_SESSION['theme']['background_color'][0]?> 0%, <?php echo $_SESSION['theme']['background_color'][1]?> 100%);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, <?php echo $_SESSION['theme']['background_color_1']['text']?>), color-stop(1, <?php echo $_SESSION['theme']['background_color_2']['text']?>));
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, <?php echo $_SESSION['theme']['background_color'][0]?>), color-stop(1, <?php echo $_SESSION['theme']['background_color'][1]?>));
|
||||||
background-image: -webkit-linear-gradient(top , <?php echo $_SESSION['theme']['background_color_1']['text']?> 0%, <?php echo $_SESSION['theme']['background_color_2']['text']?> 100%);
|
background-image: -webkit-linear-gradient(top , <?php echo $_SESSION['theme']['background_color'][0]?> 0%, <?php echo $_SESSION['theme']['background_color'][1]?> 100%);
|
||||||
background-image: linear-gradient(to bottom, <?php echo $_SESSION['theme']['background_color_1']['text']?> 0%, <?php echo $_SESSION['theme']['background_color_2']['text']?> 100%);
|
background-image: linear-gradient(to bottom, <?php echo $_SESSION['theme']['background_color'][0]?> 0%, <?php echo $_SESSION['theme']['background_color'][1]?> 100%);
|
||||||
}
|
}
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -517,8 +517,8 @@ legend {
|
|||||||
strlen($_SESSION["username"]) > 0 &&
|
strlen($_SESSION["username"]) > 0 &&
|
||||||
(
|
(
|
||||||
isset($_SESSION['theme']['background_image']['text']) ||
|
isset($_SESSION['theme']['background_image']['text']) ||
|
||||||
isset($_SESSION['theme']['background_color_1']['text']) ||
|
$_SESSION['theme']['background_color'][0] != '' ||
|
||||||
isset($_SESSION['theme']['background_color_2']['text'])
|
$_SESSION['theme']['background_color'][1] != ''
|
||||||
)) { ?>
|
)) { ?>
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
@@ -1076,24 +1076,24 @@ legend {
|
|||||||
|
|
||||||
// check for background color
|
// check for background color
|
||||||
else if (
|
else if (
|
||||||
isset($_SESSION['theme']['background_color_1']['text']) ||
|
$_SESSION['theme']['background_color'][0] != '' ||
|
||||||
isset($_SESSION['theme']['background_color_2']['text'])
|
$_SESSION['theme']['background_color'][1] != ''
|
||||||
) { // background color 1 or 2 is enabled
|
) { // background color 1 or 2 is enabled
|
||||||
|
|
||||||
echo "bg1 = ".$_SESSION['theme']['background_color_1']['text']."<br><br>";
|
echo "bg1 = ".$_SESSION['theme']['background_color'][0]."<br><br>";
|
||||||
echo "bg2 = ".$_SESSION['theme']['background_color_2']['text']."<br><br>";
|
echo "bg2 = ".$_SESSION['theme']['background_color'][1]."<br><br>";
|
||||||
|
|
||||||
if ($_SESSION['theme']['background_color_1']['text'] != '' && $_SESSION['theme']['background_color_2']['text'] == '') { // use color 1
|
if ($_SESSION['theme']['background_color'][0] != '' && $_SESSION['theme']['background_color'][1] == '') { // use color 1
|
||||||
echo "<div id='page-background' style='background-color: ".$_SESSION['theme']['background_color_1']['text'].";'> </div>\n";
|
echo "<div id='page-background' style='background-color: ".$_SESSION['theme']['background_color'][0].";'> </div>\n";
|
||||||
}
|
}
|
||||||
else if ($_SESSION['theme']['background_color_1']['text'] == '' && $_SESSION['theme']['background_color_2']['text'] != '') { // use color 2
|
else if ($_SESSION['theme']['background_color'][0] == '' && $_SESSION['theme']['background_color'][1] != '') { // use color 2
|
||||||
echo "<div id='page-background' style='background-color: ".$_SESSION['theme']['background_color_2']['text'].";'> </div>\n";
|
echo "<div id='page-background' style='background-color: ".$_SESSION['theme']['background_color'][1].";'> </div>\n";
|
||||||
}
|
}
|
||||||
else if ($_SESSION['theme']['background_color_1']['text'] != '' && $_SESSION['theme']['background_color_2']['text'] != '') { // vertical gradient
|
else if ($_SESSION['theme']['background_color'][0] != '' && $_SESSION['theme']['background_color'][1] != '') { // vertical gradient
|
||||||
echo "<div id='page-background' class='page-background-gradient'> </div>\n";
|
echo "<div id='page-background' class='page-background-gradient'> </div>\n";
|
||||||
}
|
}
|
||||||
else { // default: white
|
else { // default: white
|
||||||
echo "<div id='page-background' style='background-color: #ffffff;'> </div>\n";
|
echo "<div id='page-background' style='background-color: #fff;'> </div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user