From b52e9731e39125f5911fe6795ef34eb1f183d4b3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 3 May 2018 20:14:58 -0700 Subject: tagging changes: + (old style forum mentions), and underscore space replacement are no longer supported. --- Zotlabs/Module/Item.php | 10 ---- doc/member/member_guide.bb | 12 ++--- include/text.php | 127 ++++++++------------------------------------- 3 files changed, 28 insertions(+), 121 deletions(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index fd99c4a64..640b4fa5c 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -528,16 +528,6 @@ class Item extends \Zotlabs\Web\Controller { // and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.) // we may need virtual or template classes to implement the possible alternatives - // If we're sending a private top-level message with a single @-taggable channel as a recipient, @-tag it, if our pconfig is set. - - if((! $parent) && (get_pconfig($profile_uid,'system','tagifonlyrecip')) && (substr_count($str_contact_allow,'<') == 1) && ($str_group_allow == '') && ($str_contact_deny == '') && ($str_group_deny == '')) { - $x = q("select abook_id, abconfig.v from abook left join abconfig on abook_xchan = abconfig.xchan and abook_channel = abconfig.chan and cat= 'their_perms' and abconfig.k = 'tag_deliver' and abconfig.v = 1 and abook_xchan = '%s' and abook_channel = %d limit 1", - dbesc(str_replace(array('<','>'),array('',''),$str_contact_allow)), - intval($profile_uid) - ); - if($x) - $body .= "\n\n@group+" . $x[0]['abook_id'] . "\n"; - } $body = cleanup_bbcode($body); diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb index e36e1c497..7cd403d75 100644 --- a/doc/member/member_guide.bb +++ b/doc/member/member_guide.bb @@ -359,7 +359,7 @@ The [b]![/b] character designates a deliverable mention to a forum or special ch !Gardening - mention the Gardening Forum and also post to the Gardening "network" (e.g. send to all the forum members; if you have permission to do so) [/code] -Note: In previous releases, forums were delivered by using @forum+ with a plus sign at the end. This mechanism is still used occasionally but is deprecated and !forum is now preferred. +Note: In previous releases, forums were delivered by using @forum+ with a plus sign at the end. This mechanism is no longer supported. [h4]Private Mentions[/h4] If you wish to restrict a post to a single person or a number of people, you can do this by selecting channels or privacy groups from the privacy tool. You can also just tag them with a privacy tag. A privacy tag is a name preceded by the two characters @! - and in addition to tagging these channels, will also change the privacy permissions of the post to only include them. You can have more than one privacy tag, for instance @!bob and @!linda will send the post only to Bob and Linda. This mechanism over-rides the privacy selector. @@ -383,17 +383,17 @@ Bookmarks indicate a link which can be saved to your bookmark folder. They use t Where possible please use the auto-complete window to select tag and mention recipients, because it will generate a coded tag which uniquely identifies one channel. Names are sometimes ambiguous. However, you can "manually" tag a channel by matching the channel name or address. [code] -@Robert Johnson +@billy [/code] -will tag Robert Johnson, but we can only match one space. If the name was "Blind Lemon Jefferson" it won't be found unless you enclose the entire name in double quotes or change the spaces to underscores. +will tag a connection whose name or network address is 'billy' (exact match). If you have two connections with a name or network address of billy, for instance billy@server1.hubzilla.org and billy@server2.hubzilla2.org, you will need to supply the complete address or the results will be ambiguous and the wrong person may be tagged. [code] -@"Blind Lemon Jefferson" -@Blind_Lemon_Jefferson +@"Robert Johnson" [/code] -are both equivalent. +will tag Robert Johnson. The double quotes are required if the tagged name contains space characters. + [h3]Web Pages[/h3] diff --git a/include/text.php b/include/text.php index dc3a155de..c7417a19b 100644 --- a/include/text.php +++ b/include/text.php @@ -830,27 +830,7 @@ function get_tags($s) { } } - // Match full names against @tags including the space between first and last - // We will look these up afterward to see if they are full names or not recognisable. - - // The lookbehind is used to prevent a match in the middle of a word - // '=' needs to be avoided because when the replacement is made (in handle_tag()) it has to be ignored there - // Feel free to allow '=' if the issue with '=' is solved in handle_tag() - // added / ? and [ to avoid issues with hashchars in url paths - - // added ; to single word tags to allow emojis and other unicode character constructs in bbcode - // (this would actually be &#xnnnnn; but the ampersand will have been escaped to & by the time we see it.) - - if(preg_match_all('/(? $success, 'access_tag' => $access_tag); if($success['replaced']) $tagged[] = $tag; -- cgit v1.2.3