From 8aaf55c1e6216f1221569e7087bcdd1000124d5f Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 9 Jun 2011 20:02:48 -0700 Subject: event item --- include/bbcode.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 6ab67ffdc..a44838c24 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1,5 +1,8 @@ ', $Text); + + // oembed tag $Text = oembed_bbcode2html($Text); + + // If we found an event earlier, strip out all the event code and replace with a reformatted version. + + if(x($ev,'desc') && x($ev,'start')) { + $sub = format_event_html($ev); + + $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/is",$sub,$Text); + $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/is",'',$Text); + $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/is",'',$Text); + $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/is",'',$Text); + $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",'',$Text); + } + + call_hooks('bbcode',$Text); -- cgit v1.2.3