aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-11 18:24:37 -0700
committerFriendika <info@friendika.com>2011-10-11 18:24:37 -0700
commit557a7d0cec31a36d12898429c479c71671833dfd (patch)
treeab1781533e91b63b86a2ef726c65092ad8009efb /include/text.php
parentcaf18164f0f7bd336e61d4393dabf6d93c739879 (diff)
downloadvolse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.tar.gz
volse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.tar.bz2
volse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.zip
stuff
- background the external network notifications (Facebook, Twitter, Statusnet) - add vimeo support - consolidate editor video options (insert video, regardless of source) - add "Connector Settings" page purely for configuring connectors - moved mailbox settings to Connectors - Move the "Connect/Follow" dialogue out of "find people" and move to top. - Add "Find People" dialogue - minor theme edits on duepuntozero and testbubble to make all this stuff work - A bit of theming on duepunto notifications to eliminate the gigantic Diaspora profile photos.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index fd413b7d6..299410a63 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1003,3 +1003,37 @@ if (!function_exists('str_getcsv')) {
}
}
}
+
+function cleardiv() {
+ return '<div class="clear"></div>';
+}
+
+
+function bb_translate_video($s) {
+
+ $matches = null;
+ $r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER);
+ if($r) {
+ foreach($matches as $mtch) {
+ if((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be')))
+ $s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s);
+ elseif(stristr($mtch[1],'vimeo'))
+ $s = str_replace($mtch[0],'[vimeo]' . $mtch[1] . '[/vimeo]',$s);
+ }
+ }
+ return $s;
+}
+
+function html2bb_video($s) {
+
+ $s = preg_replace('#<object[^>]+>(.*?)https+://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+)(.*?)</object>#ism',
+ '[youtube]$2[/youtube]', $s);
+
+ $s = preg_replace('#<iframe[^>](.*?)https+://www.youtube.com/embed/([A-Za-z0-9\-_=]+)(.*?)</iframe>#ism',
+ '[youtube]$2[/youtube]', $s);
+
+ $s = preg_replace('#<iframe[^>](.*?)https+://player.vimeo.com/video/([0-9]+)(.*?)</iframe>#ism',
+ '[vimeo]$2[/vimeo]', $s);
+
+ return $s;
+} \ No newline at end of file