X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fplugin.php;h=e37ae84357e2bba73d9a702ba3bb2fb6993d1fe9;hb=355c42cb309eb1313097411067ca999b699aa620;hp=8280b1022eeaa560e1be82eb3bf3119a0e053c21;hpb=5f7858a688a1b6877246933a6c4c72318c885109;p=friendica.git diff --git a/include/plugin.php b/include/plugin.php old mode 100755 new mode 100644 index 8280b1022e..e37ae84357 --- a/include/plugin.php +++ b/include/plugin.php @@ -249,6 +249,7 @@ function get_theme_info($theme){ list($k,$v) = array_map("trim", explode(":",$l,2)); $k= strtolower($k); if ($k=="author"){ + $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m); if ($r) { $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]); @@ -276,3 +277,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'); +}