aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Cover_photo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-05 12:17:32 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-05 12:17:32 +0200
commita821682c8c165077947781bca2064922884f6e7d (patch)
tree13c922587e76671760463dee4b5493fd52db6906 /Zotlabs/Widget/Cover_photo.php
parent1b7781a1597b0c9ce49eaae3b9dd27bed7f3f7ed (diff)
downloadvolse-hubzilla-a821682c8c165077947781bca2064922884f6e7d.tar.gz
volse-hubzilla-a821682c8c165077947781bca2064922884f6e7d.tar.bz2
volse-hubzilla-a821682c8c165077947781bca2064922884f6e7d.zip
instead of not displaying the cover-photo at all after first page load, load the page with the cover slided up. change pointer to n-resize if cover is not slid.
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('@','&#x40;',$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;