joomla-flickr / site / views / album / tmpl / default.php

<?php

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

$db =& JFactory::getDBO();

$maxPhotosPerPage = $this->params->get('flickrMaxPhotosPerPage');
$currentPage = $db->getEscaped(JRequest::getVar('page'));
$totPages = ceil ($this->numPhotos / $maxPhotosPerPage);

$db =& JFactory::getDBO();

echo "<h1>" . $this->albumTitle  . "</h1>";

echo JText::_('Jf_album_contains') . " <strong>" . $this->numPhotos . "</strong> " . JText::_('Jf_photos');

echo "<div align=center>";

echo " " . JText::_('Jf_page') . " " . $currentPage . "/" . $totPages . " <br />";

echo "<table>";
echo "<tr>";
for ($i = 0; $i < sizeof($this->photosList); $i++){
	$photo = $this->photosList[$i];
	if ($i % $this->params->get('flickrMaxPhotosPerRow') == 0)
		echo "<tr>";
	echo "<td>";
	echo "<a href = '" . $photo['photoURL'] . "?imgmax=400' ";
	if ($this->params->get('flickrLightboxEnabled') == '1')
		echo "rel='lightbox[" . $db->getEscaped(JRequest::getVar('album')) . "]'";
	echo ">";
	echo "<img ";
	if ($this->params->get('flickrInstantEnabled') == '1')
		echo " class=\"instant\" ";
	echo "src='" . $photo['thumbnailURL'] . "' alt='". $photo['photoTitle'] . "' /></a>";
	echo "</td>";
	if ( ($i + $this->params->get('flickrMaxPhotosPerRow') + 1) % $this->params->get('flickrMaxPhotosPerRow') == 0)
		echo "</tr>";
}
echo "</table>";

if ($currentPage > 1){
	echo "<a href=" . JRoute::_( 'index.php?option=com_joomlaflickr&view=album&album=' . $db->getEscaped(JRequest::getVar('album')) . '&page='. ($currentPage-1) ) . ">";
}
echo JText::_('JF_prev');
if ($currentPage > 1){
	echo "</a>";
}

echo " | ";

if ($currentPage < $totPages){
	echo "<a href=" . JRoute::_( 'index.php?option=com_joomlaflickr&view=album&album=' . $db->getEscaped(JRequest::getVar('album')) . '&page='. ($currentPage+1) ) . ">";
}
echo JText::_('JF_next');
if ($currentPage < $totPages){
	echo "</a>";
}

echo "<br/>Joomla! Flickr by <a href='http://prof3ta.netsons.org'>Roberto Aloi (a.k.a. Prof3ta)</a><br/>";

echo "</div>";

?>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.