| | Copyright: copyright (C) 2007 by Mike de Boer | | Description: zOOm Media Gallery, a multi-gallery component for | | Joomla!. It's the most feature-rich gallery component | | for Joomla!! For documentation and a detailed list | | of features, check the zOOm homepage: | | http://www.zoomfactory.org | | License: GPL | | Filename: template.gallery.php | | | ----------------------------------------------------------------------- * @version $Id:template.gallery.php 106 2007-02-10 22:30:30Z kevinuru $ * @package zOOmGallery * @subpackage Template * @author Mike de Boer **/ // MOS Intruder Alerts defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); class ZMG_Template_Gallery { function showHeader($use_tables = true, $Itemid, $title = "zOOm Media Gallery", $show_logo, $show_search, $show_keywords, &$keywords) { global $mosConfig_live_site, $mainframe; if ($use_tables) { ?>

" method="post" name="browse"> >>'._ZOOM_SEARCH_KEYWORD.'<<', 1); ?>
 

>>'._ZOOM_SEARCH_KEYWORD.'<<', 1); ?>

isMember()) { ZMG_Template_Gallery::showGalleryListButton($use_tables, $Itemid, $gallery, $no_columns, $gallery_prefix, $show_catimg, $show_metabox); } } if ($use_tables) { ?>
"; } } function showSubGalleries(&$subgalleries, $use_tables = true, $Itemid, $no_columns, $gallery_prefix, $show_catimg, $show_metabox) { global $zoom; if($subgalleries) { $i=0; foreach ($subgalleries as $subgallery) { if ($subgallery->isMember()) { $i++; } } if($i > 0) { if ($use_tables) { ?>
isMember()) { ZMG_Template_Gallery::showSubGalleryListButton($use_tables, $Itemid, $subgallery, $no_columns, $gallery_prefix, $show_catimg, $show_metabox); } } if ($use_tables) { ?>



setCatImg(); } //select the first image from the gallery handled by the loop... if ($show_metabox) { // display category info, including image... $img_num = $gallery->getNumOfImages(); $subcat_num = $gallery->getNumOfSubCats(); $subcat_html = ($subcat_num <= 0) ? "" : ", ".$subcat_num." "._ZOOM_SUBGALLERIES; } if ($use_tables) { if ($zoom->_counter >= $no_columns) { echo ""; $zoom->_counter = 0; } if ($show_catimg) { ?> _id);?>" overlibfix($gallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>> _id);?>" overlibfix($gallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>> _name."
".$gallery->_descr; if (!$gallery->_published) { echo "
(unpublished)"; } echo "\n"; $zoom->_counter++; } else { if ($zoom->_counter >= $no_columns) { echo '

'; $zoom->_counter = 0; } if ($show_catimg) { ?>
_id);?>" overlibfix($gallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>>
"; if (!$gallery->_published) { echo "
(unpublished)"; } echo "
\n"; $zoom->_counter++; } } function showSubGalleryListButton($use_tables = true, $Itemid, &$subgallery, $no_columns, $gallery_prefix, $show_catimg, $show_metabox) { global $zoom, $backend; if ($show_catimg) { $subgallery->setCatImg(); } //select the first image from the gallery handled by the loop... if ($show_metabox) { // display category info, including image... $img_num = $subgallery->getNumOfImages(); $subcat_num = $subgallery->getNumOfSubCats(); $subcat_html = ($subcat_num <= 0) ? "" : ", ".$subcat_num." "._ZOOM_SUBGALLERIES; } if ($use_tables) { if ($zoom->_counter >= $no_columns) { echo ""; $zoom->_counter = 0; } if ($show_catimg) { ?> _id); ?>" overlibfix($subcat_html)."', CAPTION, '".$zoom->overlibfix($subgallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>> _id); ?>" overlibfix($subcat_html)."', CAPTION, '".$zoom->overlibfix($subgallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>> _name."
".$subgallery->_descr; if (!$subgallery->_published) { echo "
(unpublished)"; } echo "\n"; $zoom->_counter++; } else { if ($zoom->_counter >= $no_columns) { echo '
'; $zoom->_counter = 0; } if ($show_catimg) { ?>
_id); ?>" overlibfix($subcat_html)."', CAPTION, '".$zoom->overlibfix($subgallery->_name)."');\" onmouseout=\"return nd();\"" : "";?>>
\n"; $zoom->_counter++; } } function showPasswordForm($Itemid, $catid, &$tabclass) { ?>
:
htmlnumericentities($image->_descr); $link = ""; if ($use_tables) { if ($zoom->_CONFIG['showMetaBox']) { $link = "htmlnumericentities($descr)."', CAPTION, '".$image->_name."');\" onmouseout=\"return nd();\""; } else { $link = "_CONFIG['showMetaBox']) { $link = "
_name."');\" onmouseout=\"return nd();\""; } else { $link = "
_CONFIG['popUpImages']) { $link .= " href=\"".sefRelToAbs("index.php?option=com_zoom&Itemid=".$Itemid."&page=view&catid=".$zoom->_gallery->_id."&PageNo=".$PageNo."&key=".$counter."&hit=1")."\">\n"; // Lightbox popup - This popups in a fancy Javascript popup window - Option 2 } elseif ($zoom->_CONFIG['popUpImages'] == 2 ) { if($zoom->isImage($image->_type)) { $ided = $zoom->_gallery->_images[$counter]->_id; $link .= " href=\"".$zoom->hotlinkImage($zoom->_gallery->_id, '0', $ided, null)."\""; // Check to see if we want the slideshow function. if ($zoom->_CONFIG['slideshow']) { $link .= " rel=\"lightbox[".$zoom->_gallery->_name."]\""; } else { $link .= " rel=\"lightbox\""; } $link .= " title=\"".$image->_descr."\">\n"; } else { $params = $zoom->encrypt("catid=".$zoom->_gallery->_id."&key=".$counter."&isAdmin=".$zoom->_isAdmin."&hit=1&uid=".$my->id.""); $link .= " href=\"javascript:void(0)\" onClick=\"window.open('".$mosConfig_live_site."/components/com_zoom/www/view.php?popup=1&q=".$params."', 'win1', 'width="; if ($size[0] < 550) { $link .= "550"; } elseif ($size[0] > $zoom->_CONFIG['maxsize']) { $link .= $zoom->_CONFIG['maxsize'] + 50; } else { $link .= $size[0] + 40; } $link .= ", height="; if ($size[1] < 550) { $link .= "550"; } elseif ($size[1] > $zoom->_CONFIG['maxsize']) { $link .= $zoom->_CONFIG['maxsize'] + 50; } else { $link .= $size[1] + 100; } $link .= ", scrollbars=1, resizable=1').focus()\">\n"; } // Standard popup - Your standard seperate window popup - Option 1 } else { // encrypt the parameter string for optimal security... $params = $zoom->encrypt("catid=".$zoom->_gallery->_id."&key=".$counter."&isAdmin=".$zoom->_isAdmin."&hit=1&uid=".$my->id.""); $link .= " href=\"javascript:void(0)\" onClick=\"window.open('".$mosConfig_live_site."/components/com_zoom/www/view.php?popup=1&q=".$params."', 'win1', 'width="; if ($size[0] < 550) { $link .= "550"; } elseif ($size[0] > $zoom->_CONFIG['maxsize']) { $link .= $zoom->_CONFIG['maxsize'] + 50; } else { $link .= $size[0] + 40; } $link .= ", height="; if ($size[1] < 550) { $link .= "550"; } elseif ($size[1] > $zoom->_CONFIG['maxsize']) { $link .= $zoom->_CONFIG['maxsize'] + 50; } else { $link .= $size[1] + 100; } $link .= ", scrollbars=1, resizable=1').focus()\">\n"; } if ($use_tables) { $link .= "hotlinkImage($image->_catid, '2', $image->_id, null ) ."\" alt=\"\" />\n
\n\n"; echo $link; // begin inforow here... $inforow .= "\t\t\n\t\t"; if ($zoom->_CONFIG['showName']) { $inforow .= (empty($image->_name)) ? $image->_filename : $image->_name; $inforow .= "
\n"; } if ($zoom->_CONFIG['commentsOn']) { // Adding comment-notification, eg. show a pic with last comment-author and date as alt-text. if ($mycom = $image->_comments[count($image->_comments)-1]) { $inforow .= "\t\tgetName()." (".$mycom->getDate()."):
".$mycom->getCommentOrig()."', CAPTION, '"._ZOOM_COMMENTS."');\" onmouseout=\"return nd();\" alt=\"\" />= ".$image->getNumOfComments(); if ($zoom->_CONFIG['showHits']) { $inforow .= ", "; } } } if ($zoom->_CONFIG['showHits']) { $inforow .= $image->_hits . 'x ' . _ZOOM_HITS . "\n"; } $inforow .= "\t\t\n"; } else { $link .= "hotlinkImage($image->_catid, '2', $image->_id, null )."\" alt=\"\" />\n

\n\n"; echo $link; // begin inforow here... $inforow .= "\t\t\n\t\t"; if ($zoom->_CONFIG['showName']) { $inforow .= ""; $inforow .= (empty($image->_name)) ? $image->_filename : $image->_name; $inforow .= ""; $inforow .= "
\n"; } if ($zoom->_CONFIG['commentsOn']) { // Adding comment-notification, eg. show a pic with last comment-author and date as alt-text. if ($mycom = $image->_comments[count($image->_comments)-1]) { $inforow .= "\t\tgetName()." (".$mycom->getDate()."):
".$mycom->getCommentOrig()."', CAPTION, '"._ZOOM_COMMENTS."');\" onmouseout=\"return nd();\" alt=\"Image of comment\" /> ".$image->getNumOfComments()." ". _ZOOM_COMMENTS."

"; if ($zoom->_CONFIG['showHits']) { $inforow .= "
"; } } } if ($zoom->_CONFIG['showHits']) { $inforow .= "".$image->_hits . ' ' . _ZOOM_HITS . "\n"; } $inforow .= "\t\t

\n"; } //return $inforow; } function showFooter($use_tables = true, $Itemid, &$zoom) { global $zoom, $backend; if ($use_tables) { ?> _isAdmin) { echo ''; } elseif ($zoom->privileges->hasPrivileges()) { echo ''; } ?>
'._ZOOM_ADMINSYSTEM.' '._ZOOM_USERSYSTEM.'
_isAdmin) { echo ' '._ZOOM_ADMINSYSTEM.''; } elseif ($zoom->privileges->hasPrivileges()) { echo ' '._ZOOM_USERSYSTEM.''; } ?>
_CONFIG['toptenOn']) { echo ""._ZOOM_TOPTEN." | \n"; } if ($zoom->_CONFIG['lastsubmOn']) { echo ""._ZOOM_LASTSUBM." | \n"; } if ($zoom->_CONFIG['commentsOn']) { echo ""._ZOOM_LASTCOMM." | \n"; } if ($zoom->_CONFIG['ratingOn']) { echo ""._ZOOM_TOPRATED."\n"; } if ($use_tables) { ?>