]> git.mxchange.org Git - friendica.git/commitdiff
theme screenshots
authorfriendica <info@friendica.com>
Mon, 26 Mar 2012 00:55:43 +0000 (17:55 -0700)
committerfriendica <info@friendica.com>
Mon, 26 Mar 2012 00:55:43 +0000 (17:55 -0700)
boot.php
images/blank.png [new file with mode: 0644]
include/plugin.php
mod/admin.php
view/admin_plugins_details.tpl
view/theme/comix-plain/screenshot.jpg [new file with mode: 0644]

index 19661805c26093ac7bc494a509d4fd8044cf960e..b2f91f3f7bb66dc79c176cb88a93d444cb56bef2 100755 (executable)
--- 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 (file)
index 0000000..67d3919
Binary files /dev/null and b/images/blank.png differ
index 8280b1022eeaa560e1be82eb3bf3119a0e053c21..df33fd3f201975e0f63c3ebd2e331fb7e7636b2d 100755 (executable)
@@ -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');
+}
index a64b2690354fa4ae7397223b8981361bc9835591..53b5ee35447a1984cd1eeeb40733e548e3d7acf3 100755 (executable)
@@ -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
                ));
        } 
index ead356f5b922b7101f49ca4cb53bb8d5eaca7b19..cbaef2d66cd42e69df40ecb63c5adc72fae8ef75 100755 (executable)
        {{ 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 (file)
index 0000000..80e66e3
Binary files /dev/null and b/view/theme/comix-plain/screenshot.jpg differ