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

28 lines
771 B
PHP
Raw Normal View History

<?php
class RegenThumbTheme extends Themelet {
/*
* Show a form which offers to regenerate the thumb of an image with ID #$image_id
*/
public function get_buttons_html($image_id) {
return "
".make_form(make_link("regen_thumb"))."
<input type='hidden' name='image_id' value='$image_id'>
<input type='submit' value='Regenerate'>
</form>
";
}
/*
* Show a link to the new thumbnail
*/
2009-01-04 19:54:16 +00:00
public function display_results(Page $page, Image $image) {
$page->set_title("Thumbnail Regenerated");
$page->set_heading("Thumbnail Regenerated");
$page->add_html_header("<meta http-equiv=\"cache-control\" content=\"no-cache\">");
$page->add_block(new NavBlock());
$page->add_block(new Block("Thumbnail", $this->build_thumb_html($image)));
}
}
?>