From 78f655f877d2d2b7afd6d606edabc5b0df638738 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 22 Oct 2020 19:11:03 +0000 Subject: more lazy, less eager --- include/bbcode.php | 12 ++++++------ view/tpl/contact_template.tpl | 2 +- view/tpl/micropro_img.tpl | 2 +- view/tpl/photo_top.tpl | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index d79429719..c5d58e80d 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); @@ -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); diff --git a/view/tpl/contact_template.tpl b/view/tpl/contact_template.tpl index 73fa5adde..7c8c02ea2 100755 --- a/view/tpl/contact_template.tpl +++ b/view/tpl/contact_template.tpl @@ -1,6 +1,6 @@
- {{$contact.name}} + {{$contact.name}} {{if $contact.perminfo}}{{include "connstatus.tpl" perminfo=$contact.perminfo}}{{/if}}
diff --git a/view/tpl/micropro_img.tpl b/view/tpl/micropro_img.tpl index 98f33d119..5bfca615f 100755 --- a/view/tpl/micropro_img.tpl +++ b/view/tpl/micropro_img.tpl @@ -1 +1 @@ - + diff --git a/view/tpl/photo_top.tpl b/view/tpl/photo_top.tpl index a86aa7f80..16862a8d6 100755 --- a/view/tpl/photo_top.tpl +++ b/view/tpl/photo_top.tpl @@ -1,4 +1,4 @@ - {{if $photo.album.name}}{{$photo.album.name}}{{elseif $photo.desc}}{{$photo.desc}}{{elseif $photo.alt}}{{$photo.alt}}{{else}}{{$photo.unknown}}{{/if}} + {{if $photo.album.name}}{{$photo.album.name}}{{elseif $photo.desc}}{{$photo.desc}}{{elseif $photo.alt}}{{$photo.alt}}{{else}}{{$photo.unknown}}{{/if}} -- cgit v1.2.3