From c88674aaf23ede573f19a2b363dfccf9627a5dcb Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 25 Mar 2012 19:05:14 -0700 Subject: theme preview for end users --- mod/pretheme.php | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mod/pretheme.php (limited to 'mod/pretheme.php') diff --git a/mod/pretheme.php b/mod/pretheme.php new file mode 100644 index 000000000..5a71bbe53 --- /dev/null +++ b/mod/pretheme.php @@ -0,0 +1,6 @@ + get_theme_screenshot($_REQUEST['theme']))); + killme(); +} -- 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) --- mod/pretheme.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mod/pretheme.php') diff --git a/mod/pretheme.php b/mod/pretheme.php index 5a71bbe53..0efa587d8 100644 --- a/mod/pretheme.php +++ b/mod/pretheme.php @@ -1,6 +1,16 @@ get_theme_screenshot($_REQUEST['theme']))); + + if($_REQUEST['theme']) { + $theme = $_REQUEST['theme']; + $info = get_theme_info($theme); + if($info) { + // unfortunately there will be no translation for this string + $desc = $info['description'] . ' ' . $info['version']; + } + else $desc = ''; + echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc)); + } killme(); } -- cgit v1.2.3