diff options
author | deva <deva> | 2011-11-01 09:32:21 +0000 |
---|---|---|
committer | deva <deva> | 2011-11-01 09:32:21 +0000 |
commit | 42c62cb041a2b2b95c9cda0c20fcf70334fd244c (patch) | |
tree | 38371eb37ff7348585ee84438b326c25055e2cbe /utils/modules/downloads.php | |
parent | 208e3b642149a9ac701a43397d31990f9b27ca79 (diff) |
Rewl og krat... needs cleaning up - after port to GIT.origin
Diffstat (limited to 'utils/modules/downloads.php')
-rw-r--r-- | utils/modules/downloads.php | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/utils/modules/downloads.php b/utils/modules/downloads.php index 99e9962..52c6736 100644 --- a/utils/modules/downloads.php +++ b/utils/modules/downloads.php @@ -68,6 +68,21 @@ class DownloadItem { */ } + public function showRef() + { + $str = ""; + + if($this->type == "youtube") { + $str .= "<a href=\"http://www.youtube.com/watch?v=".$this->value."\">Video: " . $this->title."</a>"; + } + + if($this->type == "vimeo") { + $str .= "<a href=\"http://www.vimeo.com/".$this->value."\">Video: " . $this->title."</a>"; + } + + return $str; + } + public function show() { global $VIDEO_WIDTH; @@ -254,6 +269,20 @@ class Downloads { */ } + public function showRef($id) + { + $bleh = explode(",", $id); + $gid = $bleh[0]; + $iid = $bleh[1]; + + $str = ""; + if($this->groups[$gid] && $this->groups[$gid]->items[$iid]) { + $str .= $this->groups[$gid]->items[$iid]->showRef(); + } + + return $str; + } + private function read() { $dom = new DomDocument; @@ -284,12 +313,12 @@ class Downloads { } } - ksort($item->sources); + // ksort($item->sources); $group->addItem($item); } } - ksort($group->items); + // ksort($group->items); $this->add($group); } } |