diff options
Diffstat (limited to 'utils/modules/discography.php')
-rw-r--r-- | utils/modules/discography.php | 17 |
1 files changed, 16 insertions, 1 deletions
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 .= " <div class=\"cover\">\n"; $str .= " <a href=\"".$this->cover."\">\n"; $str .= " <img alt=\"".$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 .= " </a>\n"; $str .= " </div>\n"; $str .= " <span class=\"label\">"; @@ -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) { |