From 453b36e962b56e118137be2d75b737163c8a94f2 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 2 Sep 2021 23:01:31 +0200 Subject: [PATCH] clean up and release --- CHANGELOG.md | 8 ++++++-- README.md | 14 +++++++------- _admin.php | 24 ++++++++++++------------ _define.php | 35 +++++++++++++++++++++-------------- _prepend.php | 22 +++++++++++----------- _public.php | 32 ++++++++++++++++---------------- dcstore.xml | 11 +++++++++++ locales/fr/main.lang.php | 4 +--- 8 files changed, 85 insertions(+), 65 deletions(-) create mode 100644 dcstore.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c58d0..730025a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ -simplyFavicon 2021.08.18 +2021.09.02 +- clean up code +- add dcstore.xml pre-release file + +2021.08.18 * update license -simplyFavicon 2011.04.08 +2011.04.08 * first version \ No newline at end of file diff --git a/README.md b/README.md index 4c0b9f9..eea68e2 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,22 @@ ## WHAT IS simplyFavicon ? -simplyFavicon is a plugin for the open-source +_simplyFavicon_ is a plugin for the open-source web publishing software called Dotclear. -. +It adds a favicon to your blog. ## REQUIREMENTS - simplyFavicon requires: +_simplyFavicon_ requires: - * Administrator permissions - * Dotclear 2.18 - * A readable public directory. + * Administrator permissions + * Dotclear 2.19 + * A readable public directory. ## USAGE -First install simplyFavicon, manualy from a zip package or from +First install _simplyFavicon_, manualy from a zip package or from Dotaddict repository. (See Dotclear's documentation to know how do this) Add un file called ''favicon.xxx'' where xxx could be ico, jpg, png, diff --git a/_admin.php b/_admin.php index fe9b773..b424947 100644 --- a/_admin.php +++ b/_admin.php @@ -1,15 +1,15 @@ ' . ''; } - + public static function adminBeforeBlogSettingsUpdate($blog_settings) { $blog_settings->system->put('simply_favicon', !empty($_POST['simply_favicon'])); diff --git a/_define.php b/_define.php index 5fb087e..3cf0583 100644 --- a/_define.php +++ b/_define.php @@ -1,24 +1,31 @@ registerModule( "Simply favicon", "Multi-agents favicon", "Jean-Christian Denis", - '2021.08.18', - 'admin' + '2021.09.02', + [ + 'requires' => [['core', '2.19']], + 'permissions' => 'admin', + 'type' => 'plugin', + 'support' => 'https://github.com/JcDenis/simplyFavicon', + 'details' => 'http://plugins.dotaddict.org/dc2/details/simplyFavicon', + 'repository' => 'https://raw.githubusercontent.com/JcDenis/simplyFavicon/master/dcstore.xml' + ] ); \ No newline at end of file diff --git a/_prepend.php b/_prepend.php index 31ae496..0a9e229 100644 --- a/_prepend.php +++ b/_prepend.php @@ -1,15 +1,15 @@ 'image/jpeg', 'mng' => 'video/x-mng' ); - + public static function simplyFaviconUrl($arg) { global $core; - + $mimetypes = self::$mimetypes; $public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.'; @@ -48,17 +48,17 @@ class publicSimplyFavicon extends dcUrlHandlers exit; } } - + public static function publicHeadContent($core) { if (!$core->blog->settings->system->simply_favicon){ return; } - + $mimetypes = self::$mimetypes; $public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.'; $public_url = $core->blog->url.$core->url->getBase('simplyFavicon') . '.'; - + // ico : IE6 if (file_exists($public_path . 'ico') && '?' != substr($core->blog->url, -1)) { echo diff --git a/dcstore.xml b/dcstore.xml new file mode 100644 index 0000000..dcbdb3b --- /dev/null +++ b/dcstore.xml @@ -0,0 +1,11 @@ + + +Simply favicon +2021.09.02 +Jean-Christian Denis +Multi-agents favicon +https://github.com/JcDenis/simplyFavicon/releases/download/v2021.09.02/plugin-simplyFavicon.zip +http://plugins.dotaddict.org/dc2/details/simplyFavicon +https://github.com/JcDenis/simplyFavicon + + \ No newline at end of file diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index 476eb4d..829eb4d 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -8,6 +8,4 @@ $GLOBALS['__l10n']['Enable "Simply favicon" extension'] = 'Activer l\'extension "Simply favicon"'; #_admin.php:28 -$GLOBALS['__l10n']['You must place an image called favicon.png or .jpg or .ico into your blog\'s public directory.'] = 'Vous devez placer une image nommée favicon.png, .jpg ou .ico dans le répertoire publique du blog.'; - -?> \ No newline at end of file +$GLOBALS['__l10n']['You must place an image called favicon.png or .jpg or .ico into your blog\'s public directory.'] = 'Vous devez placer une image nommée favicon.png, .jpg ou .ico dans le répertoire publique du blog.'; \ No newline at end of file