]> git.mjollnir.org Git - s9y.git/commitdiff
Display theme's preview_fullsize.jpg image when existing.
authorgarvinhicking <garvinhicking>
Tue, 3 Apr 2007 08:21:34 +0000 (08:21 +0000)
committergarvinhicking <garvinhicking>
Tue, 3 Apr 2007 08:21:34 +0000 (08:21 +0000)
docs/NEWS
include/admin/templates.inc.php
plugins/serendipity_event_spartacus/serendipity_event_spartacus.php

index 6efc440b03aea00d42d962a9fad1da6869274a96..1160d18c6ca795a49a3f96140b4c2573c2785079 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * Display theme's preview_fullsize.jpg image when existing. Added
+      screenshots by williamts99.
+
     * Upgrade bundled Smarty to 2.6.18 (garvinhicking)
 
     * Make plugins be able to emit their own RSS-Feeds using
index 80141a831bb2d09b118c9786247906e58afdc532..8d5c5f1081b5469f0baafa049a111869b525191c 100644 (file)
@@ -127,13 +127,28 @@ echo '<h3>' . SELECT_TEMPLATE . '</h3>';
             continue;
         }
 
+        $preview = '';
+        $preview_link = false;
+        if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg')) {
+            $preview .= '<a href="' . $serendipity['baseURL'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg" target="_blank">';
+            $preview_link = true;
+        } elseif (!empty($info['preview_fullsizeURL'])) {
+            $preview .= '<a href="' . $info['preview_fullsizeURL'] . '" target="_blank">';
+            $preview_link = true;
+        } else {
+            echo "No large preview";
+        }
 
         if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview.png')) {
-            $preview = '<img src="' . $serendipity['templatePath'] . $theme . '/preview.png" width="100" style="border: 1px #000000 solid" />';
+            $preview .= '<img src="' . $serendipity['templatePath'] . $theme . '/preview.png" width="100" style="border: 1px #000000 solid" />';
         } elseif (!empty($info['previewURL'])) {
-            $preview = '<img src="' . $info['previewURL'] . '" width="100" style="border: 1px #000000 solid" />';
+            $preview .= '<img src="' . $info['previewURL'] . '" width="100" style="border: 1px #000000 solid" />';
         } else {
-            $preview = '&nbsp;';
+            $preview .= '&nbsp;';
+        }
+        
+        if ($preview_link) {
+            $preview .= '</a>';
         }
 
         if (empty($info['customURI'])) {
index 1c05c84e7efedac1cfd570233c6cc8129817d3d9..e6685868492240e593b02ee5d346c40ce25bcedd 100644 (file)
@@ -39,7 +39,7 @@ class serendipity_event_spartacus extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_SPARTACUS_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Garvin Hicking');
-        $propbag->add('version',       '2.12');
+        $propbag->add('version',       '2.13');
         $propbag->add('requirements',  array(
             'serendipity' => '0.9',
             'smarty'      => '2.6.7',
@@ -751,6 +751,7 @@ class serendipity_event_spartacus extends serendipity_event
 
                 $plugname = $pluginstack[$i]['template'];
                 $pluginstack[$i]['previewURL'] = $mirror . '/additional_themes/' . $plugname . '/preview.png?rev=1.9999';
+                $pluginstack[$i]['preview_fullsizeURL'] = $mirror . '/additional_themes/' . $plugname . '/preview_fullsize.jpg?rev=1.9999';
                 $pluginstack[$i]['customURI']  = '&amp;serendipity[spartacus_fetch]=' . $plugname;
                 $pluginstack[$i]['customIcon'] = '_spartacus';