clean up and release
This commit is contained in:
parent
e9274e5b43
commit
453b36e962
@ -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
|
* update license
|
||||||
|
|
||||||
simplyFavicon 2011.04.08
|
2011.04.08
|
||||||
* first version
|
* first version
|
14
README.md
14
README.md
@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
## WHAT IS simplyFavicon ?
|
## WHAT IS simplyFavicon ?
|
||||||
|
|
||||||
simplyFavicon is a plugin for the open-source
|
_simplyFavicon_ is a plugin for the open-source
|
||||||
web publishing software called Dotclear.
|
web publishing software called Dotclear.
|
||||||
|
|
||||||
.
|
It adds a favicon to your blog.
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
simplyFavicon requires:
|
_simplyFavicon_ requires:
|
||||||
|
|
||||||
* Administrator permissions
|
* Administrator permissions
|
||||||
* Dotclear 2.18
|
* Dotclear 2.19
|
||||||
* A readable public directory.
|
* A readable public directory.
|
||||||
|
|
||||||
## USAGE
|
## 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)
|
Dotaddict repository. (See Dotclear's documentation to know how do this)
|
||||||
|
|
||||||
Add un file called ''favicon.xxx'' where xxx could be ico, jpg, png,
|
Add un file called ''favicon.xxx'' where xxx could be ico, jpg, png,
|
||||||
|
24
_admin.php
24
_admin.php
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
/**
|
||||||
#
|
* @brief simplyFavicon, a plugin for Dotclear 2
|
||||||
# This file is part of simplyFavicon, a plugin for Dotclear 2.
|
*
|
||||||
#
|
* @package Dotclear
|
||||||
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
|
* @subpackage Plugin
|
||||||
#
|
*
|
||||||
# Licensed under the GPL version 2.0 license.
|
* @author Jean-Christian Denis
|
||||||
# A copy of this license is available in LICENSE file or at
|
*
|
||||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* @copyright Jean-Christian Denis
|
||||||
#
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
# -- END LICENSE BLOCK ------------------------------------
|
*/
|
||||||
|
|
||||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||||
return;
|
return;
|
||||||
@ -32,7 +32,7 @@ class adminSimplyFavicon
|
|||||||
'</p>' .
|
'</p>' .
|
||||||
'</div>';
|
'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function adminBeforeBlogSettingsUpdate($blog_settings)
|
public static function adminBeforeBlogSettingsUpdate($blog_settings)
|
||||||
{
|
{
|
||||||
$blog_settings->system->put('simply_favicon', !empty($_POST['simply_favicon']));
|
$blog_settings->system->put('simply_favicon', !empty($_POST['simply_favicon']));
|
||||||
|
35
_define.php
35
_define.php
@ -1,24 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
/**
|
||||||
#
|
* @brief simplyFavicon, a plugin for Dotclear 2
|
||||||
# This file is part of simplyFavicon, a plugin for Dotclear 2.
|
*
|
||||||
#
|
* @package Dotclear
|
||||||
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
|
* @subpackage Plugin
|
||||||
#
|
*
|
||||||
# Licensed under the GPL version 2.0 license.
|
* @author Jean-Christian Denis
|
||||||
# A copy of this license is available in LICENSE file or at
|
*
|
||||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* @copyright Jean-Christian Denis
|
||||||
#
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
# -- END LICENSE BLOCK ------------------------------------
|
*/
|
||||||
|
|
||||||
if (!defined('DC_RC_PATH')){
|
if (!defined('DC_RC_PATH')){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->registerModule(
|
$this->registerModule(
|
||||||
"Simply favicon",
|
"Simply favicon",
|
||||||
"Multi-agents favicon",
|
"Multi-agents favicon",
|
||||||
"Jean-Christian Denis",
|
"Jean-Christian Denis",
|
||||||
'2021.08.18',
|
'2021.09.02',
|
||||||
'admin'
|
[
|
||||||
|
'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'
|
||||||
|
]
|
||||||
);
|
);
|
22
_prepend.php
22
_prepend.php
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
/**
|
||||||
#
|
* @brief simplyFavicon, a plugin for Dotclear 2
|
||||||
# This file is part of simplyFavicon, a plugin for Dotclear 2.
|
*
|
||||||
#
|
* @package Dotclear
|
||||||
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
|
* @subpackage Plugin
|
||||||
#
|
*
|
||||||
# Licensed under the GPL version 2.0 license.
|
* @author Jean-Christian Denis
|
||||||
# A copy of this license is available in LICENSE file or at
|
*
|
||||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* @copyright Jean-Christian Denis
|
||||||
#
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
# -- END LICENSE BLOCK ------------------------------------
|
*/
|
||||||
|
|
||||||
if (!defined('DC_RC_PATH')){
|
if (!defined('DC_RC_PATH')){
|
||||||
return;
|
return;
|
||||||
|
32
_public.php
32
_public.php
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
/**
|
||||||
#
|
* @brief simplyFavicon, a plugin for Dotclear 2
|
||||||
# This file is part of simplyFavicon, a plugin for Dotclear 2.
|
*
|
||||||
#
|
* @package Dotclear
|
||||||
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
|
* @subpackage Plugin
|
||||||
#
|
*
|
||||||
# Licensed under the GPL version 2.0 license.
|
* @author Jean-Christian Denis
|
||||||
# A copy of this license is available in LICENSE file or at
|
*
|
||||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* @copyright Jean-Christian Denis
|
||||||
#
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
# -- END LICENSE BLOCK ------------------------------------
|
*/
|
||||||
|
|
||||||
if (!defined('DC_RC_PATH')){
|
if (!defined('DC_RC_PATH')){
|
||||||
return;
|
return;
|
||||||
@ -27,11 +27,11 @@ class publicSimplyFavicon extends dcUrlHandlers
|
|||||||
'jpg' => 'image/jpeg',
|
'jpg' => 'image/jpeg',
|
||||||
'mng' => 'video/x-mng'
|
'mng' => 'video/x-mng'
|
||||||
);
|
);
|
||||||
|
|
||||||
public static function simplyFaviconUrl($arg)
|
public static function simplyFaviconUrl($arg)
|
||||||
{
|
{
|
||||||
global $core;
|
global $core;
|
||||||
|
|
||||||
$mimetypes = self::$mimetypes;
|
$mimetypes = self::$mimetypes;
|
||||||
$public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.';
|
$public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.';
|
||||||
|
|
||||||
@ -48,17 +48,17 @@ class publicSimplyFavicon extends dcUrlHandlers
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function publicHeadContent($core)
|
public static function publicHeadContent($core)
|
||||||
{
|
{
|
||||||
if (!$core->blog->settings->system->simply_favicon){
|
if (!$core->blog->settings->system->simply_favicon){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mimetypes = self::$mimetypes;
|
$mimetypes = self::$mimetypes;
|
||||||
$public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.';
|
$public_path = path::real(path::fullFromRoot($core->blog->settings->system->public_path, DC_ROOT)) . '/favicon.';
|
||||||
$public_url = $core->blog->url.$core->url->getBase('simplyFavicon') . '.';
|
$public_url = $core->blog->url.$core->url->getBase('simplyFavicon') . '.';
|
||||||
|
|
||||||
// ico : IE6
|
// ico : IE6
|
||||||
if (file_exists($public_path . 'ico') && '?' != substr($core->blog->url, -1)) {
|
if (file_exists($public_path . 'ico') && '?' != substr($core->blog->url, -1)) {
|
||||||
echo
|
echo
|
||||||
|
11
dcstore.xml
Normal file
11
dcstore.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
|
<module id="simplyFavicon">
|
||||||
|
<name>Simply favicon</name>
|
||||||
|
<version>2021.09.02</version>
|
||||||
|
<author>Jean-Christian Denis</author>
|
||||||
|
<desc>Multi-agents favicon</desc>
|
||||||
|
<file>https://github.com/JcDenis/simplyFavicon/releases/download/v2021.09.02/plugin-simplyFavicon.zip</file>
|
||||||
|
<da:details>http://plugins.dotaddict.org/dc2/details/simplyFavicon</da:details>
|
||||||
|
<da:support>https://github.com/JcDenis/simplyFavicon</da:support>
|
||||||
|
</module>
|
||||||
|
</modules>
|
@ -8,6 +8,4 @@
|
|||||||
$GLOBALS['__l10n']['Enable "Simply favicon" extension'] = 'Activer l\'extension "Simply favicon"';
|
$GLOBALS['__l10n']['Enable "Simply favicon" extension'] = 'Activer l\'extension "Simply favicon"';
|
||||||
|
|
||||||
#_admin.php:28
|
#_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.';
|
$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.';
|
||||||
|
|
||||||
?>
|
|
Loading…
Reference in New Issue
Block a user