aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/bbcode.php72
-rw-r--r--include/text.php20
-rw-r--r--mod/directory.php2
-rw-r--r--mod/update_channel.php2
-rw-r--r--mod/update_display.php2
-rw-r--r--mod/update_home.php2
-rw-r--r--mod/update_network.php2
-rw-r--r--mod/update_public.php2
-rw-r--r--mod/update_search.php2
9 files changed, 46 insertions, 60 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 461334415..aa2562d62 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -459,8 +459,6 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text);
}
-
-
// If we find any event code, turn it into an event.
// After we're finished processing the bbcode we'll
// replace all of the event code with a reformatted version.
@@ -906,35 +904,35 @@ 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="' . $a->videowidth . '" height="' . $a->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="' . $a->videowidth . '" height="' . $a->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);
- }
+// 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="' . $a->videowidth . '" height="' . $a->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="' . $a->videowidth . '" height="' . $a->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);
@@ -984,15 +982,3 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
return $Text;
}
-/**
- * This function exists as a short-term solution to folks linking to private images from their /cloud in
- * their profiles, which brings up a login dialogue in the directory when that entry is viewed.
- * The long term solution is to separate the web file browser from DAV so that you'll never see a
- * login prompt (though the resource may return a permission denied).
- */
-
-
-
-function strip_bbimage($s) {
- return preg_replace("/\[[zi]mg(.*?)\](.*?)\[\/[zi]mg\]/ism", '', $s);
-}
diff --git a/include/text.php b/include/text.php
index 33562a69f..be465d0f4 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1442,23 +1442,23 @@ function generate_named_map($location) {
function prepare_body(&$item,$attach = false) {
- if($item['html']) {
- $s = bb_observer($item['html']);
- }
- else {
+// if($item['html']) {
+// $s = bb_observer($item['html']);
+// }
+// else {
call_hooks('prepare_body_init', $item);
- unobscure($item);
+// unobscure($item);
$s = prepare_text($item['body'],$item['mimetype'], true);
- }
+// }
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body', $prep_arr);
$s = $prep_arr['html'];
- q("update item set html = '%s' where id = %d",
- dbesc($s),
- intval($item['id'])
- );
+// q("update item set html = '%s' where id = %d",
+// dbesc($s),
+// intval($item['id'])
+// );
if(! $attach) {
return $s;
diff --git a/mod/directory.php b/mod/directory.php
index fa328462c..5220c1e3e 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -244,7 +244,7 @@ function directory_content(&$a) {
$hometown = ((x($profile,'hometown') == 1) ? $profile['hometown'] : False);
- $about = ((x($profile,'about') == 1) ? bbcode(strip_bbimage($profile['about'])) : False);
+ $about = ((x($profile,'about') == 1) ? bbcode($profile['about']) : False);
$keywords = ((x($profile,'keywords')) ? $profile['keywords'] : '');
diff --git a/mod/update_channel.php b/mod/update_channel.php
index bdde0a3be..5f4436d59 100644
--- a/mod/update_channel.php
+++ b/mod/update_channel.php
@@ -37,7 +37,7 @@ function update_channel_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
diff --git a/mod/update_display.php b/mod/update_display.php
index 5802852bb..d41e2e5cb 100644
--- a/mod/update_display.php
+++ b/mod/update_display.php
@@ -19,7 +19,7 @@ function update_display_content(&$a) {
$text = display_content($a,$profile_uid, $load);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
diff --git a/mod/update_home.php b/mod/update_home.php
index c139682e1..80ae2438f 100644
--- a/mod/update_home.php
+++ b/mod/update_home.php
@@ -15,7 +15,7 @@ function update_home_content(&$a) {
$text = home_content($a,$profile_uid, $load);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
diff --git a/mod/update_network.php b/mod/update_network.php
index 0021af876..acd5ccdc8 100644
--- a/mod/update_network.php
+++ b/mod/update_network.php
@@ -17,7 +17,7 @@ function update_network_content(&$a) {
$text = network_content($a,$profile_uid, $load);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
diff --git a/mod/update_public.php b/mod/update_public.php
index d0a08e0e6..bac1ccf15 100644
--- a/mod/update_public.php
+++ b/mod/update_public.php
@@ -15,7 +15,7 @@ function update_public_content(&$a) {
$text = public_content($a,$profile_uid, $load);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
diff --git a/mod/update_search.php b/mod/update_search.php
index ec7599b79..de29e89bd 100644
--- a/mod/update_search.php
+++ b/mod/update_search.php
@@ -40,7 +40,7 @@ function update_search_content(&$a) {
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
- $text = preg_replace($pattern, $replace, $text);
+// $text = preg_replace($pattern, $replace, $text);
if(! $load) {
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';