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..965566523 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'] = [];
@@ -53,6 +53,7 @@ class Cover_photo {
$subtitle = str_replace('@','@',$channel['xchan_addr']);
$c = get_cover_photo($channel_id,'html');
+ $c = str_replace('src=', 'data-src=', $c);
if($c) {
$photo_html = (($style) ? str_replace('alt=',' style="' . $style . '" alt=',$c) : $c);
@@ -62,6 +63,7 @@ class Cover_photo {
'$title' => $title,
'$subtitle' => $subtitle,
'$hovertitle' => t('Click to show more'),
+ '$hide_cover' => $hide_cover
));
}
return $o;