mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Twitter, Statusnet: Supress profile link of user whose message was repeated
libertree: Design improvement of exported messages privacy_image_cache: quickfix for double encoded urls
This commit is contained in:
parent
fe7c741eed
commit
471b5db36f
4 changed files with 46 additions and 26 deletions
|
@ -453,10 +453,16 @@ function statusnet_post_hook(&$a,&$b) {
|
|||
// that is, don't send if the option is not set in the
|
||||
// connector settings
|
||||
if ($linksenabled=='0') {
|
||||
// #-tags
|
||||
$tmp = preg_replace( '/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $tmp);
|
||||
// @-mentions
|
||||
$tmp = preg_replace( '/@\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '@$2', $tmp);
|
||||
// #-tags
|
||||
$tmp = preg_replace( '/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $tmp);
|
||||
// @-mentions
|
||||
$tmp = preg_replace( '/@\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '@$2', $tmp);
|
||||
// recycle 1
|
||||
$recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8');
|
||||
$tmp = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', $recycle.'$2', $tmp);
|
||||
// recycle 2
|
||||
//$recycle = html_entity_decode("♻ ", ENT_QUOTES, 'UTF-8');
|
||||
//$tmp = preg_replace( '/'.$recycle.'\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', 'RT @$2:', $tmp);
|
||||
}
|
||||
// preserve links to webpages
|
||||
$tmp = preg_replace( '/\[url\=(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)\](\w+.*?)\[\/url\]/i', '$2 $1', $tmp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue