From e7309942c0813872b76d3e128b57a9398d816e9c Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 1 May 2023 01:15:19 +0200 Subject: [PATCH] release 1.6 (fix #1) --- CHANGELOG.md | 8 ++++++ README.md | 13 ++++++++++ _define.php | 5 ++-- dcstore.xml | 4 +-- locales/fr/main.lang.php | 53 ++++++++++++++++++++-------------------- 5 files changed, 52 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c6a9dd..0ab9381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +1.6 - 2023.05.01 +- require dotclear 2.26 +- use behavior intead of urlHandler (see README) +- fix URL before saving (without blog URL) +- add option for visible redirection +- add plugin Uninstaller features +- change table structure (for redirect option) + 1.5.1 - 2023.04.09 - require dotclear 2.26 - use sql statement diff --git a/README.md b/README.md index 3cf52bc..6a71fee 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,19 @@ Dotaddict repository. (See Dotclear's documentation to know how do this) You can manage your aliases from menu ''Alias'' on admin dashboard sidebar. +## RULES + +Only blog URLs can be redirected. +It can redirect a specific URL "plop" to another one "post/2023/04/24/my-post". +It can redirect all URLs that content "plop" using alias "/plop/" +by replacing it by destination "post" into requesting URL. +It can not redirect an alias to another alias. (Even if it's not at the begining of the URL!) +It has priority on all ohters URLs handlers, so if you create an alias of an existing page, +the destination from plugin _alias_ will be used. + +Keep in mind, plugin _alias_ loads all registered aliases to test them on each page load, +so more there are aliases, more page load is slow. + ## LINKS * License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html) diff --git a/_define.php b/_define.php index a69bda9..87def12 100644 --- a/_define.php +++ b/_define.php @@ -10,7 +10,7 @@ * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -if (!defined('DC_RC_PATH')) { +if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) { return null; } @@ -18,13 +18,14 @@ $this->registerModule( 'alias', "Create aliases of your blog's URLs", 'Olivier Meunier and contributors', - '1.5.1', + '1.6', [ 'requires' => [['core', '2.26']], 'permissions' => dcCore::app()->auth->makePermissions([ dcCore::app()->auth::PERMISSION_ADMIN, ]), 'type' => 'plugin', + 'priority' => 2, 'support' => 'https://github.com/JcDenis/alias', 'details' => 'https://plugins.dotaddict.org/dc2/details/alias', 'repository' => 'https://raw.githubusercontent.com/JcDenis/alias/master/dcstore.xml', diff --git a/dcstore.xml b/dcstore.xml index 7ae145f..224b7ac 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,10 +2,10 @@ alias - 1.5.1 + 1.6 Olivier Meunier and contributors Create aliases of your blog's URLs - https://github.com/JcDenis/alias/releases/download/v1.5.1/plugin-alias.zip + https://github.com/JcDenis/alias/releases/download/v1.6/plugin-alias.zip 2.26 https://plugins.dotaddict.org/dc2/details/alias https://github.com/JcDenis/alias diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index f7aaea2..e4b7363 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -1,37 +1,36 @@