summaryrefslogtreecommitdiff
path: root/utils/modules/downloads.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/downloads.php')
-rw-r--r--utils/modules/downloads.php33
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);
}
}