aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-25 22:40:24 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-25 22:40:24 -0400
commit758e1b7424c8210a60df16a12f3ba3d32b433192 (patch)
tree1f811fa66480bb16cbd726257dc935185b58b15b
parent3d62cb97822e0bd9e5be0c404664667cb7cb8d98 (diff)
parent7ab117fd31c31cba4880cfcc63fc940531850455 (diff)
downloadvolse-hubzilla-758e1b7424c8210a60df16a12f3ba3d32b433192.tar.gz
volse-hubzilla-758e1b7424c8210a60df16a12f3ba3d32b433192.tar.bz2
volse-hubzilla-758e1b7424c8210a60df16a12f3ba3d32b433192.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: theme screenshots * master:
-rwxr-xr-xboot.php2
-rw-r--r--images/blank.pngbin0 -> 1366 bytes
-rwxr-xr-xinclude/plugin.php10
-rwxr-xr-xmod/admin.php8
-rwxr-xr-xview/admin_plugins_details.tpl4
-rw-r--r--view/theme/comix-plain/screenshot.jpgbin0 -> 323812 bytes
6 files changed, 22 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 19661805c..b2f91f3f7 100755
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1291' );
+define ( 'FRIENDICA_VERSION', '2.3.1292' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1133 );
diff --git a/images/blank.png b/images/blank.png
new file mode 100644
index 000000000..67d391966
--- /dev/null
+++ b/images/blank.png
Binary files differ
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');
+}
diff --git a/mod/admin.php b/mod/admin.php
index a64b26903..53b5ee354 100755
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -583,6 +583,7 @@ function admin_page_plugins(&$a){
'$admin_form' => $admin_form,
'$function' => 'plugins',
+ '$screenshot' => '',
'$readme' => $readme
));
}
@@ -738,7 +739,11 @@ function admin_page_themes(&$a){
}
$admin_form="";
-
+
+ $screenshot = array( get_theme_screenshot($theme), t('Screenshot'));
+ if(! stristr($screenshot[0],$theme))
+ $screenshot = null;
+
$t = get_markup_template("admin_plugins_details.tpl");
return replace_macros($t, array(
'$title' => t('Administration'),
@@ -755,6 +760,7 @@ function admin_page_themes(&$a){
'$admin_form' => $admin_form,
'$str_author' => t('Author: '),
'$str_maintainer' => t('Maintainer: '),
+ '$screenshot' => $screenshot,
'$readme' => $readme
));
}
diff --git a/view/admin_plugins_details.tpl b/view/admin_plugins_details.tpl
index ead356f5b..cbaef2d66 100755
--- a/view/admin_plugins_details.tpl
+++ b/view/admin_plugins_details.tpl
@@ -16,6 +16,10 @@
{{ endfor }}
</p>
+ {{ if $screenshot }}
+ <a href="$screenshot.0" ><img src="$screenshot.0" width="320" height="240" alt="$screenshot.1" /></a>
+ {{ endif }}
+
{{ if $admin_form }}
<h3>$settings</h3>
<form method="post" action="$baseurl/admin/$function/$plugin/">
diff --git a/view/theme/comix-plain/screenshot.jpg b/view/theme/comix-plain/screenshot.jpg
new file mode 100644
index 000000000..80e66e312
--- /dev/null
+++ b/view/theme/comix-plain/screenshot.jpg
Binary files differ