use icons for app photos.
This commit is contained in:
parent
951376852c
commit
1627297143
@ -337,9 +337,12 @@ class Apps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$install_action = (($installed) ? t('Update') : t('Install'));
|
$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(
|
return replace_macros(get_markup_template('app.tpl'),array(
|
||||||
'$app' => $papp,
|
'$app' => $papp,
|
||||||
|
'$icon' => $icon,
|
||||||
'$hosturl' => $hosturl,
|
'$hosturl' => $hosturl,
|
||||||
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
|
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
|
||||||
'$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
|
'$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
|
||||||
@ -514,7 +517,7 @@ class Apps {
|
|||||||
if((! $darray['app_url']) || (! $darray['app_channel']))
|
if((! $darray['app_url']) || (! $darray['app_channel']))
|
||||||
return $ret;
|
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);
|
$x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
|
||||||
$arr['photo'] = $x[1];
|
$arr['photo'] = $x[1];
|
||||||
}
|
}
|
||||||
@ -594,7 +597,7 @@ class Apps {
|
|||||||
if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id']))
|
if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id']))
|
||||||
return $ret;
|
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);
|
$x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
|
||||||
$arr['photo'] = $x[1];
|
$arr['photo'] = $x[1];
|
||||||
}
|
}
|
||||||
|
@ -2100,3 +2100,8 @@ dl.bb-dl > dd > li {
|
|||||||
.nav-pills-stacked-icons:hover + a {
|
.nav-pills-stacked-icons:hover + a {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-icon {
|
||||||
|
font-size: 80px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="app-detail{{if $deleted}} app-deleted{{/if}}">
|
<div class="app-detail{{if $deleted}} app-deleted{{/if}}">
|
||||||
<a href="{{$app.url}}" {{if $ap.target}}target="{{$ap.target}}" {{/if}}{{if $app.desc}}title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}><img src="{{$app.photo}}" width="80" height="80" />
|
<a href="{{$app.url}}" {{if $ap.target}}target="{{$ap.target}}" {{/if}}{{if $app.desc}}title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
|
||||||
<div class="app-name" style="text-align:center;">{{$app.name}}</div>
|
<div class="app-name" style="text-align:center;">{{$app.name}}</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user