mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
theme screenshots
This commit is contained in:
parent
873a55e918
commit
7ef1ed2d70
6 changed files with 22 additions and 2 deletions
2
boot.php
2
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 );
|
||||
|
||||
|
|
BIN
images/blank.png
Normal file
BIN
images/blank.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -583,6 +583,7 @@ function admin_page_plugins(&$a){
|
|||
|
||||
'$admin_form' => $admin_form,
|
||||
'$function' => 'plugins',
|
||||
'$screenshot' => '',
|
||||
'$readme' => $readme
|
||||
));
|
||||
}
|
||||
|
@ -739,6 +740,10 @@ 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
|
||||
));
|
||||
}
|
||||
|
|
|
@ -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/">
|
||||
|
|
BIN
view/theme/comix-plain/screenshot.jpg
Normal file
BIN
view/theme/comix-plain/screenshot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 KiB |
Loading…
Reference in a new issue