diff --git a/ajax/getlinkedtags.php b/ajax/getlinkedtags.php new file mode 100644 index 0000000..fa8f2d0 --- /dev/null +++ b/ajax/getlinkedtags.php @@ -0,0 +1,63 @@ +isLoggedOn()) { + $loggedon = true; + $currentUser = $userservice->getCurrentUser(); + $currentUserID = $userservice->getCurrentUserId(); +} + +function displayTag($tag, $uId) { + $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); + $output = '{ id:'.rand().', name:\''.$tag.'\''; + + $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId); + if(count($linkedTags) > 0) { + $output.= ', children: ['; + foreach($linkedTags as $linkedTag) { + $output.= displayTag($linkedTag, $uId); + } + $output.= "]"; + } + + $output.= '},'; + return $output; +} + +?> + +{ label: 'name', identifier: 'id', items: [ + +] } diff --git a/config.inc.php.example b/config.inc.php.example index 9966286..47e314e 100644 --- a/config.inc.php.example +++ b/config.inc.php.example @@ -79,6 +79,7 @@ $thumbnailsKey = ''; #then artviper.net send you a UserId and a secretKey $enableCommonTagDescription = true; # enableCommonTagDescription {true, false} $menuTag = 'menu'; # name of the tag whose subtags will appear into the menu box $maxSizeMenuBlock = 7; # maximum number of items (tags) appearing into menu box +$menu2Tags = array('example', 'of', 'menu', 'tags'); # list of tags used by menu2 sidebar box (void list = hidden menu2 box) ### Other ### $sizeSearchHistory = 10; # number of users' searches that are saved {1..10[Default]..-1[Unlimited]} diff --git a/scuttle.css b/scuttle.css index f148a68..7295987 100644 --- a/scuttle.css +++ b/scuttle.css @@ -243,7 +243,7 @@ div#sidebar a { div#sidebar a:hover { color: #773; } -div#sidebar div { +div#sidebar>div { background: #FFF url('bg_sidebar.png') bottom repeat-x; border: 1px solid #CC8; color: #555; @@ -282,6 +282,10 @@ div#sidebar ul li { margin: 0.5em 0; } +div#related { + padding: 0.5em; +} + /* TAGS */ p.commondescription { @@ -312,6 +316,17 @@ p.tags span.selected { background: #CEC; } +.treeTag { + color: #999955; +} +.treeTag:hover { + cursor: pointer; + text-decoration: underline; +} +.treeTag.selected { + background: #CEC; +} + /* PROFILE */ table.profile th { diff --git a/templates/sidebar.block.menu2.php b/templates/sidebar.block.menu2.php new file mode 100644 index 0000000..9b660fa --- /dev/null +++ b/templates/sidebar.block.menu2.php @@ -0,0 +1,62 @@ +getCurrentUserId(); +if ($logged_on_userid === false) { + $logged_on_userid = NULL; +} + +if(!isset($user)) { + $cat_url = createURL('tags', '%2$s'); +} + +$menu2Tags = $GLOBALS['menu2Tags']; +if (sizeOf($menu2Tags) > 0) { + ?> + +