From e3dbf798639359675b4d026c2ea63674d3c7804b Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 21 Jul 2019 15:10:33 +0200 Subject: [PATCH] Execute install.php after activate the theme --- bl-kernel/functions.php | 6 +- bl-plugins/api/plugin.php | 3 + bl-themes/social-network/css/style.css | 11 + bl-themes/social-network/index.php | 19 +- bl-themes/social-network/php/head.php | 3 + bl-themes/social-network/php/home.php | 69 +- bl-themes/social-network/php/page.php | 4 +- .../lightgallery/css/lg-fb-comment-box.css | 31 + .../css/lg-fb-comment-box.css.map | 7 + .../css/lg-fb-comment-box.min.css | 1 + .../lightgallery/css/lg-transitions.css | 776 ++++++++ .../lightgallery/css/lg-transitions.css.map | 7 + .../lightgallery/css/lg-transitions.min.css | 1 + .../vendors/lightgallery/css/lightgallery.css | 978 ++++++++++ .../lightgallery/css/lightgallery.css.map | 7 + .../lightgallery/css/lightgallery.min.css | 1 + .../vendors/lightgallery/fonts/lg.eot | Bin 0 -> 4024 bytes .../vendors/lightgallery/fonts/lg.svg | 47 + .../vendors/lightgallery/fonts/lg.ttf | Bin 0 -> 3880 bytes .../vendors/lightgallery/fonts/lg.woff | Bin 0 -> 3956 bytes .../vendors/lightgallery/img/loading.gif | Bin 0 -> 3801 bytes .../vendors/lightgallery/img/video-play.png | Bin 0 -> 819 bytes .../vendors/lightgallery/img/vimeo-play.png | Bin 0 -> 1482 bytes .../vendors/lightgallery/img/youtube-play.png | Bin 0 -> 2703 bytes .../vendors/lightgallery/js/lg-fullscreen.js | 131 ++ .../vendors/lightgallery/js/lg-thumbnail.js | 7 + .../vendors/lightgallery/js/lightgallery.js | 1588 +++++++++++++++++ .../lightgallery/js/lightgallery.min.js | 7 + .../vendors/lightgallery/lightgallery.js | 1 + 29 files changed, 3691 insertions(+), 14 deletions(-) create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-fb-comment-box.css create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-fb-comment-box.css.map create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-fb-comment-box.min.css create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-transitions.css create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-transitions.css.map create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lg-transitions.min.css create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lightgallery.css create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lightgallery.css.map create mode 100755 bl-themes/social-network/vendors/lightgallery/css/lightgallery.min.css create mode 100755 bl-themes/social-network/vendors/lightgallery/fonts/lg.eot create mode 100755 bl-themes/social-network/vendors/lightgallery/fonts/lg.svg create mode 100755 bl-themes/social-network/vendors/lightgallery/fonts/lg.ttf create mode 100755 bl-themes/social-network/vendors/lightgallery/fonts/lg.woff create mode 100755 bl-themes/social-network/vendors/lightgallery/img/loading.gif create mode 100755 bl-themes/social-network/vendors/lightgallery/img/video-play.png create mode 100755 bl-themes/social-network/vendors/lightgallery/img/vimeo-play.png create mode 100755 bl-themes/social-network/vendors/lightgallery/img/youtube-play.png create mode 100644 bl-themes/social-network/vendors/lightgallery/js/lg-fullscreen.js create mode 100644 bl-themes/social-network/vendors/lightgallery/js/lg-thumbnail.js create mode 100755 bl-themes/social-network/vendors/lightgallery/js/lightgallery.js create mode 100755 bl-themes/social-network/vendors/lightgallery/js/lightgallery.min.js create mode 160000 bl-themes/social-network/vendors/lightgallery/lightgallery.js diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 79ed77d8..227142d9 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -790,8 +790,8 @@ function activateTheme($themeDirectory) { global $L, $language; if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) { - if (Sanitize::pathFile(PATH_THEMES.$themeDirectory, 'install.php')) { - include_once(PATH_THEMES.$themeDirectory.'install.php'); + if (Filesystem::fileExists(PATH_THEMES.$themeDirectory.DS.'install.php')) { + include_once(PATH_THEMES.$themeDirectory.DS.'install.php'); } $site->set(array('theme'=>$themeDirectory)); @@ -839,7 +839,7 @@ function transformImage($file, $imageDir, $thumbnailDir=false) { $filename = Filesystem::filename($file); $nextFilename = Filesystem::nextFilename($imageDir, $filename); - // Move the image to a proper place and name + // Move the image to a proper place and rename $image = $imageDir.$nextFilename; Filesystem::mv($file, $image); chmod($image, 0644); diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index dead0763..b28a3d18 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -454,6 +454,9 @@ class pluginAPI extends Plugin { $thumbnailDirectory = $imageDirectory.'thumbnails'.DS; $imageEndpoint = DOMAIN_UPLOADS_PAGES.$inputs['uuid'].'/'; $thumbnailEndpoint = $imageEndpoint.'thumbnails'.'/'; + if (!Filesystem::directoryExists($thumbnailDirectory)) { + Filesystem::mkdir($thumbnailDirectory, true); + } } else { $imageDirectory = PATH_UPLOADS; $thumbnailDirectory = PATH_UPLOADS_THUMBNAILS; diff --git a/bl-themes/social-network/css/style.css b/bl-themes/social-network/css/style.css index cf313e69..41b65b72 100755 --- a/bl-themes/social-network/css/style.css +++ b/bl-themes/social-network/css/style.css @@ -80,6 +80,17 @@ blockquote { background: #EAF4FB; } +#jspreviewImages img { + width: 64px; + height: 64px; +} + +/* Image Gallery */ +.image-gallery img { + width: 120px; + margin: 0px 3px; +} + /* Navbar */ img.nav-svg-icon { width: 1rem; diff --git a/bl-themes/social-network/index.php b/bl-themes/social-network/index.php index 519fb2fc..4a7c2ea3 100755 --- a/bl-themes/social-network/index.php +++ b/bl-themes/social-network/index.php @@ -34,9 +34,6 @@ - - - + + diff --git a/bl-themes/social-network/php/head.php b/bl-themes/social-network/php/head.php index ed1a19f0..6c3cb978 100644 --- a/bl-themes/social-network/php/head.php +++ b/bl-themes/social-network/php/head.php @@ -19,6 +19,9 @@ + + + diff --git a/bl-themes/social-network/php/home.php b/bl-themes/social-network/php/home.php index 9444af59..da772f5a 100644 --- a/bl-themes/social-network/php/home.php +++ b/bl-themes/social-network/php/home.php @@ -7,9 +7,21 @@
-
+
+
+ +
+
+ + +
@@ -17,8 +29,10 @@