diff options
author | deva <deva> | 2010-02-23 09:21:02 +0000 |
---|---|---|
committer | deva <deva> | 2010-02-23 09:21:02 +0000 |
commit | d908520b7ebde8e209a5db89a505f959ad6b76c4 (patch) | |
tree | e80c930bf7d7728af9bcfd2799c9fee008252ab5 /utils/modules/discography.php | |
parent | 422a3ff80c49f50eb7841e3f30f4bd96b9d2d2ce (diff) |
New imagecache generation system.
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) { |