Display theme's preview_fullsize.jpg image when existing.
This commit is contained in:
parent
465547913f
commit
a1019d5893
@ -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
|
||||
|
@ -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 = ' ';
|
||||
$preview .= ' ';
|
||||
}
|
||||
|
||||
if ($preview_link) {
|
||||
$preview .= '</a>';
|
||||
}
|
||||
|
||||
if (empty($info['customURI'])) {
|
||||
|
@ -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';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user