Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Changed extensions placeholder image to extension.svg

givanz9e1e5c1a4c1e
diff --git a/system/extensions/extensions.php b/system/extensions/extensions.php
index 4cd6fd9..50aa0b1 100755
--- a/system/extensions/extensions.php
+++ b/system/extensions/extensions.php
@@ -50,7 +50,7 @@ abstract class Extensions {
if (preg_match_all(static :: KEY_VALUE_REGEX, $comments, $matches)) {
$matches[1] = array_map(function ($key) {
- return str_replace(' ','-',strtolower($key));
+ return str_replace(' ','-',strtolower(trim($key)));
}, $matches[1]);
$results = array_combine($matches[1], $matches[2]);
diff --git a/system/extensions/plugins.php b/system/extensions/plugins.php
index 4ecfb89..a07521c 100755
--- a/system/extensions/plugins.php
+++ b/system/extensions/plugins.php
@@ -56,7 +56,7 @@ class Plugins extends Extensions {
file_exists(DIR_PUBLIC . ($file = 'plugins/' . $name . '/' . $params['thumb']))) {
$params['thumb_url'] = PUBLIC_PATH . $file;
} else {
- $params['thumb_url'] = PUBLIC_PATH . 'media/placeholder.svg';
+ $params['thumb_url'] = PUBLIC_PATH . 'media/extension.svg';
}
return $params;
diff --git a/system/extensions/themes.php b/system/extensions/themes.php
index 935426e..c2a4610 100755
--- a/system/extensions/themes.php
+++ b/system/extensions/themes.php
@@ -59,6 +59,9 @@ class Themes extends Extensions {
$dir = Str::match('@(.+)/[a-z]+.\w+$@', $file);
$themeConfig = $dir . DS . 'theme.php';
+ if ($folder == 'default') {
+ continue;
+ }
$theme = [];
$theme['file'] = $file;
$theme['folder'] = $folder;
@@ -72,7 +75,7 @@ class Themes extends Extensions {
}
$theme['name'] = $theme['name'] ?? ucfirst($theme['folder']);
- $theme['screenshot'] = $theme['screenshot'] ?? '/../media/placeholder.svg';
+ $theme['screenshot'] = $theme['screenshot'] ?? (file_exists($dir . DS . 'screenshot.png') ? PUBLIC_PATH . 'themes/' . $folder . '/screenshot.png' : '/../media/extension.svg');
$themes[$folder] = $theme;