From b3bd8c3e8d367975980043e772f7cd78b7f96bc6 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 22 Oct 2020 16:21:03 +0200 Subject: Feature: support any tag separator So it allows to have multiple words tags. Breaking change: commas ',' are no longer a default separator. Fixes #594 --- tpl/default/changetag.html | 23 +++++++++++++++++++++++ tpl/default/linklist.html | 2 +- tpl/default/page.footer.html | 5 +++-- tpl/default/tag.cloud.html | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) (limited to 'tpl/default') diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html index a5fbd31e..13b7f24a 100644 --- a/tpl/default/changetag.html +++ b/tpl/default/changetag.html @@ -36,6 +36,29 @@

{'You can also edit tags in the'|t} {'tag list'|t}.

+ +
+
+
+

{"Change tags separator"|t}

+
+

+ {'Your current tag separator is'|t} {$tags_separator}{if="!empty($tags_separator_desc)"} ({$tags_separator_desc}){/if}. +

+
+ +
+ +
+ +
+

+ {'Note that hashtags won\'t fully work with a non-whitespace separator.'|t} +

+
+
+
{include="page.footer"} diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index e1115d49..7208a3b6 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -90,7 +90,7 @@ {'for'|t} {$search_term} {/if} {if="!empty($search_tags)"} - {$exploded_tags=explode(' ', $search_tags)} + {$exploded_tags=tags_str2array($search_tags, $tags_separator)} {'tagged'|t} {loop="$exploded_tags"} diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html index 964ffff1..58ca18c5 100644 --- a/tpl/default/page.footer.html +++ b/tpl/default/page.footer.html @@ -18,8 +18,6 @@
- - {loop="$plugins_footer.endofpage"} {$value} {/loop} @@ -41,4 +39,7 @@ + + + diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html index c067e1d4..01b50b02 100644 --- a/tpl/default/tag.cloud.html +++ b/tpl/default/tag.cloud.html @@ -48,7 +48,7 @@
{loop="tags"} - {$key}{$key}{$value.count} {loop="$value.tag_plugin"} {$value} -- cgit v1.2.3