pff
This commit is contained in:
parent
48a317e5bd
commit
9e07b6ebd5
1 changed files with 2 additions and 11 deletions
13
_public.php
13
_public.php
|
@ -18,7 +18,6 @@ publicCategoriesPage::main();
|
||||||
class publicCategoriesPage {
|
class publicCategoriesPage {
|
||||||
|
|
||||||
public static function main() {
|
public static function main() {
|
||||||
|
|
||||||
$core = $GLOBALS['core'];
|
$core = $GLOBALS['core'];
|
||||||
require_once __DIR__.'/_widgets.php';
|
require_once __DIR__.'/_widgets.php';
|
||||||
|
|
||||||
|
@ -33,21 +32,16 @@ class publicCategoriesPage {
|
||||||
// compatibilité avec Breadcrumb
|
// compatibilité avec Breadcrumb
|
||||||
$core->addBehavior('publicBreadcrumb', array('extCategoriesPage', 'publicBreadcrumb'));
|
$core->addBehavior('publicBreadcrumb', array('extCategoriesPage', 'publicBreadcrumb'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class tplCategories {
|
class tplCategories {
|
||||||
/*
|
// Use tag : {{tpl:CategoryCount}}
|
||||||
Use tag : {{tpl:CategoryCount}}
|
|
||||||
*/
|
|
||||||
public static function CategoryCount($attr) {
|
public static function CategoryCount($attr) {
|
||||||
$f = $GLOBALS['core']->tpl->getFilters($attr);
|
$f = $GLOBALS['core']->tpl->getFilters($attr);
|
||||||
return
|
return
|
||||||
'<?php echo ' . sprintf($f, '$_ctx->categories->nb_post') . '; ?>';
|
'<?php echo ' . sprintf($f, '$_ctx->categories->nb_post') . '; ?>';
|
||||||
}
|
}
|
||||||
/*
|
// Use tag : {{tpl:CategoriesURL}}
|
||||||
Use tag : {{tpl:CategoriesURL}}
|
|
||||||
*/
|
|
||||||
public static function CategoriesURL($attr) {
|
public static function CategoriesURL($attr) {
|
||||||
$f = $GLOBALS['core']->tpl->getFilters($attr);
|
$f = $GLOBALS['core']->tpl->getFilters($attr);
|
||||||
return
|
return
|
||||||
|
@ -56,7 +50,6 @@ class tplCategories {
|
||||||
}
|
}
|
||||||
|
|
||||||
class behaviorCategoriesPage {
|
class behaviorCategoriesPage {
|
||||||
|
|
||||||
public static function addTplPath($core) {
|
public static function addTplPath($core) {
|
||||||
$tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset');
|
$tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset');
|
||||||
if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) {
|
if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) {
|
||||||
|
@ -65,11 +58,9 @@ class behaviorCategoriesPage {
|
||||||
$core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET);
|
$core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class urlCategories extends dcUrlHandlers {
|
class urlCategories extends dcUrlHandlers {
|
||||||
|
|
||||||
public static function categories($args) {
|
public static function categories($args) {
|
||||||
# The entry
|
# The entry
|
||||||
self::serveDocument('categories.html');
|
self::serveDocument('categories.html');
|
||||||
|
|
Loading…
Reference in a new issue