From 9b0b00ffb059d9bbd195858d926c7ad575def0d4 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 3 Apr 2007 08:21:34 +0000 Subject: [PATCH] Display theme's preview_fullsize.jpg image when existing. --- docs/NEWS | 3 +++ include/admin/templates.inc.php | 21 ++++++++++++++++--- .../serendipity_event_spartacus.php | 3 ++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 6efc440..1160d18 100644 --- 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 diff --git a/include/admin/templates.inc.php b/include/admin/templates.inc.php index 80141a8..8d5c5f1 100644 --- a/include/admin/templates.inc.php +++ b/include/admin/templates.inc.php @@ -127,13 +127,28 @@ echo '

' . SELECT_TEMPLATE . '

'; continue; } + $preview = ''; + $preview_link = false; + if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg')) { + $preview .= ''; + $preview_link = true; + } elseif (!empty($info['preview_fullsizeURL'])) { + $preview .= ''; + $preview_link = true; + } else { + echo "No large preview"; + } if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview.png')) { - $preview = ''; + $preview .= ''; } elseif (!empty($info['previewURL'])) { - $preview = ''; + $preview .= ''; } else { - $preview = ' '; + $preview .= ' '; + } + + if ($preview_link) { + $preview .= ''; } if (empty($info['customURI'])) { diff --git a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php index 1c05c84..e668586 100644 --- a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php +++ b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php @@ -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'] = '&serendipity[spartacus_fetch]=' . $plugname; $pluginstack[$i]['customIcon'] = '_spartacus'; -- 2.39.5