diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index 70095ed7d6..cd75429a52 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -58,6 +58,7 @@ class plugin_database { $settings['theme']['login_logo_width'] = !empty($_SESSION['theme']['login_logo_width']['text']) ? $_SESSION['theme']['login_logo_width']['text'] : 'auto; max-width: 300px'; $settings['theme']['login_logo_height'] = !empty($_SESSION['theme']['login_logo_height']['text']) ? $_SESSION['theme']['login_logo_height']['text'] : 'auto; max-height: 300px'; $settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000; + $settings['theme']['background_video'] = isset($_SESSION['theme']['background_video'][0]) ? $_SESSION['theme']['background_video'][0] : null; //already authorized if (isset($_SESSION['authentication']['plugin']['database']) && $_SESSION['authentication']['plugin']['database']["authorized"]) { @@ -108,7 +109,8 @@ class plugin_database { $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); $view->assign("message_delay", $settings['theme']['message_delay']); -// if (!empty($_SESSION['authentication']['plugin']['database']['authorized']) && $_SESSION['authentication']['plugin']['database']['authorized'] == 1 && !empty($_SESSION['username'])) { + $view->assign("background_video", $settings['theme']['background_video']); + //if (!empty($_SESSION['authentication']['plugin']['database']['authorized']) && $_SESSION['authentication']['plugin']['database']['authorized'] == 1 && !empty($_SESSION['username'])) { if (!empty($_SESSION['username'])) { $view->assign("login_password_description", $text['label-password_description']); $view->assign("username", $_SESSION['username']); diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index eb464e6363..8e7f90db8a 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -57,6 +57,7 @@ class plugin_email { $settings['theme']['login_logo_width'] = !empty($_SESSION['theme']['login_logo_width']['text']) ? $_SESSION['theme']['login_logo_width']['text'] : 'auto; max-width: 300px'; $settings['theme']['login_logo_height'] = !empty($_SESSION['theme']['login_logo_height']['text']) ? $_SESSION['theme']['login_logo_height']['text'] : 'auto; max-height: 300px'; $settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000; + $settings['theme']['background_video'] = isset($_SESSION['theme']['background_video'][0]) ? $_SESSION['theme']['background_video'][0] : null; //set a default template $_SESSION['domain']['template']['name'] = 'default'; @@ -101,6 +102,7 @@ class plugin_email { $view->assign("login_logo_source", $settings['theme']['logo']); $view->assign("button_login", $text['button-login']); $view->assign("message_delay", $settings['theme']['message_delay']); + $view->assign("background_video", $settings['theme']['background_video']); //messages $view->assign('messages', message::html(true, ' ')); @@ -509,4 +511,4 @@ class plugin_email { } } -?> +?> \ No newline at end of file diff --git a/core/authentication/resources/classes/plugins/ldap.php b/core/authentication/resources/classes/plugins/ldap.php index d61fc5dec9..61c9f52c30 100644 --- a/core/authentication/resources/classes/plugins/ldap.php +++ b/core/authentication/resources/classes/plugins/ldap.php @@ -1,7 +1,7 @@ assign("login_logo_width", $settings['theme']['login_logo_width']); $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); + $view->assign("background_video", $settings['theme']['background_video']); //add the token name and hash to the view //$view->assign("token_name", $token['name']); @@ -211,4 +213,4 @@ class plugin_ldap { } } -?> +?> \ No newline at end of file diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index 22927d522c..11eb2766ea 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -57,6 +57,7 @@ class plugin_totp { $settings['theme']['login_logo_width'] = !empty($_SESSION['theme']['login_logo_width']['text']) ? $_SESSION['theme']['login_logo_width']['text'] : 'auto; max-width: 300px'; $settings['theme']['login_logo_height'] = !empty($_SESSION['theme']['login_logo_height']['text']) ? $_SESSION['theme']['login_logo_height']['text'] : 'auto; max-height: 300px'; $settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000; + $settings['theme']['background_video'] = isset($_SESSION['theme']['background_video'][0]) ? $_SESSION['theme']['background_video'][0] : null; //get the username if (isset($_SESSION["username"])) { @@ -218,6 +219,7 @@ class plugin_totp { $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); $view->assign("favicon", $settings['theme']['favicon']); + $view->assign("background_video", $settings['theme']['background_video']); if (!empty($_SESSION['username'])) { $view->assign("username", $_SESSION['username']); $view->assign("button_cancel", $text['button-cancel']); diff --git a/core/authentication/resources/views/email.htm b/core/authentication/resources/views/email.htm index ca20781f0f..7f885cf350 100644 --- a/core/authentication/resources/views/email.htm +++ b/core/authentication/resources/views/email.htm @@ -58,6 +58,11 @@ {$login_title} + {if !empty($background_video)} + + {/if}
@@ -80,4 +85,4 @@
- \ No newline at end of file + diff --git a/core/authentication/resources/views/login.htm b/core/authentication/resources/views/login.htm index eba49d3d27..c9ce0d1917 100644 --- a/core/authentication/resources/views/login.htm +++ b/core/authentication/resources/views/login.htm @@ -58,6 +58,11 @@ {$login_title} + {if !empty($background_video)} + + {/if}
@@ -85,4 +90,4 @@
- \ No newline at end of file + diff --git a/core/authentication/resources/views/totp.htm b/core/authentication/resources/views/totp.htm index 4bcdf8f230..0caf68175b 100644 --- a/core/authentication/resources/views/totp.htm +++ b/core/authentication/resources/views/totp.htm @@ -58,6 +58,11 @@ {$login_title} + {if !empty($background_video)} + + {/if}
@@ -78,4 +83,4 @@
- \ No newline at end of file + diff --git a/core/authentication/resources/views/totp_secret.htm b/core/authentication/resources/views/totp_secret.htm index 2aa1576ab2..2ee2dd4796 100644 --- a/core/authentication/resources/views/totp_secret.htm +++ b/core/authentication/resources/views/totp_secret.htm @@ -10,6 +10,11 @@ {$login_title} + {if !empty($background_video)} + + {/if}

@@ -26,4 +31,4 @@
- \ No newline at end of file + diff --git a/core/authentication/resources/views/username.htm b/core/authentication/resources/views/username.htm index a859f56f63..e7cecaf8e2 100644 --- a/core/authentication/resources/views/username.htm +++ b/core/authentication/resources/views/username.htm @@ -58,6 +58,11 @@ {$login_title} + {if !empty($background_video)} + + {/if}
@@ -74,4 +79,4 @@
- \ No newline at end of file + diff --git a/index.php b/index.php index ad0ffb8c83..80bb3b5a07 100644 --- a/index.php +++ b/index.php @@ -55,4 +55,4 @@ } } -?> +?> \ No newline at end of file diff --git a/resources/footer.php b/resources/footer.php index d62c1c5806..c0065536b5 100644 --- a/resources/footer.php +++ b/resources/footer.php @@ -292,4 +292,4 @@ //$statsauth = "a3az349x2bf3fdfa8dbt7x34fas5X"; //require_once "stats/stat_sadd.php"; -?> +?> \ No newline at end of file diff --git a/resources/header.php b/resources/header.php index 9f59499d33..a589f276b3 100644 --- a/resources/header.php +++ b/resources/header.php @@ -145,4 +145,4 @@ require_once("app/translate/translate_header.php"); } -?> +?> \ No newline at end of file diff --git a/themes/default/app_config.php b/themes/default/app_config.php index e23954f672..5ecbbdf0ea 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -63,6 +63,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set a secondary background color, for a gradient effect."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f9e9e72-b998-4ebd-bb45-725c49126fc2"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "background_video"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "array"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/videos/backgrounds/video.mp4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the value with the full path and file name."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "18a0c698-738e-4d88-a592-115dde20730f"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "header_user_visible"; @@ -2711,4 +2719,4 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Display A-leg/left and B-leg/right channel audio waveforms on a single axis."; -?> +?> \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 9113b9a817..ae1f6fbaee 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -479,6 +479,18 @@ else { //default: white background-size:cover; } + #background-video { + width: 100vw; + height: 100vh; + object-fit: cover; + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: -2; + } + pre { white-space: pre-wrap; color: ; @@ -3337,4 +3349,4 @@ else { //default: white //output custom css echo $custom_css_code; -?> +?> \ No newline at end of file diff --git a/themes/default/template.php b/themes/default/template.php index 92e0c317be..810969f2d5 100644 --- a/themes/default/template.php +++ b/themes/default/template.php @@ -1089,7 +1089,7 @@ //add new options from the json results for (var i=0; i < obj.length; i++) { - + //get the variables domain_uuid = obj[i].domain_uuid; domain_name = obj[i].domain_name; @@ -1114,7 +1114,7 @@ div.style.background = '{$domain_selector_background_color_2}'; } - //set the active domain style + //set the active domain style if ('{$domain_uuid}' == obj[i].domain_uuid) { div.style.background = '{$domain_active_background_color}'; div.style.fontWeight = 'bold'; @@ -1161,6 +1161,13 @@ + {*//video background *} + {if !empty($settings.theme.background_video)} + + {/if} + {*//message container *}
@@ -1222,3 +1229,4 @@ +