Beispiel #1
0
 /**
  * 
  * @return string
  */
 protected function getWidthStyleOutput()
 {
     $style = 'style="';
     if ($this->width->hasBeenSet()) {
         if ($this->size->getOutput() == 's' && $this->width->getValue() < 10) {
             // images are squares of 75x75px, and user wrote size in number of columns
             $style .= 'width: ' . (12 + 85 * $this->width->getValue()) . 'px;';
         } else {
             $style .= 'width: ' . $this->width->getOutput() . 'px;';
         }
     }
     if ($this->height->hasBeenSet()) {
         $style .= 'height: ' . $this->height->getOutput() . 'px;';
     }
     return $style . '"';
 }
 /**
  * 
  * @return string
  */
 protected function getIframeSrc()
 {
     $src = "http://500pxwidget.com/" . ($this->slideshow->getValue() ? 'sl' : 'in') . "/?" . ($this->tag->hasBeenSet() ? 'h' : 'u') . "=";
     $parameters = $this->source->getOutput() . '|in|' . $this->size->getValue() . '|' . $this->width->getValue() . '|' . $this->height->getValue() . '|' . $this->color->getOutput() . '|' . ($this->border->getValue() ? 'yes' : 'no') . '|' . $this->padding->getValue() . '|' . $this->category->getOutput();
     return $src . base64_encode($parameters) . '=';
 }