diff --git a/index.php b/index.php index 2ff2505..85486eb 100644 --- a/index.php +++ b/index.php @@ -805,6 +805,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) $tagList = array(); foreach($tags as $key => $value) { + if (in_array($key, $filteringTags)) { + continue; + } // Tag font size scaling: // default 15 and 30 logarithm bases affect scaling, // 22 and 6 are arbitrary font sizes for max and min sizes. @@ -829,12 +832,17 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) exit; } - // -------- Tag cloud + // -------- Tag list if ($targetPage == Router::$PAGE_TAGLIST) { $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all'; $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : []; $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility); + foreach ($filteringTags as $tag) { + if (array_key_exists($tag, $tags)) { + unset($tags[$tag]); + } + } if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') { alphabetical_sort($tags, false, true); diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html index 59aa2ee..96b357a 100644 --- a/tpl/default/tag.cloud.html +++ b/tpl/default/tag.cloud.html @@ -13,6 +13,11 @@
{$countTags=count($tags)}

{'Tag cloud'|t} - {$countTags} {'tags'|t}

+ {if="!empty($search_tags)"} +

+ {'List all links with those tags'|t} +

+ {/if}
@@ -40,7 +45,7 @@
{loop="tags"} - {$key}{$key}{$value.count} {loop="$value.tag_plugin"} {$value} diff --git a/tpl/default/tag.list.html b/tpl/default/tag.list.html index 62e2e7c..81d6e5a 100644 --- a/tpl/default/tag.list.html +++ b/tpl/default/tag.list.html @@ -13,6 +13,9 @@
{$countTags=count($tags)}

{'Tag list'|t} - {$countTags} {'tags'|t}

+

+ {'List all links with those tags'|t} +

@@ -50,7 +53,7 @@ {/if} {$value} - {$key} + {$key} {loop="$value.tag_plugin"} {$value}