From 21a5f28d2795a987ec5189547bbe69cfc1ed36ce Mon Sep 17 00:00:00 2001 From: Dan Dart Date: Wed, 27 Jul 2016 23:08:35 +0100 Subject: [PATCH] Add source of video, fixes #141 --- .../modules/default/views/scripts/search/index.phtml | 3 --- .../modules/default/views/scripts/video/watch.phtml | 8 +++++++- library/Chaplin/Model/Video.php | 10 ++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/application/modules/default/views/scripts/search/index.phtml b/application/modules/default/views/scripts/search/index.phtml index 41a87e28..76885079 100644 --- a/application/modules/default/views/scripts/search/index.phtml +++ b/application/modules/default/views/scripts/search/index.phtml @@ -39,8 +39,6 @@
-
- ytUser) : ?>

Found YouTube user ytUser->getSnippet()->title; ?>

@@ -69,7 +67,6 @@
-

YouTube results for: strSearchTerm; ?>

videoFeed->items as $ytVideo): ?> diff --git a/application/modules/default/views/scripts/video/watch.phtml b/application/modules/default/views/scripts/video/watch.phtml index 0523310c..21388689 100644 --- a/application/modules/default/views/scripts/video/watch.phtml +++ b/application/modules/default/views/scripts/video/watch.phtml @@ -61,7 +61,13 @@ $vhost = Chaplin_Config_Chaplin::getInstance()->getFullVhost();

Uploaded by: video->getUsername(); ?>
Uploaded on video->getTimeCreated());?> (video->getTimeAgo(); ?>) -
Licence: video->getLicence()->getText(); ?> + video->getSource()): ?> +
Original source: Source Video + + video->getUploader()): ?> +
Original author: video->getUploader(); ?> + +
Licence: video->getLicence()->getText(); ?>
video->getDescription(); ?>

Short URL:

video->getVotesUp(); ?> / video->getVotesDown(); ?> ↓

diff --git a/library/Chaplin/Model/Video.php b/library/Chaplin/Model/Video.php index 052801cb..219e7bb1 100644 --- a/library/Chaplin/Model/Video.php +++ b/library/Chaplin/Model/Video.php @@ -172,6 +172,16 @@ public function setDescription($strDescription) return $this->_setField(self::FIELD_DESCRIPTION, $strDescription); } + public function getSource() + { + return $this->_getField(self::FIELD_SOURCE, null); + } + + public function getUploader() + { + return $this->_getField(self::FIELD_UPLOADER, null); + } + public function getComments() { return $this->_getField(self::CHILD_ASSOC_COMMENTS, array());