From abd470242f94cd5d33271d9428fd3275d17de11c Mon Sep 17 00:00:00 2001 From: dignajar Date: Sun, 17 Jan 2016 18:11:20 -0300 Subject: [PATCH] Little changes on Dashboard --- install.php | 42 +++++++++++++++++---- kernel/admin/themes/default/css/default.css | 5 +++ kernel/admin/themes/default/init.php | 4 +- kernel/admin/views/plugins.php | 6 +-- kernel/admin/views/themes.php | 4 +- kernel/helpers/email.class.php | 2 +- languages/en_US.json | 6 ++- 7 files changed, 51 insertions(+), 18 deletions(-) diff --git a/install.php b/install.php index f5727f9b..e6687066 100644 --- a/install.php +++ b/install.php @@ -32,15 +32,34 @@ define('PATH_KERNEL', PATH_ROOT.'kernel'.DS); define('PATH_HELPERS', PATH_KERNEL.'helpers'.DS); define('PATH_LANGUAGES', PATH_ROOT.'languages'.DS); define('PATH_ABSTRACT', PATH_KERNEL.'abstract'.DS); -define('DOMAIN', $_SERVER['HTTP_HOST']); -// HTML PATHs -//$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; -//$base = dirname($base); -$base = empty($_SERVER['REQUEST_URI']) ? dirname($_SERVER['SCRIPT_NAME']) : dirname($_SERVER['REQUEST_URI']); +// Domain and protocol +define('DOMAIN', $_SERVER['HTTP_HOST']); + +if(!empty($_SERVER['HTTPS'])) { + define('PROTOCOL', 'https://'); +} +else { + define('PROTOCOL', 'http://'); +} + +// BASE URL +// The user can define the base URL. +// Left empty if you want to Bludit try to detect the base URL. +$base = ''; + +if( !empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_NAME']) && empty($base) ) { + $base = str_replace($_SERVER['DOCUMENT_ROOT'], '', $_SERVER['SCRIPT_NAME']); + $base = dirname($base); +} +elseif( empty($base) ) { + $base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $base = dirname($base); +} if($base!=DS) { - $base = $base.'/'; + $base = trim($base, '/'); + $base = '/'.$base.'/'; } else { // Workaround for Windows Web Servers @@ -340,7 +359,7 @@ function install($adminPassword, $email, $timezoneOffset) 'uriPost'=>'/post/', 'uriPage'=>'/', 'uriTag'=>'/tag/', - 'url'=>'http://'.DOMAIN.HTML_PATH_ROOT, + 'url'=>PROTOCOL.DOMAIN.HTML_PATH_ROOT, 'cliMode'=>'true', 'emailFrom'=>'no-reply@'.DOMAIN ); @@ -465,11 +484,18 @@ Content: file_put_contents(PATH_PAGES.'about'.DS.'index.txt', $data, LOCK_EX); // File index.txt for welcome post + $text1 = Text::replaceAssoc( + array( + '{{ADMIN_AREA_LINK}}'=>PROTOCOL.DOMAIN.HTML_PATH_ROOT.'admin' + ), + $Language->get('Manage your Bludit from the admin panel') + ); + $data = 'Title: '.$Language->get('First post').' Content: ## '.$Language->get('Whats next').' -- '.$Language->get('Manage your Bludit from the admin panel').' +- '.$text1.' - '.$Language->get('Follow Bludit on').' [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/bluditcms) / [Google+](https://plus.google.com/+Bluditcms) - '.$Language->get('Chat with developers and users on Gitter').' - '.$Language->get('Visit the support forum').' diff --git a/kernel/admin/themes/default/css/default.css b/kernel/admin/themes/default/css/default.css index a43983e7..af0da748 100644 --- a/kernel/admin/themes/default/css/default.css +++ b/kernel/admin/themes/default/css/default.css @@ -353,6 +353,11 @@ h3.titleOptions { /* ----------- PLUGIN LIST / THEME LIST ----------- */ +tr.plugin-installed, +tr.theme-installed { + background: #F2F7FF !important; +} + div.plugin-links > a { display: inline-block; margin-top: 5px; diff --git a/kernel/admin/themes/default/init.php b/kernel/admin/themes/default/init.php index 7fa6356b..5b271e07 100644 --- a/kernel/admin/themes/default/init.php +++ b/kernel/admin/themes/default/init.php @@ -269,7 +269,7 @@ $html .= ' '; if(empty($thumbnailList)) { - $html .= '
There are no images, upload someone to make your site more cheerful.
'; + $html .= '
'.$L->g('There are no images').'
'; } $html .= ' @@ -442,7 +442,7 @@ $html .= ' '; if(empty($thumbnailList)) { - $html .= '
There are no images, upload someone to make your site more cheerful.
'; + $html .= '
'.$L->g('There are no images').'
'; } $html .= ' diff --git a/kernel/admin/views/plugins.php b/kernel/admin/views/plugins.php index 9f200a38..30cf1c6a 100644 --- a/kernel/admin/views/plugins.php +++ b/kernel/admin/views/plugins.php @@ -3,7 +3,7 @@ HTML::title(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece')); echo ' - +
@@ -18,7 +18,7 @@ echo ' foreach($plugins['all'] as $Plugin) { echo ' - + installed()?'class="plugin-installed"':'class="plugin-notInstalled"').'>
'.$L->g('Name').'
'.$Plugin->name().'