From 8221fbb40b3765810d15792f66a2d412d4a5d0f3 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 3 Oct 2018 00:19:19 +0200 Subject: [PATCH] remove cover image function, search plugin improvments, add search to theme alternative, tinymce css content --- bl-kernel/admin/views/edit-content.php | 8 ++++++++ bl-kernel/admin/views/new-content.php | 10 +++++++++- bl-kernel/helpers/theme.class.php | 17 +++++++++++------ bl-kernel/js/variables.php | 1 + bl-kernel/site.class.php | 6 ++---- bl-plugins/search/plugin.php | 4 ++-- bl-plugins/tinymce/css/bludit.css | 9 ++++++++- bl-themes/alternative/php/home.php | 16 +++++++++++++++- bl-themes/alternative/php/navbar.php | 4 +++- bl-themes/blogx/php/home.php | 2 +- bl-themes/blogx/php/navbar.php | 2 +- 11 files changed, 61 insertions(+), 18 deletions(-) diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index f2290a9b..362dc0dd 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -116,6 +116,9 @@ ?> coverImagePreview +
+ +
$L->g('External Cover image'))); @@ -406,6 +409,11 @@ $(document).ready(function() { $("#jscoverImage").val( $(this).val() ); }); + $("#jsbuttonRemoveCoverImage").on("click", function() { + $("#jscoverImage").val(''); + $("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg'); + }); + // Autosave interval // Autosave works when the content of the page is bigger than 100 characters setInterval(function() { diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 627b932a..736093a5 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -63,7 +63,7 @@
- +
@@ -92,6 +92,9 @@ coverImagePreview +
+ +
$L->g('External Cover Image'))); @@ -350,6 +353,11 @@ $(document).ready(function() { $("#jscoverImage").val( $(this).val() ); }); + $("#jsbuttonRemoveCoverImage").on("click", function() { + $("#jscoverImage").val(''); + $("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg'); + }); + // Generate slug when the user type the title $("#jstitle").keyup(function() { var text = $(this).val(); diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index f994f788..a39e63a8 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -42,12 +42,17 @@ class Theme { return false; } + // Returns the absolute URL of the site + // Ex. https://example.com the method returns https://example.com/ + // Ex. https://example.com/bludit/ the method returns https://example.com/bludit/ public static function siteUrl() { - global $site; - return $site->url(); + return DOMAIN_BASE; } + // Returns the absolute URL of admin panel + // Ex. https://example.com/admin/ the method returns https://example.com/admin/ + // Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/ public static function adminUrl() { return DOMAIN_ADMIN; @@ -180,7 +185,7 @@ class Theme { $scripts = ''; foreach($files as $file) { - $scripts .= ''.PHP_EOL; + $scripts .= ''.PHP_EOL; } return $scripts; @@ -214,12 +219,12 @@ class Theme { public static function jquery() { - return ''.PHP_EOL; + return ''.PHP_EOL; } public static function jsBootstrap() { - return ''.PHP_EOL; + return ''.PHP_EOL; } public static function cssBootstrap() @@ -230,7 +235,7 @@ class Theme { public static function jsSortable() { // https://github.com/psfpro/bootstrap-html5sortable - return ''.PHP_EOL; + return ''.PHP_EOL; } } diff --git a/bl-kernel/js/variables.php b/bl-kernel/js/variables.php index 2f3fc185..8d29dde2 100644 --- a/bl-kernel/js/variables.php +++ b/bl-kernel/js/variables.php @@ -3,6 +3,7 @@ echo 'var HTML_PATH_ROOT = "'.HTML_PATH_ROOT.'";'.PHP_EOL; echo 'var HTML_PATH_ADMIN_ROOT = "'.HTML_PATH_ADMIN_ROOT.'";'.PHP_EOL; echo 'var HTML_PATH_ADMIN_THEME = "'.HTML_PATH_ADMIN_THEME.'";'.PHP_EOL; +echo 'var HTML_PATH_ADMIN_THEME_IMG = "'.HTML_PATH_ADMIN_THEME_IMG.'";'.PHP_EOL; echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL; echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL; echo 'var PARENT = "'.PARENT.'";'.PHP_EOL; diff --git a/bl-kernel/site.class.php b/bl-kernel/site.class.php index 93d9949c..e3408faf 100644 --- a/bl-kernel/site.class.php +++ b/bl-kernel/site.class.php @@ -96,15 +96,13 @@ class Site extends dbJSON { return false; } - // Returns the URL of the rss.xml file - // You need to have enabled the plugin RSS + // DEPRECATED in v3.0, use Theme::rssUrl() public function rss() { return DOMAIN_BASE.'rss.xml'; } - // Returns the URL of the sitemap.xml file - // You need to have enabled the plugin Sitemap + // DEPRECATED in v3.0, use Theme::sitemapUrl() public function sitemap() { return DOMAIN_BASE.'sitemap.xml'; diff --git a/bl-plugins/search/plugin.php b/bl-plugins/search/plugin.php index dd64c234..6ee70fa8 100644 --- a/bl-plugins/search/plugin.php +++ b/bl-plugins/search/plugin.php @@ -38,8 +38,8 @@ class pluginSearch extends Plugin { $html .= '

'.$this->getValue('label').'

'; $html .= '
'; $html .= ' '; - $html .= ''; - $html .= '
'; + $html .= ''; + $html .= ''; $html .= ''; return $html; diff --git a/bl-plugins/tinymce/css/bludit.css b/bl-plugins/tinymce/css/bludit.css index 137b0e0f..f82bbfba 100644 --- a/bl-plugins/tinymce/css/bludit.css +++ b/bl-plugins/tinymce/css/bludit.css @@ -1,5 +1,5 @@ body { - padding: 10px 10%; + padding: 10px 5%; font-size: 16px; } @@ -23,4 +23,11 @@ body { .mce-content-body h6, .mce-content-body ul { line-height: 1.5em; +} + +.mce-content-body blockquote p { + padding: 10px 20px; + margin: 0 0 20px; + border-left: 5px solid #eee; + font-style: italic; } \ No newline at end of file diff --git a/bl-themes/alternative/php/home.php b/bl-themes/alternative/php/home.php index 1dcd797f..4923d77f 100644 --- a/bl-themes/alternative/php/home.php +++ b/bl-themes/alternative/php/home.php @@ -8,6 +8,20 @@ description()): ?>

description(); ?>

+ + + +
+ + + +
+ @@ -58,7 +72,7 @@ 1): ?>
  • - Home + Home
  • diff --git a/bl-themes/alternative/php/navbar.php b/bl-themes/alternative/php/navbar.php index 28990d69..e7759c2e 100644 --- a/bl-themes/alternative/php/navbar.php +++ b/bl-themes/alternative/php/navbar.php @@ -1,12 +1,13 @@ diff --git a/bl-themes/blogx/php/home.php b/bl-themes/blogx/php/home.php index 8e4e757e..4312f96b 100644 --- a/bl-themes/blogx/php/home.php +++ b/bl-themes/blogx/php/home.php @@ -51,7 +51,7 @@
  • - Home + Home
  • diff --git a/bl-themes/blogx/php/navbar.php b/bl-themes/blogx/php/navbar.php index 7fae066c..a952e6ce 100644 --- a/bl-themes/blogx/php/navbar.php +++ b/bl-themes/blogx/php/navbar.php @@ -1,6 +1,6 @@