Changes on About, installer

This commit is contained in:
Diego Najar 2017-09-04 23:09:45 +02:00
parent b95759995b
commit b1c752ec9f
9 changed files with 66 additions and 51 deletions

View File

@ -645,31 +645,32 @@ div.plugin-links > span.separator {
/* ----------- PAGINATOR ----------- */ /* ----------- PAGINATOR ----------- */
#paginator {
margin: 30px 0;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
#paginator ul { #paginator ul {
list-style-type: none; list-style-type: none;
margin: 15px 0; margin: 15px 0;
padding: 0; padding: 0;
font-size: 1em; font-size: 1.1em;
text-align: center; text-align: left;
}
#paginator li.next {
margin-left: 1em;
}
#paginator li.previous {
margin-right: 1em;
}
#paginator a {
color: #2672ec;
} }
#paginator li { #paginator li {
display: inline; display: inline;
margin: 0 5px; margin: 0 5px;
} }
#paginator li.disabled {
color: #ccc;
}
#paginator a {
color: #333;
}
/* ----------- PLUGINS FORM ----------- */ /* ----------- PLUGINS FORM ----------- */

View File

@ -12,19 +12,27 @@ echo '
</thead> </thead>
<tbody> <tbody>
'; ';
echo '<tr>';
echo '<td>Bludit Edition</td>';
if (defined('BLUDIT_PROs')) {
echo '<td>PRO - '.$L->g('Thanks for support Bludit').'</td>';
} else {
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
}
echo '</tr>';
echo '<tr>'; echo '<tr>';
echo '<td>Bludit version</td>'; echo '<td>Bludit Version</td>';
echo '<td>'.BLUDIT_VERSION.'</td>'; echo '<td>'.BLUDIT_VERSION.'</td>';
echo '</tr>'; echo '</tr>';
echo '<tr>'; echo '<tr>';
echo '<td>Bludit codename</td>'; echo '<td>Bludit Codename</td>';
echo '<td>'.BLUDIT_CODENAME.'</td>'; echo '<td>'.BLUDIT_CODENAME.'</td>';
echo '</tr>'; echo '</tr>';
echo '<tr>'; echo '<tr>';
echo '<td>Bludit build</td>'; echo '<td>Bludit Build Number</td>';
echo '<td>'.BLUDIT_BUILD.'</td>'; echo '<td>'.BLUDIT_BUILD.'</td>';
echo '</tr>'; echo '</tr>';

View File

@ -72,7 +72,9 @@ echo '
<?php <?php
// Show previus page link // Show previus page link
if(Paginator::showPrev()) { if(Paginator::showPrev()) {
echo '<li class="first"><a href="'.Paginator::prevPageUrl().'" class="previous"><i class="fa fa-arrow-circle-o-left"></i> Previous</a></li>'; echo '<li><a href="'.Paginator::prevPageUrl().'" class="previous"><i class="fa fa-arrow-circle-o-left"></i> Previous</a></li>';
} else {
echo '<li class="disabled"><i class="fa fa-arrow-circle-o-left"></i> Previous</li>';
} }
for($i=1; $i<=Paginator::amountOfPages(); $i++) { for($i=1; $i<=Paginator::amountOfPages(); $i++) {
@ -81,8 +83,10 @@ echo '
// Show next page link // Show next page link
if(Paginator::showNext()) { if(Paginator::showNext()) {
echo '<li class="next"><a href="'.Paginator::nextPageUrl().'" class="next">Next <i class="fa fa-arrow-circle-o-right"></i></a></li>'; echo '<li><a href="'.Paginator::nextPageUrl().'" class="next">Next <i class="fa fa-arrow-circle-o-right"></i></a></li>';
} else {
echo '<li class="disabled">Next <i class="fa fa-arrow-circle-o-right"></i></li>';
} }
?> ?>
</ul> </ul>
</div> </div>

View File

@ -25,7 +25,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
'label'=>$L->g('Site URL'), 'label'=>$L->g('Site URL'),
'value'=>$Site->url(), 'value'=>$Site->url(),
'class'=>'uk-width-1-2 uk-form-medium', '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'))); HTML::legend(array('value'=>$L->g('Predefined pages')));
@ -36,7 +36,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
'options'=>$homepageOptions, 'options'=>$homepageOptions,
'selected'=>$Site->homepage(), 'selected'=>$Site->homepage(),
'class'=>'uk-width-1-3 uk-form-medium', 'class'=>'uk-width-1-3 uk-form-medium',
'tip'=>'', 'tip'=>$L->g('Returning page for the main page'),
'addEmptySpace'=>true 'addEmptySpace'=>true
)); ));
@ -46,7 +46,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
'options'=>$homepageOptions, 'options'=>$homepageOptions,
'selected'=>$Site->pageNotFound(), 'selected'=>$Site->pageNotFound(),
'class'=>'uk-width-1-3 uk-form-medium', 'class'=>'uk-width-1-3 uk-form-medium',
'tip'=>'', 'tip'=>$L->g('Returning page when the page doesnt exist'),
'addEmptySpace'=>true 'addEmptySpace'=>true
)); ));

View File

@ -34,7 +34,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
'label'=>$L->g('Locale'), 'label'=>$L->g('Locale'),
'value'=>$Site->locale(), 'value'=>$Site->locale(),
'class'=>'uk-width-1-2 uk-form-medium', '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'))); HTML::legend(array('value'=>$L->g('Date and time formats')));

View File

@ -111,7 +111,7 @@ define('CLI_STATUS', 'published');
define('CLI_USERNAME', 'admin'); define('CLI_USERNAME', 'admin');
// Filename // Filename
define('FILENAME', 'index.md'); define('FILENAME', 'index.txt');
// Database date format // Database date format
define('DB_DATE_FORMAT', 'Y-m-d H:i:s'); define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
@ -144,7 +144,7 @@ define('DIR_PERMISSIONS', 0755);
define('ADMIN_URI_FILTER', 'admin'); define('ADMIN_URI_FILTER', 'admin');
// Default language file, in this case is English // 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 // Set internal character encoding
mb_internal_encoding(CHARSET); mb_internal_encoding(CHARSET);

View File

@ -15,6 +15,8 @@
"manage-categories": "Manage categories", "manage-categories": "Manage categories",
"general-settings": "General settings", "general-settings": "General settings",
"advanced-settings": "Advanced settings", "advanced-settings": "Advanced settings",
"thanks-for-support-bludit": "Thanks for support Bludit",
"upgrade-to-bludit-pro": "Upgrade to Bludit PRO",
"language": "Language", "language": "Language",
"plugins": "Plugins", "plugins": "Plugins",
"themes": "Themes", "themes": "Themes",
@ -99,8 +101,7 @@
"footer-text": "Footer text", "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.", "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", "social-networks-links": "Social networks links",
"site-url": "Site url", "site-url": "Site URL",
"the-url-of-your-site": "The URL of your site.",
"default-home-page": "Default home page", "default-home-page": "Default home page",
"email-account-settings": "Email account settings", "email-account-settings": "Email account settings",
"sender-email": "Sender email", "sender-email": "Sender email",
@ -110,7 +111,6 @@
"timezone": "Timezone", "timezone": "Timezone",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date\/time display on your site.", "select-a-timezone-for-a-correct": "Select a timezone for a correct date\/time display on your site.",
"locale": "Locale", "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-and-time-formats": "Date and time formats",
"date-format": "Date format", "date-format": "Date format",
"current-format": "Current 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.", "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", "items-per-page": "Items per page",
"invite-a-friend-to-collaborate-on-your-site": "Invite a friend to collaborate on your site", "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", "website-or-blog": "Website or Blog",
"scheduled-pages": "Scheduled pages", "scheduled-pages": "Scheduled pages",
"there-are-no-scheduled-pages": "There are no 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.", "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-content": "Hey! look like the page doesn't exist.",
"page-not-found": "Page not found", "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."
} }

View File

@ -42,7 +42,7 @@ class pluginVersion extends Plugin {
if(defined('BLUDIT_PRO')) { if(defined('BLUDIT_PRO')) {
$html = '<div id="plugin-version">Bludit PRO v'.BLUDIT_VERSION.'</div>'; $html = '<div id="plugin-version">Bludit PRO v'.BLUDIT_VERSION.'</div>';
} else { } else {
$html = '<div id="plugin-version">Bludit v'.BLUDIT_VERSION.'<a href="https://pro.bludit.com">'.$Language->get('Upgrade to Bludit PRO').'</a></div>'; $html = '<div id="plugin-version">Bludit v'.BLUDIT_VERSION.'<a target="_blank" href="https://pro.bludit.com">'.$Language->get('Upgrade to Bludit PRO').'</a></div>';
} }
} }

View File

@ -108,6 +108,8 @@ define('DB_DATE_FORMAT', 'Y-m-d H:i:s');
// Charset, default UTF-8. // Charset, default UTF-8.
define('CHARSET', 'UTF-8'); define('CHARSET', 'UTF-8');
define('DEFAULT_LANGUAGE_FILE', 'en.json');
// Set internal character encoding. // Set internal character encoding.
mb_internal_encoding(CHARSET); mb_internal_encoding(CHARSET);
@ -127,27 +129,23 @@ include(PATH_KERNEL.'dblanguage.class.php');
// --- LANGUAGE and LOCALE --- // --- LANGUAGE and LOCALE ---
// Language from the URI // Language from the URI
if(isset($_GET['language'])) { $languageFromHTTP = 'en_US';
$localeFromHTTP = Sanitize::html($_GET['language']); $localeFromHTTP = 'en_US';
}
else { 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 // 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']); $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 // Get language file
$Language = new dbLanguage($localeFromHTTP); $Language = new dbLanguage('en_US');
// Set locale // Set locale
setlocale(LC_ALL, $localeFromHTTP); setlocale(LC_ALL, $localeFromHTTP);
@ -345,8 +343,8 @@ function install($adminPassword, $email, $timezone)
'slogan'=>'CMS', 'slogan'=>'CMS',
'description'=>'', 'description'=>'',
'footer'=>'Copyright © '.Date::current('Y'), 'footer'=>'Copyright © '.Date::current('Y'),
'language'=>$Language->getCurrentLocale(), 'language'=>$Language->locale(),
'locale'=>$Language->getCurrentLocale(), 'locale'=>$Language->locale(),
'timezone'=>$timezone, 'timezone'=>$timezone,
'theme'=>'kernel-panic', 'theme'=>'kernel-panic',
'adminTheme'=>'default', 'adminTheme'=>'default',