2007-04-16 11:58:25 +00:00
|
|
|
<?php
|
2009-08-20 23:37:17 +01:00
|
|
|
/*
|
2008-04-11 06:12:07 +00:00
|
|
|
* Name: Image Zoom
|
|
|
|
* Author: Shish <webmaster@shishnet.org>
|
|
|
|
* License: GPLv2
|
|
|
|
* Description: Scales down too-large images using browser based scaling
|
|
|
|
*/
|
2007-04-16 11:58:25 +00:00
|
|
|
|
2009-05-11 14:09:24 -07:00
|
|
|
class Zoom extends SimpleExtension {
|
|
|
|
public function onDisplayingImage($event) {
|
|
|
|
global $config, $page;
|
|
|
|
$this->theme->display_zoomer($page, $event->image, $config->get_bool("image_zoom", false));
|
2007-04-16 11:58:25 +00:00
|
|
|
}
|
|
|
|
|
2009-05-11 14:09:24 -07:00
|
|
|
public function onSetupBuilding($event) {
|
|
|
|
$sb = new SetupBlock("Image Zoom");
|
|
|
|
$sb->add_bool_option("image_zoom", "Zoom by default: ");
|
|
|
|
$event->panel->add_block($sb);
|
|
|
|
}
|
2007-04-16 11:58:25 +00:00
|
|
|
}
|
|
|
|
?>
|