From: Jean-Marc Coic Date: Sun, 5 Dec 2004 16:52:01 +0000 (+0000) Subject: some generic functions to display Exalead categories and keywords X-Git-Tag: xorg/old~692 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=18bd96a513bd27833f043647784d2d3895341296;p=platal.git some generic functions to display Exalead categories and keywords git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-53 --- diff --git a/include/exalead/exalead.smarty.inc.php b/include/exalead/exalead.smarty.inc.php new file mode 100644 index 0000000..40aa379 --- /dev/null +++ b/include/exalead/exalead.smarty.inc.php @@ -0,0 +1,92 @@ +title; + $gid = ($keywords)?'k':$group->gid; + if($keywords) + $array = & $group; + else + $array = & $group->categories; +?> +
+
:
+ +
+groups as $group){ + display_group($group, $exalead_data); + } + +} + +function _display_keywords($params, &$smarty){ + if(!empty($params['exalead_data'])){ + $exalead_data = &$GLOBALS[$params['exalead_data']]; + } + else{ + $exalead_data = &$GLOBALS['exalead_data']; + } + + display_group($exalead_data->keywords, $exalead_data, true); +} + +function register_smarty_exalead(&$page){ + $page->register_function('exa_display_groupes', '_display_groupes'); + $page->register_function('exa_display_keywords', '_display_keywords'); +} + +if(isset($page)){ + register_smarty_exalead($page); +} + +?>