diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index 86295a65..191312d2 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -645,31 +645,32 @@ div.plugin-links > span.separator { /* ----------- PAGINATOR ----------- */ +#paginator { + margin: 30px 0; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; +} + #paginator ul { list-style-type: none; margin: 15px 0; padding: 0; - font-size: 1em; - text-align: center; -} - -#paginator li.next { - margin-left: 1em; -} - -#paginator li.previous { - margin-right: 1em; -} - -#paginator a { - color: #2672ec; + font-size: 1.1em; + text-align: left; } #paginator li { - display: inline; - margin: 0 5px; + display: inline; + margin: 0 5px; } +#paginator li.disabled { + color: #ccc; +} + +#paginator a { + color: #333; +} /* ----------- PLUGINS FORM ----------- */ diff --git a/bl-kernel/admin/views/about.php b/bl-kernel/admin/views/about.php index f4407f56..7856638f 100644 --- a/bl-kernel/admin/views/about.php +++ b/bl-kernel/admin/views/about.php @@ -12,19 +12,27 @@ echo ' '; + echo ''; + echo 'Bludit Edition'; + if (defined('BLUDIT_PROs')) { + echo 'PRO - '.$L->g('Thanks for support Bludit').''; + } else { + echo 'Standard - '.$L->g('Upgrade to Bludit PRO').''; + } + echo ''; echo ''; - echo 'Bludit version'; + echo 'Bludit Version'; echo ''.BLUDIT_VERSION.''; echo ''; echo ''; - echo 'Bludit codename'; + echo 'Bludit Codename'; echo ''.BLUDIT_CODENAME.''; echo ''; echo ''; - echo 'Bludit build'; + echo 'Bludit Build Number'; echo ''.BLUDIT_BUILD.''; echo ''; diff --git a/bl-kernel/admin/views/pages.php b/bl-kernel/admin/views/pages.php index bdd603ad..382abeba 100644 --- a/bl-kernel/admin/views/pages.php +++ b/bl-kernel/admin/views/pages.php @@ -72,7 +72,9 @@ echo ' '; + echo '
  • '; + } else { + echo '
  • Previous
  • '; } for($i=1; $i<=Paginator::amountOfPages(); $i++) { @@ -81,8 +83,10 @@ echo ' // Show next page link if(Paginator::showNext()) { - echo ''; + echo '
  • '; + } else { + echo '
  • Next
  • '; } ?> - + \ No newline at end of file diff --git a/bl-kernel/admin/views/settings-advanced.php b/bl-kernel/admin/views/settings-advanced.php index e8835c87..6d728111 100644 --- a/bl-kernel/admin/views/settings-advanced.php +++ b/bl-kernel/admin/views/settings-advanced.php @@ -25,7 +25,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'label'=>$L->g('Site URL'), 'value'=>$Site->url(), 'class'=>'uk-width-1-2 uk-form-medium', - 'tip'=>$L->g('the-url-of-your-site') + 'tip'=>$L->g('full-url-of-your-site') )); HTML::legend(array('value'=>$L->g('Predefined pages'))); @@ -36,7 +36,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'options'=>$homepageOptions, 'selected'=>$Site->homepage(), 'class'=>'uk-width-1-3 uk-form-medium', - 'tip'=>'', + 'tip'=>$L->g('Returning page for the main page'), 'addEmptySpace'=>true )); @@ -46,7 +46,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'options'=>$homepageOptions, 'selected'=>$Site->pageNotFound(), 'class'=>'uk-width-1-3 uk-form-medium', - 'tip'=>'', + 'tip'=>$L->g('Returning page when the page doesnt exist'), 'addEmptySpace'=>true )); diff --git a/bl-kernel/admin/views/settings-regional.php b/bl-kernel/admin/views/settings-regional.php index d238781e..d7ff4a5f 100644 --- a/bl-kernel/admin/views/settings-regional.php +++ b/bl-kernel/admin/views/settings-regional.php @@ -34,7 +34,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'label'=>$L->g('Locale'), 'value'=>$Site->locale(), 'class'=>'uk-width-1-2 uk-form-medium', - 'tip'=>$L->g('you-can-use-this-field-to-define-a-set-of') + 'tip'=>$L->g('with-the-locales-you-can-set-the-regional-user-interface') )); HTML::legend(array('value'=>$L->g('Date and time formats'))); diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 8e92f73c..cf6a7e84 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -111,7 +111,7 @@ define('CLI_STATUS', 'published'); define('CLI_USERNAME', 'admin'); // Filename -define('FILENAME', 'index.md'); +define('FILENAME', 'index.txt'); // Database date format define('DB_DATE_FORMAT', 'Y-m-d H:i:s'); @@ -144,7 +144,7 @@ define('DIR_PERMISSIONS', 0755); define('ADMIN_URI_FILTER', 'admin'); // Default language file, in this case is English -define('DEFAULT_LANGUAGE_FILE', 'en_US.json'); +define('DEFAULT_LANGUAGE_FILE', 'en.json'); // Set internal character encoding mb_internal_encoding(CHARSET); diff --git a/bl-languages/en.json b/bl-languages/en.json index ac3c02e3..41feeed6 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -15,6 +15,8 @@ "manage-categories": "Manage categories", "general-settings": "General settings", "advanced-settings": "Advanced settings", + "thanks-for-support-bludit": "Thanks for support Bludit", + "upgrade-to-bludit-pro": "Upgrade to Bludit PRO", "language": "Language", "plugins": "Plugins", "themes": "Themes", @@ -99,8 +101,7 @@ "footer-text": "Footer text", "you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.", "social-networks-links": "Social networks links", - "site-url": "Site url", - "the-url-of-your-site": "The URL of your site.", + "site-url": "Site URL", "default-home-page": "Default home page", "email-account-settings": "Email account settings", "sender-email": "Sender email", @@ -110,7 +111,6 @@ "timezone": "Timezone", "select-a-timezone-for-a-correct": "Select a timezone for a correct date\/time display on your site.", "locale": "Locale", - "you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the language, country and special preferences.", "date-and-time-formats": "Date and time formats", "date-format": "Date format", "current-format": "Current format", @@ -140,7 +140,7 @@ "you-can-change-this-field-when-save-the-current-changes": "You can change this field when save the current changes.", "items-per-page": "Items per page", "invite-a-friend-to-collaborate-on-your-site": "Invite a friend to collaborate on your site", - "number-of-items-to-show-per-page": "Number of items to show per page", + "number-of-items-to-show-per-page": "Number of items to show per page.", "website-or-blog": "Website or Blog", "scheduled-pages": "Scheduled pages", "there-are-no-scheduled-pages": "There are no scheduled pages", @@ -150,5 +150,9 @@ "order-the-content-by-position-to-build-a-website": "Order the content by position to build a Website or order the content by date to build a Blog.", "page-not-found-content": "Hey! look like the page doesn't exist.", "page-not-found": "Page not found", - "predefined-pages": "Predefined pages" + "predefined-pages": "Predefined pages", + "returning-page-when-the-page-doesnt-exist": "Returning page when the page doesn't exist, leave blank if you want to returns a default message.", + "returning-page-for-the-main-page": "Returning page for the main page, leave blank if you want to show all the pages on the main page.", + "full-url-of-your-site": "Full URL of your site. Complete with the protocol HTTP or HTTPS (only if you have enabled SSL on your server).", + "with-the-locales-you-can-set-the-regional-user-interface": "With the locales, you can set the regional user interface, such as the dates in your language. The locales need to be installed on your system." } \ No newline at end of file diff --git a/bl-plugins/version/plugin.php b/bl-plugins/version/plugin.php index 4395c0ef..fcaf4e21 100644 --- a/bl-plugins/version/plugin.php +++ b/bl-plugins/version/plugin.php @@ -42,7 +42,7 @@ class pluginVersion extends Plugin { if(defined('BLUDIT_PRO')) { $html = '
    Bludit PRO v'.BLUDIT_VERSION.'
    '; } else { - $html = '
    Bludit v'.BLUDIT_VERSION.''.$Language->get('Upgrade to Bludit PRO').'
    '; + $html = '
    Bludit v'.BLUDIT_VERSION.''.$Language->get('Upgrade to Bludit PRO').'
    '; } } diff --git a/install.php b/install.php index eb0cdb0c..0ba7f7c5 100644 --- a/install.php +++ b/install.php @@ -108,6 +108,8 @@ define('DB_DATE_FORMAT', 'Y-m-d H:i:s'); // Charset, default UTF-8. define('CHARSET', 'UTF-8'); +define('DEFAULT_LANGUAGE_FILE', 'en.json'); + // Set internal character encoding. mb_internal_encoding(CHARSET); @@ -127,27 +129,23 @@ include(PATH_KERNEL.'dblanguage.class.php'); // --- LANGUAGE and LOCALE --- // Language from the URI -if(isset($_GET['language'])) { - $localeFromHTTP = Sanitize::html($_GET['language']); -} -else { +$languageFromHTTP = 'en_US'; +$localeFromHTTP = 'en_US'; + +if (isset($_GET['language'])) { + $languageFromHTTP = Sanitize::html($_GET['language']); +} else { + // Try to detect the language browser + $languageFromHTTP = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + // Try to detect the locale - if( function_exists('locale_accept_from_http') ) { + if (function_exists('locale_accept_from_http')) { $localeFromHTTP = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']); } - else { - $explodeLocale = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); - $localeFromHTTP = empty($explodeLocale[0])?'en_US':str_replace('-', '_', $explodeLocale[0]); - } -} - -// Check if the dictionary exists, otherwise the default language is English. -if( !file_exists(PATH_LANGUAGES.$localeFromHTTP.'.json') ) { - $localeFromHTTP = 'en_US'; } // Get language file -$Language = new dbLanguage($localeFromHTTP); +$Language = new dbLanguage('en_US'); // Set locale setlocale(LC_ALL, $localeFromHTTP); @@ -345,8 +343,8 @@ function install($adminPassword, $email, $timezone) 'slogan'=>'CMS', 'description'=>'', 'footer'=>'Copyright © '.Date::current('Y'), - 'language'=>$Language->getCurrentLocale(), - 'locale'=>$Language->getCurrentLocale(), + 'language'=>$Language->locale(), + 'locale'=>$Language->locale(), 'timezone'=>$timezone, 'theme'=>'kernel-panic', 'adminTheme'=>'default',