From d908520b7ebde8e209a5db89a505f959ad6b76c4 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 23 Feb 2010 09:21:02 +0000 Subject: New imagecache generation system. --- utils/modules/discography.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'utils/modules/discography.php') diff --git a/utils/modules/discography.php b/utils/modules/discography.php index a8bfb5e..bc37022 100644 --- a/utils/modules/discography.php +++ b/utils/modules/discography.php @@ -139,7 +139,7 @@ class Disc { $str .= "
\n"; $str .= " cover."\">\n"; $str .= " \"".$this-title." cover\"\n"; - $str .= " src=\"?mode=imagecache&uri=" . $this->cover . "&mw=200&mh=200\"/>\n"; + $str .= " src=\"?mode=imagecache&uri=" . $this->cover . "&mod=discography&cat=cover\"/>\n"; $str .= " \n"; $str .= "
\n"; $str .= " "; @@ -247,6 +247,15 @@ class Discography { $key = $disc->releasetime; $this->discs[$key] = $disc; } + + public function getImageSize($cat) + { + switch($cat) { + default: + case "cover": + return new ImageSize($this->coverwidth, $this->coverheight); + } + } public function write() { @@ -267,6 +276,12 @@ class Discography { $dom = new DomDocument; $dom->preserveWhiteSpace = FALSE; $dom->load($this->file); + + $discography = $dom->documentElement; + + $this->coverwidth = $discography->getAttribute('coverwidth'); + $this->coverheight = $discography->getAttribute('coverheight'); + $discs = $dom->getElementsByTagName('disc'); foreach($discs as $d) { -- cgit v1.2.3