mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 00:35:28 +00:00
Merge branch 'dev' into release
This commit is contained in:
commit
6cf8e8f850
4 changed files with 8 additions and 10 deletions
|
@ -256,7 +256,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 . '#$]', '<img src="' . $image . '" alt="' . t('Image/photo') . '" />', $newbody);
|
||||
$newbody = str_replace('[$#saved_image' . $cnt . '#$]', '<img src="' . $image . '" alt="' . t('Image/photo') . '" loading="eager" />', $newbody);
|
||||
$cnt++;
|
||||
}
|
||||
// logger('replace_images: ' . $newbody);
|
||||
|
@ -667,7 +667,7 @@ function bb_ShareAttributes($match)
|
|||
$headline = '<div class="shared_container"> <div class="shared_header">';
|
||||
|
||||
if ($avatar != "") {
|
||||
$headline .= '<a href="' . (($auth) ? zid($profile) : $profile) . '" ><img src="' . $avatar . '" alt="' . htmlspecialchars($author, ENT_COMPAT, 'UTF-8', false) . '" height="32" width="32" /></a>';
|
||||
$headline .= '<a href="' . (($auth) ? zid($profile) : $profile) . '" ><img src="' . $avatar . '" alt="' . htmlspecialchars($author, ENT_COMPAT, 'UTF-8', false) . '" height="32" width="32" loading="lazy" /></a>';
|
||||
}
|
||||
|
||||
if (strpos($link, '/cards/')) {
|
||||
|
@ -1140,7 +1140,7 @@ function bb_imgoptions($match)
|
|||
|
||||
// now assemble the resulting img tag from these components
|
||||
|
||||
$output = '<img ' . (($match[1] === 'z') ? 'class="zrl" ' : '') . ' ';
|
||||
$output = '<img ' . (($match[1] === 'z') ? 'class="zrl" ' : '') . ' loading="eager" ';
|
||||
|
||||
if ($width) {
|
||||
$style .= 'width: 100%; max-width: ' . $width . 'px; ';
|
||||
|
@ -2084,10 +2084,10 @@ function bbcode($Text, $options = [])
|
|||
|
||||
// [img]pathtoimage[/img]
|
||||
if (strpos($Text, '[/img]') !== false) {
|
||||
$Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
|
||||
$Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" loading="eager" />', $Text);
|
||||
}
|
||||
if (strpos($Text, '[/zmg]') !== false) {
|
||||
$Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
|
||||
$Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" loading="eager" />', $Text);
|
||||
}
|
||||
|
||||
$Text = preg_replace_callback("/\[([zi])mg([ \=])(.*?)\](.*?)\[\/[zi]mg\]/ism", 'bb_imgoptions', $Text);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
define ( 'STD_VERSION', '22.06.20' );
|
||||
define ( 'STD_VERSION', '22.06.21' );
|
||||
|
|
|
@ -40,7 +40,7 @@ function contact_format(item) {
|
|||
var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick);
|
||||
if(typeof desc === 'undefined') desc = '';
|
||||
if(desc) desc = ' ('+desc+')';
|
||||
return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{4}</span></div>".format(item.taggable, item.photo, item.name, desc, typeof(item.link) !== 'undefined' ? item.link : desc.replace('(','').replace(')',''));
|
||||
return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}' loading='lazy'><span class='font-weight-bold contactname'>{2}</span><span class='dropdown-sub-text'>{4}</span></div>".format(item.taggable, item.photo, item.name, desc, typeof(item.link) !== 'undefined' ? item.link : desc.replace('(','').replace(')',''));
|
||||
}
|
||||
else
|
||||
return "<div>" + item.text + "</div>";
|
||||
|
@ -82,8 +82,6 @@ function link_replace(item) {
|
|||
return '$1'+item.link+' ';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function trim_replace(item) {
|
||||
if(typeof item.replace !== 'undefined')
|
||||
return '$1'+item.replace;
|
||||
|
|
|
@ -1570,7 +1570,7 @@ blockquote {
|
|||
.textcomplete-item.active .dropdown-item,
|
||||
.textcomplete-item:active .dropdown-item {
|
||||
color: $font_colour;
|
||||
background-color: $item_colour;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
|
|
Loading…
Reference in a new issue