diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/sidebar.block.linked.php | 25 | ||||
-rw-r--r-- | templates/tags.tpl.php | 3 |
2 files changed, 23 insertions, 5 deletions
diff --git a/templates/sidebar.block.linked.php b/templates/sidebar.block.linked.php index 5a891ea..7bbde81 100644 --- a/templates/sidebar.block.linked.php +++ b/templates/sidebar.block.linked.php @@ -4,11 +4,14 @@ $userservice =& ServiceFactory::getServiceInstance('UserService'); function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode =false, $precedentTag =null, $level=0, $stopList=array()) { $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); + $tagstatservice =& ServiceFactory::getServiceInstance('TagStatService'); $output = ''; $output.= '<tr>'; $output.= '<td></td>'; $output.= '<td>'. str_repeat(' ', $level*2) .'<a href="'. sprintf($cat_url, filter($user, 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>'; + //$output.= ' - '. $tagstatservice->getMaxDepth($tag, $linkType, $uId); + if($editingMode) { $output.= ' ('; $output.= '<a href="'.createURL('tag2tagadd', $tag).'">add</a>'; @@ -22,7 +25,7 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode $output.= '</tr>'; if(!in_array($tag, $stopList)) { - $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $userid, $level); + $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $userid); $precedentTag = $tag; $stopList[] = $tag; $level = $level + 1; @@ -33,7 +36,6 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode return $output; } - $logged_on_userid = $userservice->getCurrentUserId(); if ($logged_on_userid === false) { $logged_on_userid = NULL; @@ -43,7 +45,12 @@ $explodedTags = array(); if ($currenttag) { $explodedTags = explode('+', $currenttag); } else { - $orphewTags = $tag2tagservice->getOrphewTags('>', $userid); + if($userid != null) { + $orphewTags = $tag2tagservice->getOrphewTags('>', $userid); + } else { + $orphewTags = $tag2tagservice->getOrphewTags('>', $userid, 4, "nb"); + } + foreach($orphewTags as $orphewTag) { $explodedTags[] = $orphewTag['tag']; } @@ -60,7 +67,17 @@ if(count($explodedTags) > 0) { if ($displayLinkedZone) { ?> -<h2><?php echo T_('Linked Tags'); ?></h2> +<h2> +<?php + echo T_('Linked Tags').' '; + //if($userid != null) { + $cUser = $userservice->getUser($userid); + echo '<a href="'.createURL('alltags', $cUser['username']).'">('.T_('plus').')</a>'; + //} +?> +</h2> + + <div id="linked"> <table> <?php diff --git a/templates/tags.tpl.php b/templates/tags.tpl.php index 7266170..d5de176 100644 --- a/templates/tags.tpl.php +++ b/templates/tags.tpl.php @@ -23,5 +23,6 @@ echo $contents ."\n"; <?php } +$this->includeTemplate('sidebar.tpl'); $this->includeTemplate($GLOBALS['bottom_include']); -?>
\ No newline at end of file +?> |