diff options
author | Mario <mario@mariovavti.com> | 2020-12-18 13:26:51 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-12-18 13:26:51 +0000 |
commit | 8640e6d1df1004191a1cac9a2d894c73aa06f84a (patch) | |
tree | eb67e4be49b01c3f62f470f67c29d150a748a009 | |
parent | 801583fd072e8ebe06fa6aeb97d9dd78785a6f39 (diff) | |
download | volse-hubzilla-8640e6d1df1004191a1cac9a2d894c73aa06f84a.tar.gz volse-hubzilla-8640e6d1df1004191a1cac9a2d894c73aa06f84a.tar.bz2 volse-hubzilla-8640e6d1df1004191a1cac9a2d894c73aa06f84a.zip |
deprecate ! and !! forum tags
-rwxr-xr-x | include/items.php | 10 | ||||
-rw-r--r-- | include/text.php | 14 | ||||
-rw-r--r-- | view/js/autocomplete.js | 3 |
3 files changed, 16 insertions, 11 deletions
diff --git a/include/items.php b/include/items.php index bcdc6c687..8537c3299 100755 --- a/include/items.php +++ b/include/items.php @@ -2813,7 +2813,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\]/'; @@ -2847,6 +2847,8 @@ function tag_deliver($uid, $item_id) { } } +*/ + if(! ($tagged || $plustagged)) { logger('Mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; @@ -3076,7 +3078,7 @@ function tgroup_check($uid, $item) { $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']); - +/* $forumpattern = '/\!\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; $forumpattern2 = '/\[zrl\=([^\]]*?)\]\!((?:.(?!\[zrl\=))*?)\[\/zrl\]/'; @@ -3111,7 +3113,7 @@ function tgroup_check($uid, $item) { } } } - +*/ if(! $found) { logger('tgroup_check: mention was in a reshare or exceeded max_tagged_forums - ignoring'); continue; @@ -4805,7 +4807,7 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, elseif(strpos($access_tag,'gid:') === 0) { $str_group_allow .= '<' . substr($access_tag,4) . '>'; $access_tag = ''; - $private = 2; + $private = 1; } } } diff --git a/include/text.php b/include/text.php index 27b8d49a7..76df9e17b 100644 --- a/include/text.php +++ b/include/text.php @@ -2795,7 +2795,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) $termtype = ((strpos($tag,'#') === 0) ? TERM_HASHTAG : TERM_UNKNOWN); $termtype = ((strpos($tag,'@') === 0) ? TERM_MENTION : $termtype); - $termtype = ((strpos($tag,'!') === 0) ? TERM_FORUM : $termtype); +// $termtype = ((strpos($tag,'!') === 0) ? TERM_FORUM : $termtype); $termtype = ((strpos($tag,'#^[') === 0) ? TERM_BOOKMARK : $termtype); // Is it a hashtag of some kind? @@ -2864,7 +2864,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) if ( in_array($termtype, [ TERM_MENTION, TERM_FORUM ] )) { - // The @! tag and !! tag will alter permissions + // The @! tag will alter permissions // $in_network is set to false to avoid false positives on posts originating // on a network which does not implement privacy tags or implements them differently. @@ -2966,12 +2966,13 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) //create profile link $profile = str_replace(',','%2c',$profile); $url = $profile; +/* if($termtype === TERM_FORUM) { $newtag = '!' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . '[/zrl]'; $body = str_replace('!' . (($exclusive) ? '!' : '') . $name, $newtag, $body); } - else { - // ( $termtype === TERM_MENTION ) +*/ + if ($termtype === TERM_MENTION) { $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . '[/zrl]'; $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body); } @@ -3032,12 +3033,13 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) //create profile link $profile = str_replace(',','%2c',$profile); $url = $profile; +/* if($termtype === TERM_FORUM) { $newtag = '!' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . '[/zrl]'; $body = str_replace('!' . (($exclusive) ? '!' : '') . $name, $newtag, $body); } - else { - // ( $termtype === TERM_MENTION ) +*/ + if ($termtype === TERM_MENTION) { $newtag = '@' . (($exclusive) ? '!' : '') . '[zrl=' . $profile . ']' . $newname . '[/zrl]'; $body = str_replace('@' . (($exclusive) ? '!' : '') . $name, $newtag, $body); } diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 27011b4d4..dc757d5c8 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -171,6 +171,7 @@ function string2bb(element) { template: contact_format }; +/* // Autocomplete forums forums = { match: /(^|\s)(\!\!*)([^ \n]{2,})$/, @@ -180,7 +181,7 @@ function string2bb(element) { replace: editor_replace, template: contact_format }; - +*/ // Autocomplete hashtags tags = { |