Browse code

added setting for template

template can be set via settings

R.W authored on 21.10.2017 21:57:40
Showing 2 changed files

... ...
@@ -81,6 +81,7 @@ $vaultfname  = "/var/lib/simplevault/simplevault.txt";
81 81
 $create_missing_vaultfiles = 0;
82 82
 $multiuser = 0;
83 83
 $multiuser_vaultfname = "/var/lib/simplevault/simplevault-[#Username].txt";
84
+$defaulttemplate = 'tpl-std';
84 85
 
85 86
 date_default_timezone_set('Europe/Zurich');
86 87
 
... ...
@@ -109,13 +110,6 @@ if ( $multiuser == 1 ) {
109 110
 if (preg_match("/android|iphone/i", $_SERVER["HTTP_USER_AGENT"])) {
110 111
 	// 
111 112
 	$defaulttemplate = 'tpl-mobile';
112
-} else {
113
-	$defaulttemplate = 'tpl-std';
114
-}
115
-
116
-// Override template using HTTP GET variable. Mostly for debugging purposes
117
-if( array_key_exists("tpl",$_GET) ) {
118
-	$defaulttemplate = $_GET["tpl"];
119 113
 }
120 114
 
121 115
 // ----------------------------------------------------------------------------------------
... ...
@@ -10,6 +10,10 @@
10 10
 $dateformat = 'd-M-Y';          // "09-Sep-2007"
11 11
 date_default_timezone_set('Europe/Zurich');
12 12
 
13
+// select the template you want simplevault to use
14
+// available templates are: tpl-std, tpl-bootstrap, tpl-nice
15
+// mobile template is automatically applied to mobile-devices 
16
+$defaulttemplate = 'tpl-bootstrap';
13 17
 
14 18
 // Checks if the pass phrase that was entered to encode an entry has already
15 19
 // been used to encode other entries. Depending on the usage scenario a re-used