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 display($tpl = null) { global $mainframe; $pathway =& $mainframe->getPathway(); $params =& $mainframe->getParams(); $model = KFactory::get('site::com.picman.model.album'); $album = $model->getItem(); // set Breadcrumbs $pathway->addItem($album->name); // set Document data $document =& JFactory::getDocument(); $document->setMetaData('keywords', $album->metakey); $document->setMetaData('description', $album->metadesc); $document->setTitle($album->name); // Load GData plugin $plugin =& JPluginHelper::getPlugin('system', 'gdata'); $gdata = new JParameter($plugin->params); // get Simple XML feed from GData Plugin $album = "picman_album_" . $album->id; $query = "kind=photo&access=all&thumbsize=144c&imgmax=512"; $simpleXml = plgSystemGdata::getSimpleXml($album, $query); $this->assignRef('album', $album); $this->assignRef('params', $params); $this->assignRef('simpleXml', $simpleXml); $this->assignRef('filter', $model->getFilters()); $this->assignRef('pagination', $model->getPagination()); // Display the layout parent::display($tpl); }
public function delete() { $cid = KInput::get('cid', 'post', 'array.ints', null, array()); JPluginHelper::importPlugin('gdata', 'gdata'); foreach ($cid as $id) { $userFeed = plgSystemGdata::deleteAlbumEntry('immotoa_realisation_' . $id); } parent::delete(); }
public function delete() { $cid = KInput::get('cid', 'post', 'array.ints', null, array()); JPluginHelper::importPlugin('gdata', 'gdata'); $userFeed = plgSystemGdata::getUserFeed(); foreach ($cid as $id) { // Remove albums from Picasa Server foreach ($userFeed as $userEntry) { if ($userEntry->title->text == "duuka_item_" . $id) { $userEntry->delete(); } } } parent::delete(); }
public function insertAlbumEntry($title) { // Get plugin info $plugin =& JPluginHelper::getPlugin('system', 'gdata'); $params = new JParameter($plugin->params); plgSystemGdata::gimport('Zend.Gdata.ClientLogin'); plgSystemGdata::gimport('Zend.Gdata.Photos'); plgSystemGdata::gimport('Zend.Gdata.AuthSub'); $username = $params->get('domain_admin_email'); $pass = $params->get('domain_admin_password'); $serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($username, $pass, $serviceName); // update the second argument to be CompanyName-ProductName-Version $gp = new Zend_Gdata_Photos($client, "Google-DevelopersGuide-1.0"); $entry = new Zend_Gdata_Photos_AlbumEntry(); $entry->setTitle($gp->newTitle($title)); $entry->setGphotoAccess($gp->newAccess("public")); $createdEntry = $gp->insertAlbumEntry($entry); 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 upload($data) { plgSystemGdata::insertPhotoEntry($data); return true; }