aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/dev-function-overview.md8
-rw-r--r--doc/developer_function_primer.bb4
-rw-r--r--include/bbcode.php46
3 files changed, 6 insertions, 52 deletions
diff --git a/doc/dev-function-overview.md b/doc/dev-function-overview.md
index 1ef80d343..fa8a98ff3 100644
--- a/doc/dev-function-overview.md
+++ b/doc/dev-function-overview.md
@@ -1,5 +1,5 @@
-Red development - some useful basic functions
-=============================================
+$Projectname development - some useful basic functions
+======================================================
@@ -17,11 +17,11 @@ Returns authenticated string hash of Red global identifier, if authenticated via
* get_app()
-Returns the global app structure ($a).
+Returns the global app structure ($a). No longer used as App is a static class
* App::get_observer()
-(App:: is usually assigned to the global $a), so App::get_observer() or App::get_observer() - returns an xchan structure representing the current viewer if authenticated (locally or remotely).
+returns an xchan structure representing the current viewer if authenticated (locally or remotely).
* get_config($family,$key), get_pconfig($uid,$family,$key)
diff --git a/doc/developer_function_primer.bb b/doc/developer_function_primer.bb
index 373454440..684fea569 100644
--- a/doc/developer_function_primer.bb
+++ b/doc/developer_function_primer.bb
@@ -1,4 +1,4 @@
-[b]Red development - some useful basic functions[/b]
+[b]$Projectname development - some useful basic functions[/b]
[b]get_account_id()[/b]
@@ -18,7 +18,7 @@ Returns the global app structure ($a).
[b]App::get_observer()[/b]
-(App:: is usually assigned to the global $a), so $a->get_observer() or get_app()->get_observer() - returns an xchan structure representing the current viewer if authenticated (locally or remotely).
+returns an xchan structure representing the current viewer if authenticated (locally or remotely).
[b]get_config($family,$key), get_pconfig($uid,$family,$key), get_xconfig($xchan_hash,$family,$key)[/b]
diff --git a/include/bbcode.php b/include/bbcode.php
index 7a7ea8ce6..fd2d2f97a 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -492,18 +492,6 @@ function bb_observer($Text) {
function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) {
- $a = get_app();
-
- // Move all spaces out of the tags
- // ....Uhm why?
- // This is basically doing a trim() on the stuff in between tags, but it messes up
- // carefully crafted bbcode and especially other pre-formatted code.
- // Commenting out until we come up with a use case where it's needed. Then let's try and
- // special case rather than a heavy-handed approach like this.
-
-// $Text = preg_replace("/\[(\w*)\](\s*)/ism", '$2[$1]', $Text);
-// $Text = preg_replace("/(\s*)\[\/(\w*)\]/ism", '[/$2]$1', $Text);
-
// Hide all [noparse] contained bbtags by spacefying them
if (strpos($Text,'[noparse]') !== false) {
$Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text);
@@ -834,9 +822,6 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
}
-
-
-
// Declare the format for [quote] layout
$QuoteLayout = '<blockquote>$1</blockquote>';
@@ -978,37 +963,6 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
}
}
- // Youtube extensions
-// if (strpos($Text,'[youtube]') !== false) {
-// if ($tryoembed) {
-// $Text = preg_replace_callback("/\[youtube\](https?:\/\/www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
-// $Text = preg_replace_callback("/\[youtube\](www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
-// $Text = preg_replace_callback("/\[youtube\](https?:\/\/youtu.be\/.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
-// }
-// $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $Text);
-// $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $Text);
-// $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism", '[youtube]$1[/youtube]', $Text);
-
-// if ($tryoembed)
-// $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '<iframe width="' . App::$videowidth . '" height="' . App::$videoheight . '" src="http://www.youtube.com/embed/$1" frameborder="0"></iframe>', $Text);
-// else
-// $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", "http://www.youtube.com/watch?v=$1", $Text);
-// }
-// if (strpos($Text,'[vimeo]') !== false) {
-// if ($tryoembed) {
-// $Text = preg_replace_callback("/\[vimeo\](https?:\/\/player.vimeo.com\/video\/[0-9]+).*?\[\/vimeo\]/ism", 'tryoembed', $Text);
-// $Text = preg_replace_callback("/\[vimeo\](https?:\/\/vimeo.com\/[0-9]+).*?\[\/vimeo\]/ism", 'tryoembed', $Text);
-// }
-
-// $Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism", '[vimeo]$1[/vimeo]', $Text);
-// $Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism", '[vimeo]$1[/vimeo]', $Text);
-
-// if ($tryoembed)
-// $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '<iframe width="' . App::$videowidth . '" height="' . App::$videoheight . '" src="http://player.vimeo.com/video/$1" frameborder="0" ></iframe>', $Text);
-// else
-// $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", "http://vimeo.com/$1", $Text);
-// }
-
// oembed tag
$Text = oembed_bbcode2html($Text);