public function display($tpl = null) { global $mainframe; $pathway =& $mainframe->getPathway(); $params =& $mainframe->getParams(); $model = KFactory::get('site::com.immotoa.model.projects'); $project = $model->getItem(); // Add metadata to header $document =& JFactory::getDocument(); $document->setMetaData('keywords', $project->metakey); $document->setMetaData('description', $project->metadesc); // load GData plugin and get the images $plugin =& JPluginHelper::getPlugin('system', 'gdata'); $images = plgSystemGdata::getAlbumFeed("immotoa_project_" . $project->id); // Build Google Static Map API URL $project->map = "http://maps.google.com/staticmap?" . "center=" . $project->coordinates . "&format=jpg&zoom=" . $params->get('maps_zoom') . "&" . "size=" . $params->get('maps_width') . "x" . $params->get('maps_height') . "&" . "maptype=roadmap&markers=" . $project->coordinates . "," . $params->get('maps_color') . "&" . "sensor=false&key=" . $params->get('maps_key'); // set breadcrumbs $pathway->addItem($project->name); $this->assignRef('project', $project); $this->assignRef('params', $params); $this->assignRef('images', $images); $this->assignRef('filter', $model->getFilters()); $this->assignRef('pagination', $model->getPagination()); // Display the layout parent::display($tpl); }
public function deletePhotoEntry($album, $data) { $albumFeed = plgSystemGdata::getAlbumFeed($album); foreach ($albumFeed as $photoEntry) { if ($photoEntry->getGphotoId()->getText() == $data['id']) { $photoEntry->delete(); } } return true; }
<?php $plugin =& JPluginHelper::getPlugin('system', 'gdata'); $images = plgSystemGdata::getAlbumFeed("immotoa_realisation_" . @$realisation->id); ?> <?php if ($images) { foreach ($images as $image) { ?> <a href="<?php echo $image->full_path; ?> "> <img class="thumbnail" height="95px" src="<?php echo $image->cropped_path; ?> " /> </a> <?php } }
public function getPhotos() { $albumFeed = plgSystemGdata::getAlbumFeed($this->getState('album')); return $albumFeed; }