aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-06 19:41:02 +0000
committerMario <mario@mariovavti.com>2023-05-06 19:41:02 +0000
commit93278c00b745a67fda03395f73c79cb2ddeb12d7 (patch)
tree02ecc1cf1eb6823c3917f82800ee207291508565 /include/channel.php
parent5bbe93d49f19584e9c1a78ccbcbcaff332ddaa13 (diff)
downloadvolse-hubzilla-93278c00b745a67fda03395f73c79cb2ddeb12d7.tar.gz
volse-hubzilla-93278c00b745a67fda03395f73c79cb2ddeb12d7.tar.bz2
volse-hubzilla-93278c00b745a67fda03395f73c79cb2ddeb12d7.zip
update profile vcard to implement the cover image
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/channel.php b/include/channel.php
index bb213f102..01302a1b9 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1583,6 +1583,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details =
$reddress = true;
$connect_url = '';
$connect = '';
+ $default_cover = get_config('system', 'default_cover_photo', 'hubzilla');
+ $default_cover_url = z_root() . '/images/default_cover_photos/' . $default_cover . '/425.png';
+
+
if(! perm_is_allowed($profile['uid'], $observer_hash, 'view_profile')) {
$block = true;
@@ -1681,9 +1685,11 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details =
'$homepage' => $homepage,
'$chanmenu' => $channel_menu,
'$reddress' => $reddress,
+ '$no_pdesc' => t('This channel has not added a profile description yet'),
'$contact_block' => $contact_block,
'$change_photo' => t('Change your profile photo'),
- '$editmenu' => profile_edit_menu($profile['uid'])
+ '$editmenu' => profile_edit_menu($profile['uid']),
+ '$cover' => get_cover_photo($profile['uid'], 'array', PHOTO_RES_COVER_425) ?: ['url' => $default_cover_url]
));
$arr = [
@@ -2404,7 +2410,7 @@ function get_zcard($channel, $observer_hash = '', $args = array()) {
$cover = $r[0];
$cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['imgscale'];
} else {
- $default_cover = get_config('system','default_cover_photo','bggenerator');
+ $default_cover = get_config('system', 'default_cover_photo', 'hubzilla');
$cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ];
}
@@ -2478,7 +2484,7 @@ function get_zcard_embed($channel, $observer_hash = '', $args = array()) {
$cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['imgscale'];
}
else {
- $default_cover = get_config('system','default_cover_photo','bggenerator');
+ $default_cover = get_config('system', 'default_cover_photo', 'hubzilla');
$cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ];
}