release 0.3
This commit is contained in:
parent
0e80faf4fa
commit
cc3bca98c4
@ -1,3 +1,7 @@
|
||||
0.3 - 2023.01.06
|
||||
* use namespace
|
||||
* use abstract plugin id
|
||||
|
||||
0.2 - 2022.11.27
|
||||
- update to Dotclear 2.24
|
||||
- add fr translation
|
||||
* update to Dotclear 2.24
|
||||
* add fr translation
|
11
_admin.php
11
_admin.php
@ -1,4 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
$admin = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Admin']);
|
||||
|
15
_define.php
15
_define.php
@ -7,9 +7,14 @@
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Crhistian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
// can not use namespace as it is included inside a class method,
|
||||
// and also can be included in third party plugins class methods.
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
@ -18,13 +23,13 @@ $this->registerModule(
|
||||
'Mail test',
|
||||
'Send a simple mail from admin',
|
||||
'Osku and contributors',
|
||||
'0.2',
|
||||
'0.3',
|
||||
[
|
||||
'requires' => [['core', '2.24']],
|
||||
'permissions' => null,
|
||||
'type' => 'plugin',
|
||||
'support' => 'https://github.com/JcDenis/testMail',
|
||||
'details' => 'https://plugins.dotaddict.org/dc2/details/testMail',
|
||||
'repository' => 'https://raw.githubusercontent.com/JcDenis/testMail/master/dcstore.xml',
|
||||
'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
|
||||
'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
|
||||
'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
|
||||
]
|
||||
);
|
||||
|
11
_prepend.php
11
_prepend.php
@ -1,4 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
$prepend = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Prepend']);
|
||||
|
@ -2,10 +2,10 @@
|
||||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="testMail">
|
||||
<name>Mail test</name>
|
||||
<version>0.2</version>
|
||||
<version>0.3</version>
|
||||
<author>Osku and contributors</author>
|
||||
<desc>Send a simple mail from admin</desc>
|
||||
<file>https://github.com/JcDenis/testMail/releases/download/v0.2/plugin-testMail.zip</file>
|
||||
<file>https://github.com/JcDenis/testMail/releases/download/v0.3/plugin-testMail.zip</file>
|
||||
<da:dcmin>2.24</da:dcmin>
|
||||
<da:details>https://plugins.dotaddict.org/dc2/details/testMail</da:details>
|
||||
<da:support>https://github.com/JcDenis/testMail</da:support>
|
||||
|
@ -1,4 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\testMail;
|
||||
@ -10,13 +21,11 @@ use dcPage;
|
||||
|
||||
class Admin
|
||||
{
|
||||
private static $name = '';
|
||||
protected static $init = false;
|
||||
|
||||
public static function init(): bool
|
||||
{
|
||||
if (defined('DC_CONTEXT_ADMIN')) {
|
||||
self::$name = __('Mail test');
|
||||
self::$init = true;
|
||||
}
|
||||
|
||||
@ -29,8 +38,8 @@ class Admin
|
||||
return false;
|
||||
}
|
||||
|
||||
dcCore::app()->menu[dcAdmin::MENU_SYSTEM]->addItem(
|
||||
self::$name,
|
||||
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||
dcCore::app()->plugins->moduleInfo(basename(__NAMESPACE__), 'name'),
|
||||
dcCore::app()->adminurl->get('admin.plugin.' . basename(__NAMESPACE__)),
|
||||
dcPage::getPF(basename(__NAMESPACE__) . '/icon.svg'),
|
||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.' . basename(__NAMESPACE__))) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Crhistian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
@ -91,13 +91,21 @@ class Manage
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function render(): void
|
||||
{
|
||||
echo '<html><head><title>' . __('Mail test') . '</title></head><body>' .
|
||||
dcPage::breadcrumb([__('System') => '', __('Mail test') => '']) .
|
||||
echo
|
||||
'<html><head><title>' .
|
||||
dcCore::app()->plugins->moduleInfo(basename(__NAMESPACE__), 'name') .
|
||||
'</title></head><body>' .
|
||||
|
||||
dcPage::breadcrumb([
|
||||
__('System') => '',
|
||||
dcCore::app()->plugins->moduleInfo(basename(__NAMESPACE__), 'name') => '',
|
||||
]) .
|
||||
dcPage::notices() . '
|
||||
|
||||
<div id="mail_testor">
|
||||
@ -127,7 +135,7 @@ class Manage
|
||||
dcCore::app()->formNonce() . '</p>' .
|
||||
'</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
</body></html>';
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\testMail;
|
||||
@ -29,7 +40,7 @@ class Prepend
|
||||
|
||||
foreach (self::LIBS as $lib) {
|
||||
Clearbricks::lib()->autoload([
|
||||
implode('\\', ['Dotclear','Plugin', basename(__NAMESAPCE__), $lib]) => __DIR__ . DIRECTORY_SEPARATOR . $lib . '.php'
|
||||
implode('\\', ['Dotclear','Plugin', basename(__NAMESPACE__), $lib]) => __DIR__ . DIRECTORY_SEPARATOR . $lib . '.php',
|
||||
]);
|
||||
}
|
||||
|
||||
|
11
index.php
11
index.php
@ -1,4 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
$manage = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Manage']);
|
||||
|
18
locales/fr/main.lang.php
Normal file
18
locales/fr/main.lang.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Dotclear
|
||||
*
|
||||
* @copyright Olivier Meunier & Association Dotclear
|
||||
* @copyright GPL-2.0-only
|
||||
*/
|
||||
#
|
||||
# DOT NOT MODIFY THIS FILE !
|
||||
#
|
||||
|
||||
l10n::$locales['You must provide a content.'] = 'Vous devez fournir un contenu.';
|
||||
l10n::$locales['Mail successuffly sent.'] = 'Mail envoyer avec succès.';
|
||||
l10n::$locales['Mailto:'] = 'Envoyer à :';
|
||||
l10n::$locales['Subject:'] = 'Sujet :';
|
||||
l10n::$locales['Active mail headers'] = 'Activer les entêtes de mail';
|
||||
l10n::$locales['Mail test'] = 'Mail test';
|
||||
l10n::$locales['Send a simple mail from admin'] = 'Envoyer un simple mail depuis l\'admin';
|
@ -1,18 +1,15 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: testMail 0.2\n"
|
||||
"Project-Id-Version: testMail 0.2.1\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2022-11-27T22:19:31+00:00\n"
|
||||
"Last-Translator: Jean-Crhistian Denis\n"
|
||||
"PO-Revision-Date: 2023-01-05T23:44:36+00:00\n"
|
||||
"Last-Translator: Jean-Christian Denis\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
msgid "Mail test"
|
||||
msgstr "Mail test"
|
||||
|
||||
msgid "You must provide a content."
|
||||
msgstr "Vous devez fournir un contenu."
|
||||
|
||||
@ -28,3 +25,9 @@ msgstr "Sujet :"
|
||||
msgid "Active mail headers"
|
||||
msgstr "Activer les entêtes de mail"
|
||||
|
||||
msgid "Mail test"
|
||||
msgstr "Mail test"
|
||||
|
||||
msgid "Send a simple mail from admin"
|
||||
msgstr "Envoyer un simple mail depuis l'admin"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user