/** * This function is used to display current user watch history * User can watch his/her watch history details with infinite scroll pagination features * This function first display some sets of videos and then if user scroll down then it load another set of videos * User can delete a required watch history videos by clicking close icon on top right corner of thumb image * User can delete all watch history videos by clicking clear videos button * User can pause watch history by clicking pause history button * User can resume watch history by clicking resume history button * @return string */ public function showTemplate() { $output = ''; $output = '<div class="watchOuterBox" style="box-sizing:border-box;"> <div class="watchInnerBox"> <div class="watchButtonContainer">'; if ($this->watchHistoryStatus == 1) { $output .= '<button class="pauseButton watchButton" id="pauseButton" onclick="changeWatchHistoryStatus(' . "'pause'" . ')" title="' . __('Pause watch history', APPTHA_VGALLERY) . '">' . __('Pause watch history', APPTHA_VGALLERY) . '</button>'; } if ($this->watchHistoryStatus == -2) { $output .= '<button class="resumeButton watchButton" id="resumeButton" onclick="changeWatchHistoryStatus(' . "'resume'" . ')" title="' . __('Resume Watch History', APPTHA_VGALLERY) . '">' . __('Resume Watch History', APPTHA_VGALLERY) . '</button>'; } if (count($this->videoDetails) > 0) { $output .= '<button class="clearButton watchButton" id="clearButton" title="' . __('Clear Watch History', APPTHA_VGALLERY) . '">' . __('Clear Watch History', APPTHA_VGALLERY) . '</button>'; } $output .= '</div><div class="watchVideoContainer" data-setaction ="history" data-totalvideocount="' . $this->watchHistoryCount . '" data-loaderthumb = "' . $this->thumbPath . '">'; if (count($this->videoDetails) > 0) { $output .= getVideosHelper('history', $this->videoDetails, $this->thumbPath . 'nothumbimage.jpg', $this->ratearray, $this->closeButtonPath); } else { $output .= '<div class="watchVideo"> <p class="noWatchFound">' . __('No Videos Found', APPTHA_VGALLERY) . '</p> </div>'; } $output .= '</div></div></div>'; echo $output; }
/** * Function getPlaylistVideoTemplate is used to display current user playlist videos * @return string */ public function getPlaylistVideoTemplate() { $playlistCount = $this->playlistVideoCount; $videoOutput = ''; $videoOutput .= '<div class="playlistTemplateContainer" > <div class="playlistContainerBox">'; $videoOutput .= ' <div class="playlistDetailElement"> <p class="playlistNameElement" data-playlistname="' . $this->playlistName . '"><span class="spanForPlaylist">' . $this->playlistName . '</span> <span class="spanForEditName"><img src="' . $this->thumbPath . 'edit3.gif" title="Edit playlist title" style="width:24px !important;height:24px !important;cursor:pointer"></span> </p>'; if (!empty($this->playlistName)) { $videoOutput .= '<span class="deletePlaylistButton" data-plid="' . $this->playlistId . '" style="margin-right:5px" title="' . __('Delete Playlist', APPTHA_VGALLERY) . '">' . __('Delete Playlist', APPTHA_VGALLERY) . '</span>'; } if (!empty($this->videoDetails)) { $videoOutput .= '<span class="clearPlaylistButton" data-plid="' . $this->playlistId . '" title="' . __('Clear Videos', APPTHA_VGALLERY) . '">' . __('Clear Videos', APPTHA_VGALLERY) . '</span>'; } $videoOutput .= '</div> </div> <div class="watchVideoContainer playlistScrollData" data-plid="' . $this->playlistId . '" data-setaction ="playlistvideos" data-totalvideocount="' . $playlistCount . '" data-loaderthumb = "' . $this->thumbPath . '">'; if (!empty($this->videoDetails)) { $videoOutput .= getVideosHelper('playlist', $this->videoDetails, $this->thumbPath . 'nothumbimage.jpg', $this->ratearray, $this->closeButtonPath); } else { $videoOutput .= '<div class="watchVideo"> <p class="noWatchFound">' . __('No Videos Found', APPTHA_VGALLERY) . '</p> </div>'; } $videoOutput .= '</div></div>'; return $videoOutput; }