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/contrib/zoom/main.php
2009-08-20 23:37:32 +01:00

21 lines
553 B
PHP

<?php
/*
* Name: Image Zoom
* Author: Shish <webmaster@shishnet.org>
* License: GPLv2
* Description: Scales down too-large images using browser based scaling
*/
class Zoom extends SimpleExtension {
public function onDisplayingImage($event) {
global $config, $page;
$this->theme->display_zoomer($page, $event->image, $config->get_bool("image_zoom", false));
}
public function onSetupBuilding($event) {
$sb = new SetupBlock("Image Zoom");
$sb->add_bool_option("image_zoom", "Zoom by default: ");
$event->panel->add_block($sb);
}
}
?>