Source

joomla-picasa / site / views / joomlapicasa2 / tmpl / default.php

Full commit
<?php

// no direct access
defined('_JEXEC') or die('Restricted access');

if ($this->params->get('picasaInstantEnabled') == '1'){
	$instantScript = "<script type='text/javascript' src='" . $this->baseurl . "/components/com_joomlapicasa2/libraries/instant/instant.js'></script>";
	$mainframe->addCustomHeadTag($instantScript);
}

echo "<h1>". JText::_('Jp2_welcome') ."</h1>";

echo "<strong>" . sizeof($this->albumsList) . "</strong>" . " " . JText::_('Jp2_albums_present') . " " . "<strong>" . $this->params->get('picasaUsername') . "</strong><br /><br />";

echo "<p align=center>";

echo "<table>";
for ($i = 0; $i < sizeof($this->albumsList); $i++){
  $album = $this->albumsList[$i];
  if ($i % $this->params->get('picasaMaxPhotosPerRow') == 0)
    echo "<tr>";
	echo "<td align=center>";
	// FIXME: Move me to model
	$coverMediaGroup = $album->getMediaGroup();
	$photoThumbnail = $coverMediaGroup->getThumbnail();
	$coverURL = $photoThumbnail[0]->getUrl();
	$albumTitle = $album->title;
	$albumId = $album->getGphotoId();
	$link = JRoute::_('index.php?option=com_joomlapicasa2&view=album&album=' .  $albumId->getText() . '&page=1');
	echo "<a href=" . $link . ">";
	echo "<img class=instant src='".$coverURL."' width=80/><br />";
	echo $albumTitle;
	echo "</a>";
  echo "</td>";
	if ( ($i + $this->params->get('picasaMaxPhotosPerRow') + 1) % $this->params->get('picasaMaxPhotosPerRow') == 0)
    echo "</tr>";
}
echo "</table>";

echo "</p>";

?>