theme screenshots

This commit is contained in:
friendica
2012-03-25 17:55:43 -07:00
parent 873a55e918
commit 7ef1ed2d70
6 changed files with 22 additions and 2 deletions

View File

@@ -276,3 +276,13 @@ function get_theme_info($theme){
return $info;
}}
function get_theme_screenshot($theme) {
$a = get_app();
$exts = array('.png','.jpg');
foreach($exts as $ext) {
if(file_exists('view/theme/' . $theme . '/screenshot' . $ext))
return($a->get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext);
}
return($a->get_baseurl() . '/images/blank.png');
}