From da034045cc1bba74287b7c3e83f4a94ff5359150 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 2 Mar 2023 21:15:19 +0000 Subject: some work on bringing bang tags back for forums --- include/items.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index b795df90d..d8f817fc2 100644 --- a/include/items.php +++ b/include/items.php @@ -2686,12 +2686,7 @@ function tag_deliver($uid, $item_id) { * Now we've got those out of the way. Let's see if this is a post that's tagged for re-delivery */ - $terms = []; - if (array_key_exists('term', $item)) { - $terms = array_merge(get_terms_oftype($item['term'],TERM_MENTION),get_terms_oftype($item['term'],TERM_FORUM)); - logger('Post mentions: ' . print_r($terms,true), LOGGER_DATA); - } - + $terms = isset($item['term']) ? get_terms_oftype($item['term'], [TERM_MENTION, TERM_FORUM]) : []; $max_forums = get_config('system','max_tagged_forums',2); $matched_forums = 0; @@ -2732,7 +2727,7 @@ function tag_deliver($uid, $item_id) { // standard forum tagging sequence !forumname -/* + $forumpattern = '/\!\!?\[[uz]rl\=([^\]]*?)\]((?:.(?!\[[uz]rl\=))*?)\[\/[uz]rl\]/'; $forumpattern2 = '/\[[uz]rl\=([^\]]*?)\]\!((?:.(?!\[[uz]rl\=))*?)\[\/[uz]rl\]/'; @@ -2766,8 +2761,6 @@ function tag_deliver($uid, $item_id) { } } -*/ - if(! ($tagged || $plustagged)) { logger('Mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; @@ -2993,7 +2986,6 @@ function tgroup_check($uid, $item) { $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']); -/* $forumpattern = '/\!\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; $forumpattern2 = '/\[zrl\=([^\]]*?)\]\!((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; @@ -3033,7 +3025,6 @@ function tgroup_check($uid, $item) { logger('tgroup_check: mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; } -*/ return true; } -- cgit v1.2.3