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/editbookmark.tpl.php | 6 ++- templates/sidebar.block.linked.php | 78 ++++++++++++++++++++++++++++++++++++++ templates/tag2tagadd.tpl.php | 23 +++++++++++ templates/tag2tagdelete.tpl.php | 22 +++++++++++ 4 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 templates/sidebar.block.linked.php create mode 100644 templates/tag2tagadd.tpl.php create mode 100644 templates/tag2tagdelete.tpl.php (limited to 'templates') diff --git a/templates/editbookmark.tpl.php b/templates/editbookmark.tpl.php index a590d81..f707668 100644 --- a/templates/editbookmark.tpl.php +++ b/templates/editbookmark.tpl.php @@ -45,6 +45,10 @@ window.onload = function() { + + + " to include one tag in another. e.g.: europe>france>paris')?> + @@ -117,4 +121,4 @@ document.write('<\/ul>'); includeTemplate($GLOBALS['bottom_include']); -?> \ No newline at end of file +?> 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); + } + ?> +
+
+ + diff --git a/templates/tag2tagadd.tpl.php b/templates/tag2tagadd.tpl.php new file mode 100644 index 0000000..5b5ea58 --- /dev/null +++ b/templates/tag2tagadd.tpl.php @@ -0,0 +1,23 @@ +includeTemplate($GLOBALS['top_include']); +?> + +
+ +

+

>

+ +

+ + +

+ + +
+ + +
+ +includeTemplate($GLOBALS['bottom_include']); +?> diff --git a/templates/tag2tagdelete.tpl.php b/templates/tag2tagdelete.tpl.php new file mode 100644 index 0000000..9a276d1 --- /dev/null +++ b/templates/tag2tagdelete.tpl.php @@ -0,0 +1,22 @@ +includeTemplate($GLOBALS['top_include']); +?> + +
+ + +

+

+ + +

+ + +
+ + +
+ +includeTemplate($GLOBALS['bottom_include']); +?> -- cgit v1.2.3