summaryrefslogtreecommitdiff
path: root/utils/modules/discography.php
diff options
context:
space:
mode:
authordeva <deva>2010-02-23 09:21:02 +0000
committerdeva <deva>2010-02-23 09:21:02 +0000
commitd908520b7ebde8e209a5db89a505f959ad6b76c4 (patch)
treee80c930bf7d7728af9bcfd2799c9fee008252ab5 /utils/modules/discography.php
parent422a3ff80c49f50eb7841e3f30f4bd96b9d2d2ce (diff)
New imagecache generation system.
Diffstat (limited to 'utils/modules/discography.php')
-rw-r--r--utils/modules/discography.php17
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&amp;uri=" . $this->cover . "&amp;mw=200&amp;mh=200\"/>\n";
+ $str .= " src=\"?mode=imagecache&amp;uri=" . $this->cover . "&amp;mod=discography&amp;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) {