From 23ea0fe6e4c67fede8da60df795298d4e2253fc6 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 7 Oct 2018 23:11:49 +0200 Subject: [PATCH] bug fix when insert image and cover images --- bl-kernel/admin/themes/booty/html/media.php | 19 ++++++++------ .../{delete-file.php => delete-image.php} | 25 +++++++++++++------ bl-kernel/ajax/get-published.php | 21 +++++++++++----- bl-plugins/search/languages/en.json | 2 +- bl-plugins/search/languages/es.json | 7 ++++++ bl-plugins/search/metadata.json | 2 +- bl-plugins/search/plugin.php | 4 +-- bl-plugins/tinymce/plugin.php | 4 +-- 8 files changed, 58 insertions(+), 26 deletions(-) rename bl-kernel/ajax/{delete-file.php => delete-image.php} (50%) create mode 100644 bl-plugins/search/languages/es.json diff --git a/bl-kernel/admin/themes/booty/html/media.php b/bl-kernel/admin/themes/booty/html/media.php index 6d18ad04..cea2d8ad 100644 --- a/bl-kernel/admin/themes/booty/html/media.php +++ b/bl-kernel/admin/themes/booty/html/media.php @@ -2,12 +2,16 @@ // Preload the first 10 files to not call via AJAX when the user open the first time the media manager if (IMAGE_RESTRICT) { $imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.$uuid.'/'); + $imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.$uuid.'/'); $thumbnailDirectory = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS; $thumbnailHTML = HTML_PATH_UPLOADS_PAGES.$uuid.'/thumbnails/'; + $thumbnailURL = DOMAIN_UPLOADS_PAGES.$uuid.'/thumbnails/'; } else { $imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS); + $imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS); $thumbnailDirectory = PATH_UPLOADS_THUMBNAILS; $thumbnailHTML = HTML_PATH_UPLOADS_THUMBNAILS; + $thumbnailURL = DOMAIN_UPLOADS_THUMBNAILS; } $listOfFilesByPage = Filesystem::listFiles($thumbnailDirectory, '*', '*', $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES']); $preLoadFiles = array(); @@ -99,15 +103,15 @@ function displayFiles(files) { cleanFiles(); // Regenerate the table $.each(files, function(key, filename) { - var thumbnail = ""+filename; - var path = ""; + var thumbnail = ""+filename; + var image = ""+filename; tableRow = ''+ '200x200<\/td>'+ ''+ '
'+filename+'<\/div>'+ '
'+ - '