Пример #1
0
 protected function getOutput()
 {
     $source = $this->source->getParameter()->getName();
     // 'track' or 'album'
     $id = $this->source->getOutput();
     $lang = $this->lang->getOutput();
     $autoplay = $this->autoplay->getValue() ? 'playerautoplay=1&' : '';
     return '
         <div class="' . $this->getCSSClasses() . '">
         <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="300" width="200" align="middle">
         <param name="allowScriptAccess" value="always">
         <param name="wmode" value="transparent">
         <param name="movie" value="http://widgets.jamendo.com/' . $lang . '/' . $source . '/?' . $source . '_id=' . $id . '&amp;' . $autoplay . 'playertype=2008">
         <param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">
         <embed src="http://widgets.jamendo.com/' . $lang . '/' . $source . '/?' . $source . '_id=' . $id . '&amp;' . $autoplay . 'playertype=2008" quality="high" wmode="transparent" bgcolor="#FFFFFF" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="300" width="200" align="middle">
         </object>
         </div>';
 }
Пример #2
0
 /**
  * Called after arguments have been parsed, parameters are set and validated.
  * 
  * Returns the output as raw HTML.
  * 
  * @return string raw HTML
  */
 protected function getOutput()
 {
     if ($this->target->getParameter()->getName() == 'url') {
         $content = $this->getOutputAsPlusOneButton();
     } elseif ($this->icon->getValue()) {
         $content = $this->getOutputAsIcon();
     } else {
         $content = $this->getOutputAsBadge();
     }
     return $this->wrapFloatDiv($content);
 }
Пример #3
0
 /**
  * Called after arguments have been parsed, parameters are set and validated.
  * 
  * Returns the output as raw HTML.
  * 
  * @return string raw HTML
  */
 protected function getOutput()
 {
     // source is required, at this point, we are sure that one of the subparameters has been set
     $source = $this->source->getParameter();
     $source_type = $source->getName() . 's';
     $source_id = $source->getOutput();
     return '<iframe
                 class="' . $this->getCSSClasses() . '"
                 width="' . $this->width->getOutput() . '"
                 height="' . $this->height->getOutput() . '"
                 scrolling="no"
                 frameborder="no"
                 src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2F' . $source_type . '%2F' . $source_id . '&amp;auto_play=' . $this->autoplay->getOutput() . '&amp;show_artwork=' . $this->artwork->getOutput() . '&amp;color=e22c2e&amp;show_comments=' . $this->comments->getOutput() . '&amp;show_playcount=' . $this->playcount->getOutput() . '&amp;liking=' . $this->like->getOutput() . '">
             </iframe>';
 }
Пример #4
0
 /**
  * Called after arguments have been parsed, parameters are set and validated.
  * 
  * Returns the output as raw HTML.
  * 
  * @return string raw HTML
  */
 protected function getOutput()
 {
     $size = $this->size->getOutput();
     list($width, $height) = self::$SIZES[$size];
     $source = $this->source->getParameter();
     $source_type = $source->getName();
     $source_id = $source->getValue();
     $link_col = self::$LINK_COLOR;
     return '<iframe
         class="' . $this->getCSSClasses() . '"
         style="' . $this->getCSSStyle() . '"
         width="' . $width . '"
         height="' . $height . '"
         src="http://bandcamp.com/EmbeddedPlayer/v=2/' . $source_type . '=' . $source_id . '/size=' . $size . '/linkcol=' . $link_col . '/transparent"
         allowtransparency="true"
         frameborder="0"></iframe>';
 }
Пример #5
0
 /**
  * 
  * @return string
  */
 protected function getType()
 {
     // "source" parameter is required ; at this point, source->getParameter() will return parameter "source" or "search'
     $source = $this->source->getParameter();
     if ($source->getName() == "user") {
         if ($this->faves->getValue()) {
             return 'faves';
         } elseif ($this->list->getValue()) {
             return 'list';
         } elseif ($this->follow->getValue()) {
             return 'follow';
         } else {
             return 'profile';
         }
     } else {
         // $source->getName() == "search"
         return 'search';
     }
 }