From 18bd96a513bd27833f043647784d2d3895341296 Mon Sep 17 00:00:00 2001 From: Jean-Marc Coic Date: Sun, 5 Dec 2004 16:52:01 +0000 Subject: [PATCH] some generic functions to display Exalead categories and keywords git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-53 --- include/exalead/exalead.smarty.inc.php | 92 ++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 include/exalead/exalead.smarty.inc.php 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); +} + +?> -- 2.1.4