Débugage, testé sur dc2.5 et 2.6
This commit is contained in:
parent
d1748a0887
commit
13d59a0c91
6 changed files with 19 additions and 22 deletions
|
@ -1,14 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
/* -- BEGIN LICENSE BLOCK ----------------------------------
|
/* -- BEGIN LICENSE BLOCK ----------------------------------
|
||||||
#
|
#
|
||||||
# This file is part of Categories Page, a plugin for Dotclear 2.
|
# This file is part of Categories Page, a plugin for Dotclear 2.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 Adjaya and contributors
|
# Copyright (c) 2013 Pierre Van Glabeke, Bernard Le Roux
|
||||||
# Licensed under the GPL version 2.0 license.
|
# Licensed under the GPL version 2.0 license.
|
||||||
# See LICENSE file or
|
# See LICENSE file or
|
||||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
#
|
#
|
||||||
# -- END LICENSE BLOCK ------------------------------------*/
|
# -- END LICENSE BLOCK ------------------------------------ */
|
||||||
if (!defined('DC_RC_PATH')) {
|
if (!defined('DC_RC_PATH')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,14 @@ CategoriesPage
|
||||||
|
|
||||||
CategoriesPage est un plugin pour [Dotclear] (http://fr.dotclear.org/).
|
CategoriesPage est un plugin pour [Dotclear] (http://fr.dotclear.org/).
|
||||||
|
|
||||||
Ce plugin ajoute un widget permettant d'accèder à la liste des catégories.
|
Ce plugin ajoute un widget permettant d'accèder à une page listant les catégories.
|
||||||
|
|
||||||
Ce plugin est basé sur le plugin [CategoriesMode] (http://plugins.dotaddict.org/dc2/details/categoriesMode) de Adjaya, Pierre Van Glabeke.
|
Ce plugin est basé sur le plugin [CategoriesMode] (http://plugins.dotaddict.org/dc2/details/categoriesMode) de Adjaya, Pierre Van Glabeke.
|
||||||
|
|
||||||
Compatibilité
|
Compatibilité
|
||||||
============
|
============
|
||||||
|
|
||||||
Ce plugin a été testé avec les versions 2.5 et 2.6 de [Dotclear] (http://fr.dotclear.org/).
|
Ce plugin a été testé avec les versions 2.5 et 2.6 de [Dotclear] (http://fr.dotclear.org/).
|
||||||
|
|
||||||
Auteurs
|
Auteurs
|
||||||
=======
|
=======
|
||||||
|
|
|
@ -20,7 +20,7 @@ class publicCategoriesPage {
|
||||||
public static function main() {
|
public static function main() {
|
||||||
|
|
||||||
$core = $GLOBALS['core'];
|
$core = $GLOBALS['core'];
|
||||||
require_once '/_widgets.php';
|
require_once '_widgets.php';
|
||||||
|
|
||||||
// Adds news Categories' templates tags :
|
// Adds news Categories' templates tags :
|
||||||
$tpl = $core->tpl;
|
$tpl = $core->tpl;
|
||||||
|
|
|
@ -42,7 +42,7 @@ class widgetsCategoriesPage {
|
||||||
if ($widget->class) {
|
if ($widget->class) {
|
||||||
$class = html::escapeHTML($widget->class);
|
$class = html::escapeHTML($widget->class);
|
||||||
}
|
}
|
||||||
if ( $widget->content_only) {
|
if ( !$widget->content_only) {
|
||||||
$divB = '<div class="categories '. $class . '">';
|
$divB = '<div class="categories '. $class . '">';
|
||||||
$divE = '</div>';
|
$divE = '</div>';
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class widgetsCategoriesPage {
|
||||||
$title = '<h2>' . html::escapeHTML($widget->title) . '</h2>';
|
$title = '<h2>' . html::escapeHTML($widget->title) . '</h2>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $divB .
|
return $divB . $title .
|
||||||
'<ul><li><strong><a href="' .
|
'<ul><li><strong><a href="' .
|
||||||
$core->blog->url . $core->url->getBase("categories") . '">' .
|
$core->blog->url . $core->url->getBase("categories") . '">' .
|
||||||
__('All categories') .
|
__('All categories') .
|
||||||
|
@ -59,7 +59,7 @@ class widgetsCategoriesPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function initWidgets($widget) {
|
public static function initWidgets($widget) {
|
||||||
$text = __('Categories page');
|
$text = __('Categories Page');
|
||||||
$widget->create('CategoriesPage', $text, array('widgetsCategoriesPage', 'categoriesPageWidgets'));
|
$widget->create('CategoriesPage', $text, array('widgetsCategoriesPage', 'categoriesPageWidgets'));
|
||||||
$categoriesPage = $widget->CategoriesPage;
|
$categoriesPage = $widget->CategoriesPage;
|
||||||
$categoriesPage->setting('title', __('Title:'), $text, 'text');
|
$categoriesPage->setting('title', __('Title:'), $text, 'text');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
|
<meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
|
||||||
|
|
||||||
<title>{{tpl:lang Categories page}} - {{tpl:BlogName encode_html="1"}}</title>
|
<title>{{tpl:lang Categories Page}} - {{tpl:BlogName encode_html="1"}}</title>
|
||||||
<meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
|
<meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
|
||||||
<meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
|
<meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
|
||||||
<meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
|
<meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<div id="content-info">
|
<div id="content-info">
|
||||||
<h2>{{tpl:lang Categories}} :</h2>
|
<h2>{{tpl:lang Categories}}</h2>
|
||||||
|
|
||||||
<tpl:Categories>
|
<tpl:Categories>
|
||||||
<h3><a href="{{tpl:CategoryURL}}">{{tpl:CategoryTitle encode_html="1"}}</a> ({{tpl:CategoryCount}})</h3>
|
<h3><a href="{{tpl:CategoryURL}}">{{tpl:CategoryTitle encode_html="1"}}</a> ({{tpl:CategoryCount}})</h3>
|
||||||
|
@ -75,4 +75,4 @@
|
||||||
{{tpl:include src="_footer.html"}}
|
{{tpl:include src="_footer.html"}}
|
||||||
</div> <!-- End #page -->
|
</div> <!-- End #page -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -19,8 +19,5 @@ msgstr "Toutes les catégories"
|
||||||
msgid "Categories Page"
|
msgid "Categories Page"
|
||||||
msgstr "Page des catégories"
|
msgstr "Page des catégories"
|
||||||
|
|
||||||
msgid "Enable Categories Pode"
|
|
||||||
msgstr "Activer la page des catégories"
|
|
||||||
|
|
||||||
msgid "Categories"
|
msgid "Categories"
|
||||||
msgstr "Catégories"
|
msgstr "Catégories"
|
||||||
|
|
Loading…
Reference in a new issue