From ef9143907f1ea6600a6c66065f0e18ac42f3535b Mon Sep 17 00:00:00 2001 From: mensonge Date: Wed, 9 Jan 2008 15:51:35 +0000 Subject: Structured tags '>' for each user git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@3 b3834d28-1941-0410-a4f8-b48e95affb8f --- templates/sidebar.block.linked.php | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 templates/sidebar.block.linked.php (limited to 'templates/sidebar.block.linked.php') diff --git a/templates/sidebar.block.linked.php b/templates/sidebar.block.linked.php new file mode 100644 index 0000000..23bcb0c --- /dev/null +++ b/templates/sidebar.block.linked.php @@ -0,0 +1,78 @@ +'; + $output.= ''; + $output.= ''. str_repeat(' ', $level*2) .''; + if($editingMode) { + $output.= ' ('; + $output.= 'add'; + if($precedentTag != null) { + $output.= ' - '; + $output.= 'del'; + } + $output.= ')'; + } + $output.= ''; + $output.= ''; + + if(!in_array($tag, $stopList)) { + $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $userid, $level); + $precedentTag = $tag; + $stopList[] = $tag; + $level = $level + 1; + foreach($linkedTags as $linkedTag) { + $output.= displayLinkedTags($linkedTag, $linkType, $uId, $cat_url, $user, $editingMode, $precedentTag, $level, $stopList); + } + } + return $output; +} + + +$logged_on_userid = $userservice->getCurrentUserId(); +if ($logged_on_userid === false) { + $logged_on_userid = NULL; +} + +$explodedTags = array(); +if ($currenttag) { + $explodedTags = explode('+', $currenttag); +} else { + $orphewTags = $tag2tagservice->getOrphewTags('>', $userid); + foreach($orphewTags as $orphewTag) { + $explodedTags[] = $orphewTag['tag']; + } +} + +if(count($explodedTags) > 0) { + $displayLinkedZone = false; + foreach($explodedTags as $explodedTag) { + if($tag2tagservice->getLinkedTags($explodedTag, '>', $userid)) { + $displayLinkedZone = true; + break; + } + } + if ($displayLinkedZone) { +?> + +

+
+ + ', $userid, $cat_url, $user, $editingMode); + } + ?> +
+
+ + -- cgit v1.2.3-54-g00ecf