From 1627297143b022e8418feb63cc34e1eba1ecb0cd Mon Sep 17 00:00:00 2001 From: Hubzilla Date: Sun, 22 Jan 2017 15:17:37 -0800 Subject: use icons for app photos. --- Zotlabs/Lib/Apps.php | 7 +++++-- view/theme/redbasic/css/style.css | 5 +++++ view/tpl/app.tpl | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 358ae409b..65f5b3556 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -337,9 +337,12 @@ class Apps { } $install_action = (($installed) ? t('Update') : t('Install')); + $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : ''); + return replace_macros(get_markup_template('app.tpl'),array( '$app' => $papp, + '$icon' => $icon, '$hosturl' => $hosturl, '$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''), '$install' => (($hosturl && $mode == 'view') ? $install_action : ''), @@ -514,7 +517,7 @@ class Apps { if((! $darray['app_url']) || (! $darray['app_channel'])) return $ret; - if($arr['photo'] && ! strstr($arr['photo'],z_root())) { + if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) { $x = import_xchan_photo($arr['photo'],get_observer_hash(),true); $arr['photo'] = $x[1]; } @@ -594,7 +597,7 @@ class Apps { if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id'])) return $ret; - if($arr['photo'] && ! strstr($arr['photo'],z_root())) { + if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) { $x = import_xchan_photo($arr['photo'],get_observer_hash(),true); $arr['photo'] = $x[1]; } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 401f052d0..5bffdd27b 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2100,3 +2100,8 @@ dl.bb-dl > dd > li { .nav-pills-stacked-icons:hover + a { background-color: #eee; } + +.app-icon { + font-size: 80px; + text-align: center; +} \ No newline at end of file diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index cfb652913..ee1a2c3a4 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,6 +1,6 @@
-- cgit v1.2.3