diff options
author | Friendika <info@friendika.com> | 2011-10-18 15:56:35 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-18 15:56:35 -0700 |
commit | 9043e704f87ecfd6788b7acdf9d6797fd2f89f61 (patch) | |
tree | 09174aa073694493412e1453bd29f988b2c91a00 /include/bb2diaspora.php | |
parent | b14914ee2ea7317a564386d287fc2d0f271e4832 (diff) | |
download | volse-hubzilla-9043e704f87ecfd6788b7acdf9d6797fd2f89f61.tar.gz volse-hubzilla-9043e704f87ecfd6788b7acdf9d6797fd2f89f61.tar.bz2 volse-hubzilla-9043e704f87ecfd6788b7acdf9d6797fd2f89f61.zip |
diaspora reshares
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index bdf278213..ef5477f1b 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -11,6 +11,9 @@ function diaspora2bb($s) { $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s); $s = Markdown($s); $s = html2bbcode($s); + $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); + $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); + return $s; } |