diff options
author | Michael Vogel <icarus@dabo.de> | 2012-03-28 19:52:30 +0200 |
---|---|---|
committer | Michael Vogel <icarus@dabo.de> | 2012-03-28 19:52:30 +0200 |
commit | bdd275474044152a5d9a33ea6b8a8071b931d27e (patch) | |
tree | b10c2b68e0236925992449786d70f45aaca21984 /include/plugin.php | |
parent | 792edfe9c834e3daeae598727e4cb15dc0ff8475 (diff) | |
parent | e894775a39920edc0e438364c818357ab809bace (diff) | |
download | volse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.tar.gz volse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.tar.bz2 volse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.zip |
Merge commit 'upstream/master'
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-x | include/plugin.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php index 8280b1022..e37ae8435 100755 --- 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'); +} |