diff options
author | zotlabs <mike@macgirvin.com> | 2018-08-20 17:38:38 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-08-20 17:38:38 -0700 |
commit | a9bbfe9c4f0b783433ceb6c586022093e74aa718 (patch) | |
tree | cd6ded9db221adafeeb23d1958b8762b4e2a0a97 /Zotlabs/Widget/Cover_photo.php | |
parent | d95735deaf321eb560b3fdc0b88d25bca4be3b48 (diff) | |
download | volse-hubzilla-a9bbfe9c4f0b783433ceb6c586022093e74aa718.tar.gz volse-hubzilla-a9bbfe9c4f0b783433ceb6c586022093e74aa718.tar.bz2 volse-hubzilla-a9bbfe9c4f0b783433ceb6c586022093e74aa718.zip |
Only show cover photos once per login session. After that they can get annoying. If there is pushback on this, then it should perhaps be optional.
Diffstat (limited to 'Zotlabs/Widget/Cover_photo.php')
-rw-r--r-- | Zotlabs/Widget/Cover_photo.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Cover_photo.php b/Zotlabs/Widget/Cover_photo.php index d2eb1be92..af1ae5c7f 100644 --- a/Zotlabs/Widget/Cover_photo.php +++ b/Zotlabs/Widget/Cover_photo.php @@ -20,6 +20,16 @@ class Cover_photo { if(! $channel_id) return ''; + // only show cover photos once per login session + + if(array_key_exists('channels_visited',$_SESSION) && is_array($_SESSION['channels_visited']) && in_array($channel_id,$_SESSION['channels_visited'])) { + return EMPTY_STR; + } + if(! array_key_exists('channels_visited',$_SESSION)) { + $_SESSION['channels_visited'] = []; + } + $_SESSION['channels_visited'][] = $channel_id; + $channel = channelx_by_n($channel_id); if(array_key_exists('style', $arr) && isset($arr['style'])) |