This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/regen_thumb/theme.php
shish a625fcd787 the bulk of theme engine 2.0; it's still rough, but it works
git-svn-id: file:///home/shish/svn/shimmie2/trunk@201 7f39781d-f577-437e-ae19-be835c7a54ca
2007-06-30 01:19:11 +00:00

27 lines
884 B
PHP

<?php
class RegenThumbTheme extends Themelet {
public function display_buttons($page, $image_id) {
$html = "
<form action='".make_link("regen_thumb")."' method='POST'>
<input type='hidden' name='image_id' value='$image_id'>
<select name='program'>
<option value='convert'>ImageMagick</option>
<option value='gd'>GD</option>
<!-- <option value='epeg'>EPEG (for JPEG only)</option> -->
</select>
<input type='submit' value='Regenerate'>
</form>
";
$page->add_block(new Block("Regen Thumb", $html, "left"));
}
public function display_results($page, $image) {
$page->set_title("Thumbnail Regenerated");
$page->set_heading("Thumbnail Regenerated");
$page->add_header("<meta http-equiv=\"cache-control\" content=\"no-cache\">");
$page->add_block(new NavBlock());
$page->add_block(new Block("Thumbnail", build_thumb_html($image)));
}
}
?>