From 75a73be60c97597f93a67a4ecd412daed06cd744 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 22 Oct 2020 18:54:21 +0000 Subject: lazy/eager loading and minor css fixes --- include/bbcode.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index e5b2a068a..d79429719 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -218,7 +218,7 @@ function bb_replace_images($body, $images) { // We're depending on the property of 'foreach' (specified on the PHP website) that // it loops over the array starting from the first element and going sequentially // to the last element - $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '' . t('Image/photo') . '', $newbody); + $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '' . t('Image/photo') . '', $newbody); $cnt++; } // logger('replace_images: ' . $newbody); @@ -513,7 +513,7 @@ function bb_ShareAttributes($match) { $headline = '
'; if ($avatar != "") - $headline .= '' . $author . ''; + $headline .= '' . $author . ''; if(strpos($link,'/cards/')) $type = t('card'); @@ -881,7 +881,7 @@ function bb_imgoptions($match) { // now assemble the resulting img tag from these components - $output = '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } // [img=pathtoimage]image description[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img=http(.*?)\](.*?)\[\/img\]/ism", '$2', $Text); + $Text = preg_replace("/\[img=http(.*?)\](.*?)\[\/img\]/ism", '$2', $Text); } // [zmg]pathtoimage[/zmg] if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [zmg=pathtoimage]image description[/zmg] if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg=http(.*?)\](.*?)\[\/zmg\]/ism", '$2', $Text); + $Text = preg_replace("/\[zmg=http(.*?)\](.*?)\[\/zmg\]/ism", '$2', $Text); } $Text = preg_replace_callback("/\[([zi])mg([ \=])(.*?)\](.*?)\[\/[zi]mg\]/ism",'bb_imgoptions',$Text); -- cgit v1.2.3