Exemple #1
0
 function getContent()
 {
     $content = $this->stripIdFromContent(parent::getContent());
     $markers = array();
     $geo = explode(',', $content['geo']);
     $content['geo'] = json_encode(array('lat' => $geo[0], 'long' => $geo[1], 'zoom' => intval($geo[2])));
     $content['pathEnable'] = $content['pathEnable'];
     $markers[] = array('lat' => $geo[0], 'long' => $geo[1], 'title' => $content['text'], 'text' => '', 'image' => '', 'link' => '');
     foreach ($content['markers'] as $poi) {
         $link = '';
         if ($poi->type == 'internalLink' && $poi->internalLink) {
             /*TODO quando riesco a recuperare il titolo della pagina metto a false per internal link*/
             $link = $this->limitURL($poi->internalLink, 25, true);
         } elseif ($poi->type == 'externalLink' && $poi->externalLink) {
             $link = $this->limitURL($poi->externalLink, 25, true);
         }
         $geo = explode(',', $poi->poi);
         $markers[] = array('lat' => $geo[0], 'long' => $geo[1], 'title' => $poi->title, 'image' => $poi->image['__html__'], 'text' => $poi->text, 'link' => $link);
     }
     $geo = $geo = explode(',', $content['geo']);
     $content['markers'] = json_encode($markers);
     $content['style'] = 'width: ' . ($content['width'] ? $content['width'] . 'px' : '100%') . '; height: ' . ($content['height'] ? $content['height'] . 'px' : '600px');
     $siteProp = $this->_application->getSiteProperty();
     $content['jsSrc'] = 'https://maps.googleapis.com/maps/api/js' . (isset($siteProp['googleMapsApiKey']) ? '?key=' . $siteProp['googleMapsApiKey'] : '');
     return $content;
 }
Exemple #2
0
 function getContent()
 {
     $imageCrop = $this->loadContent($this->getId() . '-imageCrop');
     $imagePan = $this->loadContent($this->getId() . '-imagePan');
     $imagePosition = $imageCrop == 1 && $imagePan == 1 ? 'top right' : '50%';
     $content = parent::getContent();
     return array('images' => $content[$this->getId() . '-images'], 'imageCrop' => $imageCrop == 1 ? 'true' : 'false', 'imagePan' => $imagePan == 1 ? 'true' : 'false', 'imagePosition' => $imagePosition, 'type' => $this->galleryType);
 }
Exemple #3
0
 function getContent()
 {
     $content = parent::getContent();
     $content = $this->stripIdFromContent($content);
     if (!empty($content['unity3DFile']['mediaId'])) {
         return array('fileId' => $content['unity3DFile']['mediaId'], 'width' => empty($content['width']) ? '800' : $content['width'], 'height' => empty($content['height']) ? '600' : $content['height'], 'backgroundColor' => strtoupper(str_replace('#', '', $content['backgroundColor'])), 'borderColor' => strtoupper(str_replace('#', '', $content['borderColor'])), 'textColor' => strtoupper(str_replace('#', '', $content['textColor'])), 'logoimage' => 'http://localhost/mibac_movio/wwwRoot/getImage.php?id=' . $content['logoimage']['mediaId'], 'disableContextMenu' => empty($content['disableContextMenu']) ? 'false' : $content['disableContextMenu'], 'disableFullscreen' => empty($content['disableFullscreen']) ? 'false' : $content['disableFullscreen'], 'attributes' => json_encode($content['attributeList']));
     }
     return array();
 }
Exemple #4
0
 function getContent()
 {
     $content = parent::getContent();
     $newContent = array();
     $newContent['textAlternative'] = $content[$this->getId() . '-textAlternative'];
     $newContent['video'] = $content[$this->getId() . '-video'];
     $newContent['width'] = $content[$this->getId() . '-width'];
     $newContent['height'] = $content[$this->getId() . '-height'];
     //$newContent['autostart'] = $content[$this->getId().'-autostart']['value'] == '1';
     return $newContent;
 }
Exemple #5
0
 function process_ajax()
 {
     $c = $this->getRootComponent();
     $c->process();
     $content = $this->stripIdFromContent(parent::getContent());
     $timeline = array('date' => array(), 'type' => 'default', 'headline' => $content['title'], 'text' => $content['subtitle'], 'startDate' => $this->formatDate($content['startDate']));
     $num = count($content['timelineDef']);
     for ($i = 0; $i < $num; $i++) {
         $temp = array('headline' => '', 'text' => '', 'asset' => array('media' => '', 'caption' => '', 'credit' => ''));
         if ($content['timelineDef'][$i]->startDate) {
             $temp['startDate'] = $this->formatDate($content['timelineDef'][$i]->startDate);
         }
         if ($content['timelineDef'][$i]->endDate) {
             $temp['endDate'] = $this->formatDate($content['timelineDef'][$i]->endDate);
         }
         if ($content['timelineDef'][$i]->headline) {
             $temp['headline'] = $content['timelineDef'][$i]->headline;
         }
         if ($content['timelineDef'][$i]->text) {
             $temp['text'] = $content['timelineDef'][$i]->text;
         }
         if ($content['timelineDef'][$i]->mediaExternal) {
             $temp['asset']['media'] = $content['timelineDef'][$i]->mediaExternal;
         } else {
             if ($content['timelineDef'][$i]->media['mediaId'] > 0) {
                 $temp['asset']['media'] = GLZ_HOST . '/' . org_glizy_helpers_Media::getResizedImageUrlById($content['timelineDef'][$i]->media['mediaId'], false, __Config::get('IMAGE_WIDTH'), __Config::get('IMAGE_HEIGHT'));
                 $temp['asset']['thumbnail'] = GLZ_HOST . '/' . org_glizy_helpers_Media::getResizedImageUrlById($content['timelineDef'][$i]->media['mediaId'], false, __Config::get('THUMB_WIDTH'), __Config::get('THUMB_HEIGHT'));
             }
         }
         if ($content['timelineDef'][$i]->mediaCaption) {
             $temp['asset']['caption'] = $content['timelineDef'][$i]->mediaCaption;
         }
         $timeline['date'][] = $temp;
     }
     return array('timeline' => $timeline);
 }