From 7ef1ed2d7045a381c032d2142413b3a14af0d8e3 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 25 Mar 2012 17:55:43 -0700 Subject: theme screenshots --- include/plugin.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/plugin.php') diff --git a/include/plugin.php b/include/plugin.php index 8280b1022..df33fd3f2 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -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'); +} -- cgit v1.2.3 From 4c585f759f5c2662b2d761adccdf2c6dafd31249 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 26 Mar 2012 18:15:10 -0700 Subject: theme description with preview (non-translatable unfortunately) --- include/plugin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/plugin.php') diff --git a/include/plugin.php b/include/plugin.php index df33fd3f2..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]); -- cgit v1.2.3