diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index 3ea7805df..4c0e333fc 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -607,7 +607,7 @@ class e_theme $vars['email'] = varset($vars['author']['@attributes']['email']); $vars['website'] = varset($vars['author']['@attributes']['url']); $vars['author'] = varset($vars['author']['@attributes']['name']); - $vars['info'] = varset($vars['description']); + $vars['info'] = !empty($vars['description']['@value']) ? $vars['description']['@value'] : varset($vars['description']); $vars['category'] = self::getThemeCategory(varset($vars['category'])); $vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']); $vars['csscompliant'] = varset($vars['compliance']['@attributes']['css']); diff --git a/e107_languages/English/lan_installer.php b/e107_languages/English/lan_installer.php index dd581bcf9..718a0c730 100644 --- a/e107_languages/English/lan_installer.php +++ b/e107_languages/English/lan_installer.php @@ -182,3 +182,7 @@ define("LANINS_141", "Please fill in the form below with your MySQL details. If define("LANINS_142", "IMPORTANT: Please rename e107.htaccess to .htaccess"); define("LANINS_144", "IMPORTANT: Please copy and paste the contents of the [b]e107.htaccess[/b] into your [b].htaccess[/b] file. Please take care NOT to overwrite any existing data that may be in it."); define("LANINS_145", "e107 v2.x requires the PHP [x] to be installed. Please contact your host or read the information at [y] before continuing."); + +define("LANINS_146", "Admin Area Skin"); +define("LANINS_147", "Administration"); + diff --git a/e107_themes/bootstrap3/images/admin_bootstrap-dark.jpg b/e107_themes/bootstrap3/images/admin_bootstrap-dark.jpg new file mode 100644 index 000000000..f14bead07 Binary files /dev/null and b/e107_themes/bootstrap3/images/admin_bootstrap-dark.jpg differ diff --git a/e107_themes/bootstrap3/images/admin_corporate.jpg b/e107_themes/bootstrap3/images/admin_corporate.jpg new file mode 100644 index 000000000..7635a9b10 Binary files /dev/null and b/e107_themes/bootstrap3/images/admin_corporate.jpg differ diff --git a/e107_themes/bootstrap3/images/admin_kadmin.jpg b/e107_themes/bootstrap3/images/admin_kadmin.jpg new file mode 100644 index 000000000..4769c7d23 Binary files /dev/null and b/e107_themes/bootstrap3/images/admin_kadmin.jpg differ diff --git a/e107_themes/bootstrap3/images/admin_superhero.jpg b/e107_themes/bootstrap3/images/admin_superhero.jpg new file mode 100644 index 000000000..80ea86cb5 Binary files /dev/null and b/e107_themes/bootstrap3/images/admin_superhero.jpg differ diff --git a/e107_themes/bootstrap3/theme.xml b/e107_themes/bootstrap3/theme.xml index 804b884d2..e5c7956bc 100644 --- a/e107_themes/bootstrap3/theme.xml +++ b/e107_themes/bootstrap3/theme.xml @@ -24,12 +24,12 @@ - - - + + + - + diff --git a/install.php b/install.php index cafa5f3b8..b2a971e4d 100644 --- a/install.php +++ b/install.php @@ -960,7 +960,7 @@ class e_install $this->template->SetTag("installation_heading", LANINS_001); $this->template->SetTag("stage_pre", LANINS_002); $this->template->SetTag("stage_num", LANINS_046); - $this->template->SetTag("stage_title", LANINS_047); + $this->template->SetTag("stage_title", defset('LANINS_147', 'Administration')); // $this->template->SetTag("onload", "document.getElementById('u_name').focus()"); $this->template->SetTag("percent", 60); $this->template->SetTag("bartype", 'warning'); @@ -969,6 +969,10 @@ class e_install $output = "
+ + + + + +
@@ -1006,6 +1010,46 @@ class e_install previous_steps['admin']['email'] : '')."' maxlength='100' /> ".LANINS_081." +
+ + + + + + + + +
"; + + $d = $this->get_theme_xml('bootstrap3'); + $opts = array(); + + foreach($d['css'] as $val) + { + $key = $val['name']; + + if(empty($val['thumbnail'])) + { + continue; + } + + $opts[$key] = array ( + 'title' => $val['info'], + 'preview' => e_THEME."bootstrap3/".$val['thumbnail'], + 'description' =>'', + 'category'=>'' + ); + + + } + + $output .= $this->thumbnailSelector('admincss', $opts, 'css/bootstrap-dark.min.css'); + + $output .= " + +
@@ -1072,6 +1116,11 @@ class e_install } } + if(!empty($_POST['admincss'])) + { + $this->previous_steps['prefs']['admincss'] = $tp->filter($_POST['admincss']); + } + // ------------- Validate Step 5 Data. -------------------------- if(!vartrue($this->previous_steps['admin']['user']) || !vartrue($this->previous_steps['admin']['password'])) { @@ -1123,6 +1172,8 @@ class e_install $themes = $this->get_themes(); + $opts = array(); + foreach($themes as $val) { @@ -1131,17 +1182,29 @@ class e_install continue; }*/ + + $themeInfo = $this->get_theme_xml($val); - $title = vartrue($themeInfo['@attributes']['name']); + + + $opts[$val] = array( + 'title' =>vartrue($themeInfo['@attributes']['name']), + 'category' => vartrue($themeInfo['category']), + 'preview' => e_THEME.$val."/".$themeInfo['thumbnail'], + 'description' => vartrue($themeInfo['info']) + ); + + /* $title = vartrue($themeInfo['@attributes']['name']); $category = vartrue($themeInfo['category']); $preview = e_THEME.$val."/".$themeInfo['thumbnail']; - $description = vartrue($themeInfo['description']); + $description = vartrue($themeInfo['info']); if(!is_readable($preview)) { continue; } + $thumbnail = "".$val.""; @@ -1154,9 +1217,12 @@ class e_install
".$title." (".$category.")
- "; + ";*/ } + $output .= $this->thumbnailSelector('sitetheme', $opts, DEFAULT_INSTALL_THEME); + + $output .= " @@ -1189,6 +1255,43 @@ class e_install $this->logLine('Stage 6 completed'); } + + private function thumbnailSelector($name, $opts, $default='') + { + + $ret = ''; + + foreach($opts as $key=>$val) + { + + if(!is_readable($val['preview']) || !is_file($val['preview'])) + { + continue; + } + + + $thumbnail = "".$key.""; + + + $selected = ($key === $default) ? " checked" : ""; + + $categoryInfo = !empty($val['category']) ? "(".$val['category'].")" : ""; + + $ret .= " +
+ +
"; + } + + + return $ret; + + } + private function stage_7() { global $e_forms; @@ -1757,7 +1860,7 @@ if($this->pdo == true) * get_theme_xml - check theme.xml file of specific theme * * @param string $theme_folder - * @return array $xmlArray OR boolean FALSE if result is no array + * @return array|bool $xmlArray OR boolean FALSE if result is no array */ function get_theme_xml($theme_folder) { @@ -1774,7 +1877,7 @@ if($this->pdo == true) // require_once($this->e107->e107_dirs['HANDLERS_DIRECTORY']."theme_handler.php"); // $tm = new themeHandler; - $xmlArray = e107::getTheme($theme_folder)->get(); + $xmlArray = e107::getTheme($theme_folder,true)->get(); return (is_array($xmlArray)) ? $xmlArray : false; }