aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Cover_photo.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Cover_photo.php')
-rw-r--r--Zotlabs/Widget/Cover_photo.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Cover_photo.php b/Zotlabs/Widget/Cover_photo.php
index af1ae5c7f..955048992 100644
--- a/Zotlabs/Widget/Cover_photo.php
+++ b/Zotlabs/Widget/Cover_photo.php
@@ -21,9 +21,9 @@ class Cover_photo {
return '';
// only show cover photos once per login session
-
+ $hide_cover = false;
if(array_key_exists('channels_visited',$_SESSION) && is_array($_SESSION['channels_visited']) && in_array($channel_id,$_SESSION['channels_visited'])) {
- return EMPTY_STR;
+ $hide_cover = true;
}
if(! array_key_exists('channels_visited',$_SESSION)) {
$_SESSION['channels_visited'] = [];
@@ -55,6 +55,7 @@ class Cover_photo {
$c = get_cover_photo($channel_id,'html');
if($c) {
+ $c = str_replace('src=', 'data-src=', $c);
$photo_html = (($style) ? str_replace('alt=',' style="' . $style . '" alt=',$c) : $c);
$o = replace_macros(get_markup_template('cover_photo_widget.tpl'),array(
@@ -62,6 +63,7 @@ class Cover_photo {
'$title' => $title,
'$subtitle' => $subtitle,
'$hovertitle' => t('Click to show more'),
+ '$hide_cover' => $hide_cover
));
}
return $o;