From 76dfe9af42ba3188abd0665387f8c6a8931d130c Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 18 Jul 2016 12:39:24 +0200 Subject: [PATCH 1/3] Background - tag list Fixed problem with background when displaying tag list --- styles/prosilver/theme/rh_topictags.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/styles/prosilver/theme/rh_topictags.css b/styles/prosilver/theme/rh_topictags.css index 9e580cc..26e4c0a 100644 --- a/styles/prosilver/theme/rh_topictags.css +++ b/styles/prosilver/theme/rh_topictags.css @@ -104,3 +104,11 @@ and (max-width : 480px) display: block; } } + +dl.row-item { + background-position: 10px 50%; + background-repeat: no-repeat; +} +dl.row-item dt .list-inner { + padding-left: 45px; +} From fc3a11f9ff8b3810e863025c92876d24c69733f2 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 18 Jul 2016 12:46:00 +0200 Subject: [PATCH 2/3] Display the tags in search view Display the tags in search view: - your posts - new posts - unread posts - unanswered topics - active topics --- event/main_listener.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/event/main_listener.php b/event/main_listener.php index abc70ee..341f3c0 100644 --- a/event/main_listener.php +++ b/event/main_listener.php @@ -31,6 +31,7 @@ public static function getSubscribedEvents() 'core.posting_modify_template_vars' => 'posting_modify_template_vars', 'core.viewforum_modify_topicrow' => 'viewforum_modify_topicrow', 'robertheim.topictags.viewforum_modify_topicrow' => 'viewforum_modify_topicrow', + 'core.search_modify_tpl_ary' => 'search_modify_tpl_ary', 'core.viewtopic_assign_template_vars_before' => 'viewtopic_assign_template_vars_before', 'core.submit_post_end' => 'submit_post_end', 'core.delete_topics_before_query' => 'delete_topics_before_query', @@ -356,6 +357,37 @@ public function viewforum_modify_topicrow($event) } } } + + public function search_modify_tpl_ary($event) + { + if ($this->config[prefixes::CONFIG.'_display_tags_in_viewforum']) + { + $data = $event->get_data(); + + $topic_id = (int) $data['row']['topic_id']; + $forum_id = (int) $data['row']['forum_id']; + + if ($this->tags_manager->is_tagging_enabled_in_forum($forum_id)) + { + $tags = $this->tags_manager->get_assigned_tags($topic_id); + if (!empty($tags)) + { + // we cannot use assign_block_vars('topicrow.tags', ...) here, because the block 'topicrow' is not yet assigned + // add links + $this->assign_tags_to_template('rh_tags_tmp', $tags); + // small_tag.html might want to use our extension's css. + $this->template->assign_var('S_RH_TOPICTAGS_INCLUDE_CSS', true); + $rendered_tags = $this->template->assign_display('@robertheim_topictags/small_tag.html'); + // remove temporary data + $this->template->destroy_block_vars('rh_tags_tmp'); + + // assign the template data + $data['tpl_ary']['RH_TOPICTAGS_TAGS'] = $rendered_tags; + $event->set_data($data); + } + } + } + } /** * Assigns the given tags to the template block From 73b54a0c9ee7d3d90d52907f11d8a766ef81310f Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 18 Jul 2016 12:49:15 +0200 Subject: [PATCH 3/3] Display the tags in search view Display the tags in search view --- styles/all/template/event/topiclist_row_append.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/styles/all/template/event/topiclist_row_append.html b/styles/all/template/event/topiclist_row_append.html index 1afbc2e..ef08924 100644 --- a/styles/all/template/event/topiclist_row_append.html +++ b/styles/all/template/event/topiclist_row_append.html @@ -1,4 +1,7 @@ -{topicrow.RH_TOPICTAGS_TAGS} +
{topicrow.RH_TOPICTAGS_TAGS}
+ + +