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 .= '
'.$L->g('Name').' | @@ -18,7 +18,7 @@ echo ' foreach($plugins['all'] as $Plugin) { echo ' -||
---|---|---|
'.$Plugin->name().'
@@ -26,7 +26,7 @@ foreach($plugins['all'] as $Plugin)
if($Plugin->installed()) {
if(method_exists($Plugin, 'form')) {
- echo ''.$L->g('Configure').'';
+ echo ''.$L->g('Settings').'';
echo ' | ';
}
echo ''.$L->g('Deactivate').'';
diff --git a/kernel/admin/views/themes.php b/kernel/admin/views/themes.php
index 0f804b6c..d17f50ce 100644
--- a/kernel/admin/views/themes.php
+++ b/kernel/admin/views/themes.php
@@ -3,7 +3,7 @@
HTML::title(array('title'=>$L->g('Themes'), 'icon'=>'paint-brush'));
echo '
-
|