Enhanced Theme: Added Default Settings to control footer colors and opacity.

Other minor code enhancements.
This commit is contained in:
Nate Jones 2014-08-17 04:33:57 +00:00
parent f9a760359a
commit ba8a1de67b
5 changed files with 38 additions and 30 deletions

View File

@ -113,12 +113,9 @@
$x++; $x++;
$orm = new orm; $orm = new orm;
$orm->name('default_settings'); $orm->name('default_settings');
$orm->save($array[0]); foreach ($array as $index => $null) {
$orm->save($array[1]); $orm->save($array[$index]);
$orm->save($array[2]); }
$orm->save($array[3]);
$orm->save($array[4]);
$orm->save($array[5]);
$message = $orm->message; $message = $orm->message;
//print_r($message); //print_r($message);
} }

View File

@ -75,9 +75,9 @@
$x++; $x++;
$orm = new orm; $orm = new orm;
$orm->name('default_settings'); $orm->name('default_settings');
$orm->save($array[0]); foreach ($array as $index => $null) {
$orm->save($array[1]); $orm->save($array[$index]);
$orm->save($array[2]); }
$message = $orm->message; $message = $orm->message;
//print_r($message); //print_r($message);
} }

View File

@ -415,7 +415,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
} }
elseif ( elseif (
$category == "theme" && $subcategory == "background_color" && $name == "array" || $category == "theme" && $subcategory == "background_color" && $name == "array" ||
$category == "theme" && $subcategory == "login_color" && $name == "text" $category == "theme" && $subcategory == "login_background_color" && $name == "text" ||
$category == "theme" && $subcategory == "footer_color" && $name == "text" ||
$category == "theme" && $subcategory == "footer_background_color" && $name == "text"
) { ) {
echo " <style>"; echo " <style>";
echo " DIV.rui-colorpicker { width: 253px; }"; echo " DIV.rui-colorpicker { width: 253px; }";

View File

@ -67,26 +67,38 @@ if ($domains_processed == 1) {
$array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).'; $array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).';
$x++; $x++;
$array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'login_color'; $array[$x]['default_setting_subcategory'] = 'login_background_color';
$array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffffff'; $array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true'; $array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the login box.'; $array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the login box.';
$x++; $x++;
$array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer'; $array[$x]['default_setting_subcategory'] = 'footer_background_color';
$array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = 'true'; $array[$x]['default_setting_value'] = '#000000';
$array[$x]['default_setting_enabled'] = 'true'; $array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = ''; $array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the footer bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a foreground color (HTML compatible) for the footer bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer_opacity';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '0.2';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the opacity of the footer bar (decimal).';
$x++; $x++;
$orm = new orm; $orm = new orm;
$orm->name('default_settings'); $orm->name('default_settings');
$orm->save($array[0]); foreach ($array as $index => $null) {
$orm->save($array[1]); $orm->save($array[$index]);
$orm->save($array[2]); }
$orm->save($array[3]);
$orm->save($array[4]);
$message = $orm->message; $message = $orm->message;
//print_r($message); //print_r($message);
} }

View File

@ -118,7 +118,7 @@ DIV#default_login {
$_SESSION['theme']['background_color'][0] != '' || $_SESSION['theme']['background_color'][0] != '' ||
$_SESSION['theme']['background_color'][1] != '' $_SESSION['theme']['background_color'][1] != ''
) { ?> ) { ?>
background-color: <?php echo $_SESSION['theme']['login_color']['text']; ?>; background-color: <?php echo $_SESSION['theme']['login_background_color']['text']; ?>;
opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>; opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['login_opacity']['text']); ?>); filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['login_opacity']['text']); ?>);
-moz-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>; -moz-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
@ -135,17 +135,16 @@ DIV#default_login {
} }
DIV#footer { DIV#footer {
background-color: #000; background-color: <?php echo $_SESSION['theme']['footer_background_color']['text']; ?>;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 20px; height: 20px;
-khtml-opacity: 0.2; -khtml-opacity: <?php echo $_SESSION['theme']['footer_opacity']['text']; ?>;
-moz-opacity: 0.2; -moz-opacity: <?php echo $_SESSION['theme']['footer_opacity']['text']; ?>;
-ms-filter: "alpha(opacity=20)"; filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['footer_opacity']['text']); ?>);
filter: alpha(opacity=20); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=<?php echo $_SESSION['theme']['footer_opacity']['text']; ?>);
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.2); opacity: <?php echo $_SESSION['theme']['footer_opacity']['text']; ?>;
opacity: 0.2;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
padding-bottom: 0; padding-bottom: 0;
@ -155,7 +154,7 @@ DIV#footer {
.footer { .footer {
font-size: 11px; font-size: 11px;
font-family: arial; font-family: arial;
color: #fff; color: <?php echo $_SESSION['theme']['footer_color']['text']; ?>;
} }
img { img {
@ -1411,10 +1410,8 @@ if (strlen($_SESSION['message']) > 0) {
</div> </div>
<?php <?php
} }
if ($_SESSION['theme']['footer']['text'] == "false"){ echo "<!--\n"; }
$footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n"; $footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n";
echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n"; echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n";
if ($_SESSION['theme']['footer']['text'] == "false"){ echo "-->\n"; }
?> ?>
</body> </body>