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/handle_svg/theme.php
shish cc3767c1b8 get SVG size
git-svn-id: file:///home/shish/svn/shimmie2/trunk@814 7f39781d-f577-437e-ae19-be835c7a54ca
2008-04-11 06:56:31 +00:00

15 lines
496 B
PHP

<?php
class SVGFileHandlerTheme extends Themelet {
public function display_image($page, $image) {
$ilink = make_link("get_svg/{$image->id}/{$image->id}.svg");
// $ilink = $image->get_image_link();
$html = "
<object data='$ilink' type='image/svg+xml' width='{$image->width}' height='{$image->height}'>
<embed src='$ilink' type='image/svg+xml' width='{$image->width}' height='{$image->height}' />
</object>
";
$page->add_block(new Block("Image", $html, "main", 0));
}
}
?>