mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 11:28:49 +00:00
pumpio, statusnet, tumblr, twitter, wordpress: Changed the way, shares are displayed
twitter: Look for the entities when importing tweets.
This commit is contained in:
parent
e28b559bfc
commit
bbc8a1328d
7 changed files with 178 additions and 29 deletions
|
@ -428,13 +428,13 @@ function pumpio_send(&$a,&$b) {
|
|||
if ($title != '')
|
||||
$title = "<h4>".$title."</h4>";
|
||||
|
||||
$content = bbcode($b['body'], false, false);
|
||||
$content = bbcode($b['body'], false, false, 4);
|
||||
|
||||
// Enhance the way, videos are displayed
|
||||
$content = preg_replace('/<a.*?href="(https?:\/\/www.youtube.com\/.*?)".*?>(.*?)<\/a>/ism',"\n[url]$1[/url]\n",$content);
|
||||
$content = preg_replace('/<a.*?href="(https?:\/\/youtu.be\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
$content = preg_replace('/<a.*?href="(https?:\/\/vimeo.com\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
$content = preg_replace('/<a.*?href="(https?:\/\/player.vimeo.com\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
$content = preg_replace('/<a href="(https?:\/\/www.youtube.com\/.*?)".*?>(.*?)<\/a>/ism',"\n[url]$1[/url]\n",$content);
|
||||
$content = preg_replace('/<a href="(https?:\/\/youtu.be\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
$content = preg_replace('/<a href="(https?:\/\/vimeo.com\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
$content = preg_replace('/<a href="(https?:\/\/player.vimeo.com\/.*?)".*?>(.*?)<\/a>/ism',"\n$1\n",$content);
|
||||
|
||||
$URLSearchString = "^\[\]";
|
||||
$content = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$content);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue