mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Admin skin option added to installation wizard.
This commit is contained in:
@@ -607,7 +607,7 @@ class e_theme
|
|||||||
$vars['email'] = varset($vars['author']['@attributes']['email']);
|
$vars['email'] = varset($vars['author']['@attributes']['email']);
|
||||||
$vars['website'] = varset($vars['author']['@attributes']['url']);
|
$vars['website'] = varset($vars['author']['@attributes']['url']);
|
||||||
$vars['author'] = varset($vars['author']['@attributes']['name']);
|
$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['category'] = self::getThemeCategory(varset($vars['category']));
|
||||||
$vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']);
|
$vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']);
|
||||||
$vars['csscompliant'] = varset($vars['compliance']['@attributes']['css']);
|
$vars['csscompliant'] = varset($vars['compliance']['@attributes']['css']);
|
||||||
|
@@ -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_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_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_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");
|
||||||
|
|
||||||
|
BIN
e107_themes/bootstrap3/images/admin_bootstrap-dark.jpg
Normal file
BIN
e107_themes/bootstrap3/images/admin_bootstrap-dark.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
e107_themes/bootstrap3/images/admin_corporate.jpg
Normal file
BIN
e107_themes/bootstrap3/images/admin_corporate.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
e107_themes/bootstrap3/images/admin_kadmin.jpg
Normal file
BIN
e107_themes/bootstrap3/images/admin_kadmin.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
BIN
e107_themes/bootstrap3/images/admin_superhero.jpg
Normal file
BIN
e107_themes/bootstrap3/images/admin_superhero.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
@@ -24,12 +24,12 @@
|
|||||||
</libraries>
|
</libraries>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<css file="style.css" name="Default"/>
|
<css file="style.css" name="Default"/>
|
||||||
<css file="css/bootstrap-dark.min.css" name="Dark Admin" description="" thumbnail='' scope='admin' exclude='bootstrap'/>
|
<css file="css/bootstrap-dark.min.css" name="Dark Admin" description="" thumbnail='images/admin_bootstrap-dark.jpg' scope='admin' exclude='bootstrap'/>
|
||||||
<css file="css/kadmin.css" name="K-Admin Inspired" scope='admin' description="(experimental)" thumbnail='' url='http://themifycloud.com/demos/templates/KAdmin/KAdmin-Dark/dashboard.html' />
|
<css file="css/kadmin.css" name="K-Admin Inspired" scope='admin' description="(experimental)" thumbnail='images/admin_kadmin.jpg' url='http://themifycloud.com/demos/templates/KAdmin/KAdmin-Dark/dashboard.html' />
|
||||||
<css file="css/corporate.css" name="Corporate" scope='admin' exclude='bootstrap' />
|
<css file="css/corporate.css" name="Corporate" scope='admin' thumbnail='images/admin_corporate.jpg' exclude='bootstrap' />
|
||||||
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/flatly/bootstrap.min.css" name="Flatly" scope='admin' exclude='bootstrap'/>
|
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/flatly/bootstrap.min.css" name="Flatly" scope='admin' exclude='bootstrap'/>
|
||||||
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/sandstone/bootstrap.min.css" name="Sandstone" scope='admin' exclude='bootstrap'/>
|
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/sandstone/bootstrap.min.css" name="Sandstone" scope='admin' exclude='bootstrap'/>
|
||||||
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/superhero/bootstrap.min.css" name="Superhero" scope='admin' exclude='bootstrap'/>
|
<css file="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/superhero/bootstrap.min.css" name="Superhero" thumbnail='images/admin_superhero.jpg' scope='admin' exclude='bootstrap'/>
|
||||||
<css file="*" name="*"/>
|
<css file="*" name="*"/>
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
<layouts>
|
<layouts>
|
||||||
|
115
install.php
115
install.php
@@ -960,7 +960,7 @@ class e_install
|
|||||||
$this->template->SetTag("installation_heading", LANINS_001);
|
$this->template->SetTag("installation_heading", LANINS_001);
|
||||||
$this->template->SetTag("stage_pre", LANINS_002);
|
$this->template->SetTag("stage_pre", LANINS_002);
|
||||||
$this->template->SetTag("stage_num", LANINS_046);
|
$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("onload", "document.getElementById('u_name').focus()");
|
||||||
$this->template->SetTag("percent", 60);
|
$this->template->SetTag("percent", 60);
|
||||||
$this->template->SetTag("bartype", 'warning');
|
$this->template->SetTag("bartype", 'warning');
|
||||||
@@ -969,6 +969,10 @@ class e_install
|
|||||||
$output = "
|
$output = "
|
||||||
<div style='width: 100%; padding-left: auto; padding-right: auto;'>
|
<div style='width: 100%; padding-left: auto; padding-right: auto;'>
|
||||||
<table class='table table-striped table-bordered'>
|
<table class='table table-striped table-bordered'>
|
||||||
|
<colgroup>
|
||||||
|
<col style='width:35%' />
|
||||||
|
<col />
|
||||||
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for='u_name'>".LANINS_072."</label></td>
|
<td><label for='u_name'>".LANINS_072."</label></td>
|
||||||
<td>
|
<td>
|
||||||
@@ -1006,6 +1010,46 @@ class e_install
|
|||||||
<td>
|
<td>
|
||||||
<input class='form-control' type='text' name='email' size='30' id='email' required='required' placeholder='admin@mysite.com' value='".(isset($this->previous_steps['admin']['email']) ? $this->previous_steps['admin']['email'] : '')."' maxlength='100' />
|
<input class='form-control' type='text' name='email' size='30' id='email' required='required' placeholder='admin@mysite.com' value='".(isset($this->previous_steps['admin']['email']) ? $this->previous_steps['admin']['email'] : '')."' maxlength='100' />
|
||||||
<span class='field-help'>".LANINS_081."</span>
|
<span class='field-help'>".LANINS_081."</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class='table table-striped table-bordered'>
|
||||||
|
<colgroup>
|
||||||
|
<col style='width:35%' />
|
||||||
|
<col />
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<td><label for='admincss'>".LANINS_146."</label></td>
|
||||||
|
<td>";
|
||||||
|
|
||||||
|
$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 .= "
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1072,6 +1116,11 @@ class e_install
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($_POST['admincss']))
|
||||||
|
{
|
||||||
|
$this->previous_steps['prefs']['admincss'] = $tp->filter($_POST['admincss']);
|
||||||
|
}
|
||||||
|
|
||||||
// ------------- Validate Step 5 Data. --------------------------
|
// ------------- Validate Step 5 Data. --------------------------
|
||||||
if(!vartrue($this->previous_steps['admin']['user']) || !vartrue($this->previous_steps['admin']['password']))
|
if(!vartrue($this->previous_steps['admin']['user']) || !vartrue($this->previous_steps['admin']['password']))
|
||||||
{
|
{
|
||||||
@@ -1123,6 +1172,8 @@ class e_install
|
|||||||
|
|
||||||
$themes = $this->get_themes();
|
$themes = $this->get_themes();
|
||||||
|
|
||||||
|
$opts = array();
|
||||||
|
|
||||||
foreach($themes as $val)
|
foreach($themes as $val)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1131,17 +1182,29 @@ class e_install
|
|||||||
continue;
|
continue;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$themeInfo = $this->get_theme_xml($val);
|
$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']);
|
$category = vartrue($themeInfo['category']);
|
||||||
$preview = e_THEME.$val."/".$themeInfo['thumbnail'];
|
$preview = e_THEME.$val."/".$themeInfo['thumbnail'];
|
||||||
$description = vartrue($themeInfo['description']);
|
$description = vartrue($themeInfo['info']);
|
||||||
|
|
||||||
if(!is_readable($preview))
|
if(!is_readable($preview))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$thumbnail = "<img class='img-responsive img-fluid thumbnail' src='".$preview ."' alt='".$val."' />";
|
$thumbnail = "<img class='img-responsive img-fluid thumbnail' src='".$preview ."' alt='".$val."' />";
|
||||||
|
|
||||||
|
|
||||||
@@ -1154,9 +1217,12 @@ class e_install
|
|||||||
<h5>".$title." <small>(".$category.")</small><span class='glyphicon glyphicon-ok text-success'></span></h5>
|
<h5>".$title." <small>(".$category.")</small><span class='glyphicon glyphicon-ok text-success'></span></h5>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>";
|
</div>";*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$output .= $this->thumbnailSelector('sitetheme', $opts, DEFAULT_INSTALL_THEME);
|
||||||
|
|
||||||
|
|
||||||
$output .= "
|
$output .= "
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@@ -1189,6 +1255,43 @@ class e_install
|
|||||||
$this->logLine('Stage 6 completed');
|
$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 = "<img class='img-responsive img-fluid thumbnail' src='".$val['preview'] ."' alt='".$key."' />";
|
||||||
|
|
||||||
|
|
||||||
|
$selected = ($key === $default) ? " checked" : "";
|
||||||
|
|
||||||
|
$categoryInfo = !empty($val['category']) ? "<small>(".$val['category'].")</small>" : "";
|
||||||
|
|
||||||
|
$ret .= "
|
||||||
|
<div class='col-md-6 theme-cell' >
|
||||||
|
<label class='theme-selection' title=\"".$val['description']."\"><input type='radio' name='".$name."' value='{$key}' required='required' $selected />
|
||||||
|
<div>".$thumbnail."
|
||||||
|
<h5>".$val['title']." ".$categoryInfo."<span class='glyphicon glyphicon-ok text-success'></span></h5>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private function stage_7()
|
private function stage_7()
|
||||||
{
|
{
|
||||||
global $e_forms;
|
global $e_forms;
|
||||||
@@ -1757,7 +1860,7 @@ if($this->pdo == true)
|
|||||||
* get_theme_xml - check theme.xml file of specific theme
|
* get_theme_xml - check theme.xml file of specific theme
|
||||||
*
|
*
|
||||||
* @param string $theme_folder
|
* @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)
|
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");
|
// require_once($this->e107->e107_dirs['HANDLERS_DIRECTORY']."theme_handler.php");
|
||||||
// $tm = new themeHandler;
|
// $tm = new themeHandler;
|
||||||
$xmlArray = e107::getTheme($theme_folder)->get();
|
$xmlArray = e107::getTheme($theme_folder,true)->get();
|
||||||
|
|
||||||
return (is_array($xmlArray)) ? $xmlArray : false;
|
return (is_array($xmlArray)) ? $xmlArray : false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user