setQuerySeparator('?'); $gallery->setAlias( 'aid=116' ); $gallery->image_sort = 'DESC'; $gallery->image_limit = 3; $gallery->setGallerySort('NAME-DESC'); $gallery->list_thumbnail_crop = 1; $gallery->list_image_width = 70; $gallery->list_image_height = 70; $gallery->list_image_crop = 1; $gallery->list_template = ' '; $gallery->list_title_prefix = '

[LINK]{DATE:d.m.Y} – '; $gallery->list_thumbnail_prefix = '
[LINK]'; $gallery->list_thumbnail_suffix = '[/LINK]
'; $gallery->list_thumbnail = 0; $gallery->list_thumbnail_width = 50; $gallery->list_thumbnail_height = 50; $gallery->gallery_only = true; if( strpos($content['all'], '{GALLERY}') !== FALSE ) { $galleries = array(); // List the galleries in selected sub gallery if( isset($_getVar['subgallery']) ) { $_getVar['subgallery'] = intval($_getVar['subgallery']); $sql = 'SELECT pf.*, pj.f_id AS f_root_id, pj.f_name AS f_root_name '; $sql .= 'FROM '.DB_PREPEND.'phpwcms_file pf '; $sql .= 'LEFT JOIN '.DB_PREPEND.'phpwcms_file pj '; $sql .= 'ON pf.f_pid=pj.f_id '; $sql .= 'WHERE pf.f_id='.$_getVar['subgallery']; $subgallery = _dbQuery($sql); $gallery_breadcrumb = array(); if(isset($subgallery[0])) { $subgallery = $subgallery[0]; $subgallery_get = ''; $subgallery_class = 'root'; $gallery_breadcrumb_url = 'index.php'.returnGlobalGET_QueryString('htmlentities', array(), array('gallery', 'subgallery'), $gallery->alias); // check if parent directory exists if(!empty($subgallery['f_root_id'])) { $gallery_breadcrumb[] = ''.html_specialchars($subgallery['f_root_name']).''; $subgallery_get = '&subgallery='.$_getVar['subgallery']; $subgallery_class = 'sub'; } $gallery_breadcrumb[] = ''.html_specialchars($subgallery['f_name']).''; } // show gallery if( isset($_getVar['gallery']) ) { $gallery->thumb_width = 160; $gallery->thumb_height = 160; $gallery->width = 750; $gallery->height = 700; $gallery->detail_thumbnail_crop = 1; $gallery->detail_title_prefix = '

{DATE:d.m.Y} – '; $gallery->detail_gallery_back = ''; $gallery->image_limit = 0; $gallery->detail_thumbnail_prefix = '
'; $gallery->detail_thumbnail_suffix = '
{DOWNLOAD}
'; $gallery->download = true; $gallery->download_direct = false; $galleries[] = $gallery->showGallery( $_getVar['gallery'] ); // show title of selected gallery if(isset($gallery->gallery['f_name'])) { $gallery_breadcrumb[] = ''.html_specialchars($gallery->gallery['f_name']).''; } } else { $galleries[] = $gallery->listGalleries( $_getVar['subgallery'] ); } // render current gallery path if(count($gallery_breadcrumb)) { array_unshift($galleries, ''); } $gallery = implode(LF, $galleries); // list sub galleries in root } else { $gallery_root = $gallery->getGalleryTree(); $g = 0; foreach($gallery_root as $row) { $subgalleries = $gallery->getGallerySub($row['f_id']); $subgallery = ''; if(is_array($subgalleries) && count($subgalleries)) { $subgallery = ' ' . LF; } $galleries[$g] = '
  • ' . LF; $galleries[$g] .= '

    '; if($subgallery != '') { $galleries[$g] .= html_specialchars($row['f_name']); } else { $galleries[$g] .= '' . html_specialchars($row['f_name']) . ''; } $galleries[$g] .= '

    ' . LF; if($row['f_longinfo'] != '') { $galleries[$g] .= ' ' . plaintext_htmlencode($row['f_longinfo']) . LF; } $galleries[$g] .= $subgallery; $galleries[$g] .= '
  • '; $g++; } $gallery = count($galleries) ? '' : ''; } $content['all'] = str_replace('{GALLERY}', '

    Gallery

    '.LF.$gallery.LF.'
    ', $content['all']); } ?>