예제 #1
0
 /**
  * Returns section html.
  *
  * @param $class string
  * @return string
  */
 public static function axGetPage()
 {
     global $wgRequest;
     $pageId = (int) $wgRequest->getVal('page');
     $serieId = (int) $wgRequest->getVal('serie');
     $crunchyroll = new CrunchyrollVideo();
     $crunchyroll->setSerieId($serieId);
     return array('page' => $crunchyroll->getPaginatedGallery($pageId, true), 'paginator' => $crunchyroll->getBarHTML());
 }
예제 #2
0
 protected function showSerie()
 {
     global $wgOut;
     $Video = new CrunchyrollVideo();
     $Video->setSerieId($this->serieId);
     $gallery = $Video->getPaginatedGallery($this->page);
     $wgOut->addHTML('<h1>' . $Video->title . '</h1>');
     $wgOut->addHTML($this->getPlayer());
     $wgOut->addHTML($gallery);
 }
 public static function makeCrunchyrollGallery($contents, $attributes, $parser)
 {
     $crunchyRollVideo = new CrunchyrollVideo();
     if (isset($attributes['serie'])) {
         $crunchyRollVideo->setSerie($attributes['serie']);
     }
     if (isset($attributes['serieid'])) {
         $crunchyRollVideo->setSerieId($attributes['serieid']);
     }
     if (isset($attributes['number'])) {
         $crunchyRollVideo->setNumber($attributes['number']);
     } else {
         $crunchyRollVideo->setNumber(6);
     }
     return $crunchyRollVideo->getGallery();
 }