primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="_COM_PHOCAGALLERY_CATEGORIES_GROUP">
<message><![CDATA[_COM_PHOCAGALLERY_CATEGORIES_GROUP_DESC]]></message>
</view>
</metadata>

View File

@ -0,0 +1,46 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
// SVG Definitions
$d = array();
echo $layoutSVG->render($d);
echo '<div id="phocagallery" class="pg-categories-view'.$this->params->get( 'pageclass_sfx' ).' pg-csv">';
if ( $this->params->get( 'show_page_heading' ) ) {
echo '<div class="page-header"><h1>'. $this->escape($this->params->get('page_heading')) . '</h1></div>';
}
if ($this->t['display_feed'] == 1 || $this->t['display_feed'] == 2 ) {
echo '<div class="pg-top-icons">';
echo '<a href="' . Route::_(PhocaGalleryRoute::getFeedRoute('categories')) . '" title="' . Text::_('COM_PHOCAGALLERY_RSS') . '"><svg class="ph-si ph-si-feed"><use xlink:href="#ph-si-feed"></use></svg></a>';
echo '</div>';
echo '<div class="ph-cb"></div>';
}
if ($this->t['categories_description'] != '') {
echo '<div class="pg-categories-desc" >'.HTMLHelper::_('content.prepare', $this->t['categories_description']).'</div>';
}
echo $this->loadTemplate('categories');
echo $this->loadTemplate('pagination');
echo PhocaGalleryUtils::getExtInfo();
echo '</div>';

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_PHOCAGALLERY_CATEGORIES_LIST_LAYOUT">
<message>
<![CDATA[COM_PHOCAGALLERY_CATEGORIES_LIST_LAYOUT_DESC]]>
</message>
</layout>
<name>COM_PHOCAGALLERY_CATEGORIES_LIST_LAYOUT</name>
<description>COM_PHOCAGALLERY_CATEGORIES_LIST_LAYOUT_DESC</description>
<fields name="params">
<fieldset name="basic" addfieldpath="/administrator/components/com_phocagallery/models/fields" >
<field name="show_pagination_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_category" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_limit_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_limit_category" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_ordering_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_ordering_images" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="@spacer" type="spacer" default="" label="" description="" />
<field name="display_menu_link_title" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_MENU_LINK_TITLE_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_MENU_LINK_TITLE_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="display_cat_name_title" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_PAGE_TITLE_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_PAGE_TITLE_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="display_cat_name_breadcrumbs" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_BREADCRUMBS_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_BREADCRUMBS_DESC">
<option value="0">COM_PHOCAGALLERY_MENU_ITEM_TITLE</option>
<option value="1">COM_PHOCAGALLERY_MENU_ITEM_TITLE_CAT_TITLE</option>
<option value="2">COM_PHOCAGALLERY_MENU_CAT_TITLE</option>
</field>
<field name="show_parent_categories" default="" size="14" type="text" label="COM_PHOCAGALLERY_FIELD_FILTER_PARENT_CATEGORY_ID_LABEL" description="COM_PHOCAGALLERY_FIELD_FILTER_PARENT_CATEGORY_ID_DESC" />
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,71 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
defined('_JEXEC') or die('Restricted access');
echo '<div class="pg-categories-items-box">';
foreach ($this->categories as $k => $item) {
echo '<div class="pg-category-box">';
if (isset($item->rightdisplaykey) && $item->rightdisplaykey == 0) {
echo '<div class="pg-category-box-image pg-svg-box">';
echo '<svg alt="' . htmlspecialchars($item->title) . '" class="ph-si ph-si-lock-medium pg-image c-Image c-Image--shaded" style="width:' . $this->t['medium_image_width'] . 'px;height:' . $this->t['medium_image_height'] . 'px" itemprop="thumbnail"><use xlink:href="#ph-si-lock"></use></svg>';
echo '</div>';
} else {
if($this->t['image_categories_size'] == 2 || $this->t['image_categories_size'] == 3 || $item->linkthumbnailpath == '') {
// Folders instead of icons
echo '<div class="pg-category-box-image pg-svg-box">';
echo '<a href="' . Route::_($item->link) . '"><svg alt="' . htmlspecialchars($item->title) . '" class="ph-si ph-si-category pg-image c-Image c-Image--shaded" style="width:' . $this->t['imagewidth'] . 'px;height:' . $this->t['imageheight'] . 'px" itemprop="thumbnail"><use xlink:href="#ph-si-category"></use></svg></a>';
echo '</div>';
} else {
// Images
echo '<div class="pg-category-box-image">';
echo '<a href="' . Route::_($item->link) . '">' . HTMLHelper::_('image', $item->linkthumbnailpath, $item->title) . '</a>';
echo '</div>';
}
}
echo '<div class="pg-category-box-info">';
echo '<div class="pg-category-box-title">';
echo '<svg class="ph-si ph-si-category"><use xlink:href="#ph-si-category"></use></svg>';
echo '<a href="' . Route::_($item->link) . '">' . $item->title_self. '</a>';
echo $item->numlinks > 0 ? ' <span class="pg-category-box-count">(' . $item->numlinks . ')</span>' : '';
echo '</div>';
if ($this->t['display_cat_desc_box'] == 1 && $item->description != '') {
echo '<div class="pg-category-box-description">' . strip_tags($item->description) . '</div>';
} else if ($this->t['display_cat_desc_box'] == 2 && $item->description != '') {
echo '<div class="pg-category-box-description">' . (HTMLHelper::_('content.prepare', $item->description, 'com_phocagallery.category')) . '</div>';
}
$this->cv = $item;
echo $this->loadTemplate('rating');
echo '</div>';// pg-category-box-info
echo '</div>';// pg-category-box
}
echo '</div>';
?>

View File

@ -0,0 +1,110 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
phocagalleryimport('phocagallery.render.rendermap');
echo '<div id="phocagallery" class="pg-categories-view'.$this->params->get( 'pageclass_sfx' ).'">';
if ( $this->params->get( 'show_page_heading' ) ) {
echo '<h1>'. $this->escape($this->params->get('page_heading')) . '</h1>';
}
echo '<div id="pg-icons">';
echo PhocaGalleryRenderFront::renderFeedIcon('categories');
echo '</div>';
if ($this->tGeo['categorieslng'] == '' || $this->tGeo['categorieslat'] == '') {
echo '<p>' . Text::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
//echo '<script src="http://www.google.com/js api" type="text/javascript"></script>';
$map = new PhocaGalleryRenderMap();
//echo $map->loadApi();
echo '<noscript>'.Text::_('COM_PHOCAGALLERY_ERROR_MAP_ENABLE_JAVASCRIPT').'</noscript>';
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;">';
$cmw = '';
if ((int)$this->tGeo['categoriesmapwidth'] > 0) {
$cmw = 'width:'.$this->tGeo['categoriesmapwidth'].'px;';
}
echo '<div id="phocaMap" style="margin:0;padding:0;'. $cmw. 'height:'.$this->tGeo['categoriesmapheight'].'px">';
echo '</div></div>';
?><script type='text/javascript'>//<![CDATA[
<?php
echo $map->createMap('phocaMap', 'mapPhocaMap', 'phocaLatLng', 'phocaOptions','tstPhocaMap', 'tstIntPhocaMap');
echo $map->cancelEventF();
echo $map->checkMapF();
echo $map->startMapF();
echo $map->setLatLng( $this->tGeo['categorieslat'], $this->tGeo['categorieslng'] );
echo $map->startOptions();
echo $map->setZoomOpt($this->tGeo['categorieszoom']).','."\n";
echo $map->setCenterOpt().','."\n";
echo $map->setTypeControlOpt().','."\n";
echo $map->setNavigationControlOpt().','."\n";
echo $map->setScaleControlOpt(1).','."\n";
echo $map->setScrollWheelOpt(1).','."\n";
echo $map->setDisableDoubleClickZoomOpt(0).','."\n";
echo $map->setMapTypeOpt()."\n";
echo $map->endOptions();
echo $map->setMap();
foreach ($this->categories as $category) {
if ((isset($category->longitude) && $category->longitude != '' && $category->longitude != 0)
&& (isset($category->latitude) && $category->latitude != '' && $category->latitude != 0)) {
if ($category->geotitle == '') {
$category->geotitle = $category->title;
}
$extCategory = PhocaGalleryImage::isExtImage($category->extid);
if ($extCategory) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($category->extw, $category->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
$imgLink = HTMLHelper::_( 'image', $category->linkthumbnailpath, str_replace('&raquo;', '-',$category->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
} else {
$imgLink = HTMLHelper::_( 'image', $category->linkthumbnailpath, PhocaGalleryText::strTrimAll(addslashes($category->geotitle )));
}
$text = '<div style="text-align:left">'
.'<table border="0" cellspacing="5" cellpadding="5">'
.'<tr>'
.'<td align="left" colspan="2"><b><a href="'.$category->link.'">'. PhocaGalleryText::strTrimAll(addslashes($category->geotitle)).'</a></b></td>'
.'</tr>'
.'<tr>'
.'<td valign="top" align="left"><a href="'.$category->link.'">'. $imgLink . '</a></td>'
.'<td valign="top" align="left">'. PhocaGalleryText::strTrimAll(addslashes($category->description)).'</td>'
.'</tr></table></div>';
// Markers
$iconOutput = $map->setMarkerIcon(0);
echo $iconOutput['js'];
echo $map->setMarker($category->id, $category->geotitle, $category->description,$category->latitude, $category->longitude, $iconOutput['icon'], $text );
echo $map->setListener();
}
}
echo $map->endMapF();
echo $map->setInitializeF();
?>//]]></script><?php
echo $map->loadApi();
}
echo '<div>&nbsp;</div>';
echo PhocaGalleryUtils::getExtInfo();
echo '</div>';
?>

View File

@ -0,0 +1,137 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
phocagalleryimport('phocagallery.render.rendermap');
echo '<div id="phocagallery" class="pg-categories-view'.$this->params->get( 'pageclass_sfx' ).'">';
if ( $this->params->get( 'show_page_heading' ) ) {
echo '<h1>'. $this->escape($this->params->get('page_heading')) . '</h1>';
}
echo '<div id="pg-icons">';
echo PhocaGalleryRenderFront::renderFeedIcon('categories');
echo '</div>';
if ($this->tGeo['categorieslng'] == '' || $this->tGeo['categorieslat'] == '') {
echo '<p>' . Text::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
$id = uniqid();
$map = new PhocaGalleryRenderMaposm($id);
$map->loadAPI();
$map->loadCoordinatesJS();
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;">';
$cmw = '';
if ((int)$this->tGeo['categoriesmapwidth'] > 0) {
$cmw = 'width:'.$this->tGeo['categoriesmapwidth'].'px;';
}
echo '<div id="phocaGalleryMap'.$id.'" style="margin:0;padding:0;'. $cmw. 'height:'.$this->tGeo['categoriesmapheight'].'px">';
echo '</div></div>';
$map->createMap($this->tGeo['categorieslat'], $this->tGeo['categorieslng'], $this->tGeo['categorieszoom']);
$map->setMapType();
// Markers
jimport('joomla.filter.output');
if (isset($this->categories) && !empty($this->categories)) {
foreach ($this->categories as $category) {
if ((isset($category->longitude) && $category->longitude != '' && $category->longitude != 0)
&& (isset($category->latitude) && $category->latitude != '' && $category->latitude != 0)) {
if ($category->geotitle == '') {
$category->geotitle = $category->title;
}
$extCategory = PhocaGalleryImage::isExtImage($category->extid);
if ($extCategory) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($category->extw, $category->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
$imgLink = HTMLHelper::_( 'image', $category->linkthumbnailpath, str_replace('&raquo;', '-',$category->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
} else {
$imgLink = HTMLHelper::_( 'image', $category->linkthumbnailpath, PhocaGalleryText::strTrimAll(addslashes($category->geotitle )));
}
$minWidth = 110;
if (file_exists(JPATH_SITE . '/'. $category->linkthumbnailpath)) {
$size = getimagesize(JPATH_SITE . '/'. $category->linkthumbnailpath);
$minWidth = $size[0] + 10;
}
$text = '<div style="text-align:left; min-width: '.$minWidth.'px">'
.'<table border="0" cellspacing="5" cellpadding="5">'
.'<tr>'
.'<td align="left" colspan="2"><b><a href="'.$category->link.'">'. PhocaGalleryText::strTrimAll(addslashes($category->geotitle)).'</a></b></td>'
.'</tr>'
.'<tr>'
.'<td valign="top" align="left"><a href="'.$category->link.'">'. $imgLink . '</a></td>'
.'<td valign="top" align="left" class="pg-mapbox-description">'. PhocaGalleryText::strTrimAll(addslashes($category->description)).'</td>'
.'</tr></table></div>';
// Markers
//$iconOutput = $map->setMarkerIcon(0);
//echo $iconOutput['js'];
$map->setMarker($category->id, $category->geotitle, $category->description,$category->latitude, $category->longitude, $text );
}
}
}
$map->renderFullScreenControl();
//$map->renderCurrentPosition();
//$map->renderSearch('', 'topleft');
// Get Lat and Lng TO (first marker)
$lat = $lng = 0;
$mId = '';
$markerIconOptions = array();
if (isset($firstMarker->latitude)) {
$lat = $firstMarker->latitude;
}
if (isset($firstMarker->longitude)) {
$lng = $firstMarker->longitude;
}
if (isset($firstMarker->id)) {
$mId = $id . 'm'.$firstMarker->id;
}
if (isset($firstMarker->markericonoptions)) {
$markerIconOptions = $firstMarker->markericonoptions;
}
$map->renderRouting(0,0,$lat,$lng, $mId, $markerIconOptions);
$map->renderEasyPrint();
$map->renderMap();
}
echo '<div>&nbsp;</div>';
echo PhocaGalleryUtils::getExtInfo();
echo '</div>';
?>

View File

@ -0,0 +1,72 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
echo '<div id="phocagallery-categories-detail">'."\n";
for ($i = 0; $i < $this->t['countcategories']; $i++) {
echo '<div style="width:'.$this->t['categoriesboxwidth'].';" class="pg-cats-box-float2">'."\n";
/*echo '<fieldset>'
.' <legend>'
.' <a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo ' </legend>';*/
echo '<div class="pg-cat-img-detail '.$this->t['class_suffix'].'">'."\n"
.'<div class="pg-cat-img-detail-box">'."\n"
.' <table border="0" cellpadding="0" cellspacing="0">'."\n"
.' <tr>'
.' <td style="text-align:center;vertical-align:middle;"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'style' => ''));
} else {
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;','-',$this->categories[$i]->title),array('style' => ''));
}
echo '</a></td>'
.' </tr>'."\n"
.' </table>'."\n"
.'</div>'."\n";
echo '<div style="margin-right:5px;margin-left:'.$this->t['imagewidth'].'px;">'."\n";
echo '<div class="pg-field-table2"><a href="'.$this->categories[$i]->link.'" class="category'.$this->params->get( 'pageclass_sfx' ).'">'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo '</div>';
if ($this->categories[$i]->description != '') {
echo '<div class="pg-field-desc2">'.$this->categories[$i]->description.'</div>'."\n";
}
echo '</div>'."\n"
//.'<div style="clear:both;"></div>'
.'</div>'."\n";
echo '</div>'."\n";
}
echo '<div style="clear:both"></div>'."\n";
echo '</div>'."\n";
echo "\n";
?>

View File

@ -0,0 +1,148 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
echo '<div id="phocagallery-categories-detail">'."\n";
for ($i = 0; $i < $this->t['countcategories']; $i++) {
// - - - - -
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '<div>';
} else {
$float = 0;
foreach ($this->t['begin'] as $k => $v) {
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '<div style="'.$this->t['fixedwidthstyle2'].'" class="pg-cats-box-float">';
}
}
// - - - - -
echo '<div class="pg-field">'."\n"
.' <div class="pg-legend">'
.' <a href="'.$this->categories[$i]->link.'" >'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo ' </div>'."\n";
echo '<div class="pg-cat-img-detail '.$this->t['class_suffix'].'">'."\n"
.'<div class="pg-cat-img-detail-box">'."\n"
.' <table border="0" cellpadding="0" cellspacing="0">'."\n"
.' <tr>'."\n"
.' <td style="text-align:center;"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'style' => ''));
} else {
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;','-',$this->categories[$i]->title),array('style' => ''));
}
echo '</a></td>'
.' </tr>'."\n"
.' </table>'."\n"
.'</div>'."\n";
echo '<div style="margin-right:5px;margin-left:'.$this->t['imagewidth'].'px;">'."\n";
if ($this->categories[$i]->description != '') {
echo '<div class="pg-field-desc" >'.$this->categories[$i]->description.'</div><p>&nbsp;</p>';
}
echo '<table class="pg-field-table" border="0" cellpadding="0" cellspacing="0" >'."\n";
if ( $this->categories[$i]->username != '') {
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_AUTHOR') .': </td>'
.'<td>'.$this->categories[$i]->username.'</td></tr>'."\n";
}
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_NR_IMG_CATEGORY') .': </td>'
.'<td>'.$this->categories[$i]->numlinks.'</td></tr>'."\n";
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_CATEGORY_VIEWED') .': </td>'
.'<td>'.$this->categories[$i]->hits.'x</td></tr>'."\n";
// Rating
if ($this->t['displayrating'] == 1) {
$votesCount = $votesAverage = $votesWidth = 0;
if (!empty($this->categories[$i]->ratingcount)) {
$votesCount = $this->categories[$i]->ratingcount;
}
if (!empty($this->categories[$i]->ratingaverage)) {
$votesAverage = $this->categories[$i]->ratingaverage;
if ($votesAverage > 0) {
$votesAverage = round(((float)$votesAverage / 0.5)) * 0.5;
$votesWidth = 22 * $votesAverage;
}
}
if ((int)$votesCount > 1) {
$votesText = 'COM_PHOCAGALLERY_VOTES';
} else {
$votesText = 'COM_PHOCAGALLERY_VOTE';
}
echo '<tr><td>' . JText::_('COM_PHOCAGALLERY_RATING'). ': </td>'
.'<td>' . $votesAverage .' / '.$votesCount . ' ' . JText::_($votesText). '</td></tr>'
.'<tr><td>&nbsp;</td>'
.'<td>'
.' <ul class="star-rating">'
.' <li class="current-rating" style="width:'.$votesWidth.'px"></li>'
.' <li><span class="star1"></span></li>';
for ($r = 2;$r < 6;$r++) {
echo '<li><span class="stars'.$r.'"></span></li>';
}
echo '</ul>'
.'</td>'
.'</tr>'."\n";
}
echo '</table>'."\n"
.'</div>'."\n"
//.'<div style="clear:both;"></div>'
.'</div>'."\n"
.'<div style="clear:both;"></div>'
.'</div>'."\n";//fieldset
// - - - - -
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '</div>';
} else {
if ($i == $this->t['endfloat']) {
echo '</div><div style="clear:both"></div>'."\n";
} else {
$float = 0;
foreach ($this->t['end'] as $k => $v) {
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '</div>'."\n";
}
}
}
// - - - - -
}
echo '</div>'."\n";
echo "\n";
?>

View File

@ -0,0 +1,117 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
echo '<div id="phocagallery-categories-detail">'."\n";
for ($i = 0; $i < $this->t['countcategories']; $i++) {
echo '<div style="width:'.$this->t['categoriesboxwidth'].';" class="pg-cats-box-float">'."\n";
echo '<div class="pg-field">'."\n"
.' <div class="pg-legend">'
.' <a href="'.$this->categories[$i]->link.'">'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo ' </div>';
echo '<div class="pg-cat-img-detail '.$this->t['class_suffix'].'">'."\n"
.'<div class="pg-cat-img-detail-box">'."\n"
.' <table border="0" cellpadding="0" cellspacing="0">'."\n"
.' <tr>'
.' <td style="text-align:center;"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'style' => ''));
} else {
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;','-',$this->categories[$i]->title),array('style' => ''));
}
echo '</a></td>'
.' </tr>'."\n"
.' </table>'."\n"
.'</div>'."\n";
echo '<div style="margin-right:5px;margin-left:'.$this->t['imagewidth'].'px;">';
if ($this->categories[$i]->description != '') {
echo '<div class="pg-field-desc">'.$this->categories[$i]->description.'</div><p>&nbsp;</p>'."\n";
}
echo '<table class="pg-field-table" border="0" cellpadding="0" cellspacing="0" >';
if ( $this->categories[$i]->username != '') {
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_AUTHOR') .': </td>'
.'<td>'.$this->categories[$i]->username.'</td></tr>'."\n";
}
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_NR_IMG_CATEGORY') .': </td>'
.'<td>'.$this->categories[$i]->numlinks.'</td></tr>'."\n";
echo '<tr><td>'.JText::_('COM_PHOCAGALLERY_CATEGORY_VIEWED') .': </td>'
.'<td>'.$this->categories[$i]->hits.'x</td></tr>'."\n";
// Rating
if ($this->t['displayrating'] == 1) {
$votesCount = $votesAverage = $votesWidth = 0;
if (!empty($this->categories[$i]->ratingcount)) {
$votesCount = $this->categories[$i]->ratingcount;
}
if (!empty($this->categories[$i]->ratingaverage)) {
$votesAverage = $this->categories[$i]->ratingaverage;
if ($votesAverage > 0) {
$votesAverage = round(((float)$votesAverage / 0.5)) * 0.5;
$votesWidth = 22 * $votesAverage;
}
}
if ((int)$votesCount > 1) {
$votesText = 'COM_PHOCAGALLERY_VOTES';
} else {
$votesText = 'COM_PHOCAGALLERY_VOTE';
}
echo '<tr><td>' . JText::_('COM_PHOCAGALLERY_RATING'). ': </td>'
.'<td>' . $votesAverage .' / '.$votesCount . ' ' . JText::_($votesText). '</td></tr>'
.'<tr><td>&nbsp;</td>'
.'<td>'
.' <ul class="star-rating">'
.' <li class="current-rating" style="width:'.$votesWidth.'px"></li>'
.' <li><span class="star1"></span></li>';
for ($r = 2;$r < 6;$r++) {
echo '<li><span class="stars'.$r.'"></span></li>';
}
echo '</ul>'
.'</td>'
.'</tr>'."\n";
}
echo '</table>'."\n"
.'</div>'."\n"
//.'<div style="clear:both;"></div>'
.'</div>'."\n"
.'<div style="clear:both;"></div>'
.'</div>'."\n";//fieldset
echo '</div>'."\n";
}
echo '<div style="clear:both"></div>'."\n";
echo '</div>'."\n";
echo "\n";
?>

View File

@ -0,0 +1,71 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
echo '<div id="phocagallery-categories-detail">'."\n";
for ($i = 0; $i < $this->t['countcategories']; $i++) {
// - - - - -
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '<div>';
} else {
$float = 0;
foreach ($this->t['begin'] as $k => $v) {
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '<div style="'.$this->t['fixedwidthstyle2'].'" class="pg-cats-box-float">';
}
}
// - - - - -
echo '<div class="pg-field">'."\n"
.' <div class="pg-legend">'
.' <a href="'.$this->categories[$i]->link.'" >'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo ' </div>'."\n";
echo '<div style="clear:both;"></div>'
.'</div>'."\n";//fieldset
// - - - - -
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '</div>';
} else {
if ($i == $this->t['endfloat']) {
echo '</div><div style="clear:both"></div>'."\n";
} else {
$float = 0;
foreach ($this->t['end'] as $k => $v) {
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '</div>'."\n";
}
}
}
// - - - - -
}
echo '</div>'."\n";
echo "\n";
?>

View File

@ -0,0 +1,51 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
echo '<div id="phocagallery-categories-detail">'."\n";
echo '<div class="row">';
for ($i = 0; $i < $this->t['countcategories']; $i++) {
//echo '<div style="width:'.$this->t['categoriesboxwidth'].';" class="pg-cats-box-float">'."\n";
echo '<div class="span4 col-xs-6 col-sm-4 col-md-4">';
echo '<div class="pg-cats-box '.$this->t['class_suffix'].'">'."\n"
.'<div class="pg-cats-box-img"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-cats-image', 'style' => ''));
} else {
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('class' => 'pg-cats-image', 'style' => ''));
}
echo '</a>'
.'</div>'."\n"
.'<div class="pg-cats-name '.$this->t['class_suffix'].'"><a href="'.$this->categories[$i]->link.'">'.$this->categories[$i]->title_self.'</a> ';
if ($this->categories[$i]->numlinks > 0) {
echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';
}
echo '</div><div style="clear:both"></div>'."\n"
//.'<div style="clear:both;"></div>'
.'</div></div>'."\n";
}
echo '</div>';
//echo '<div style="clear:both"></div>'."\n";
echo '</div>'."\n";
echo "\n";
?>

View File

@ -0,0 +1,66 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo "\n\n";
for ($i = 0; $i < $this->t['countcategories']; $i++) {
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '<table border="0">'."\n";
} else {
$float = 0;
foreach ($this->t['begin'] as $k => $v) {
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '<div style="'.$this->t['fixedwidthstyle1'].'" class="pg-cats-box-float"><table>'."\n";
}
}
echo '<tr>'."\n";
echo '<td align="center" valign="middle" style="'.$this->t['imagebg'].';text-align:center;"><div class="pg-imgbg"><a href="'.$this->categories[$i]->link.'">';
if (isset($this->categories[$i]->extpic) && $this->categories[$i]->extpic) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->categories[$i]->extw, $this->categories[$i]->exth, $this->t['picasa_correct_width'], $this->t['picasa_correct_height']);
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;', '-',$this->categories[$i]->title), array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'style' => ''));
} else {
echo Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->categories[$i]->linkthumbnailpath, str_replace('&raquo;','-',$this->categories[$i]->title),array('style' => ''));
}
echo '</a></div></td>';
echo '<td><a href="'.$this->categories[$i]->link.'">'.$this->categories[$i]->title.'</a>&nbsp;';
if ($this->categories[$i]->numlinks > 0) {echo '<span class="small">('.$this->categories[$i]->numlinks.')</span>';}
echo '</td>';
echo '</tr>'."\n";
if ( (int)$this->t['categoriescolumns'] == 1 ) {
echo '</table>'."\n";
} else {
if ($i == $this->t['endfloat']) {
echo '</table></div><div style="clear:both"></div>'."\n";
} else {
$float = 0;
foreach ($this->t['end'] as $k => $v)
{
if ($i == $v) {
$float = 1;
}
}
if ($float == 1) {
echo '</table></div>'."\n";
}
}
}
}
echo "\n";
?>

View File

@ -0,0 +1,41 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
if ($this->params->get('show_ordering_categories') || $this->params->get('show_pagination_limit_categories') || $this->params->get('show_pagination_categories')) {
echo '<form action="'.htmlspecialchars($this->t['action']).'" method="post" name="adminForm">'. "\n";
if (count($this->categories)) {
echo '<div class="pagination pagination-centered">';
if ($this->params->get('show_ordering_categories')) {
echo Text::_('COM_PHOCAGALLERY_ORDER_FRONT') .'&nbsp;'.$this->t['ordering'];
}
if ($this->params->get('show_pagination_limit_categories')) {
echo Text::_('COM_PHOCAGALLERY_DISPLAY_NUM') .'&nbsp;'.$this->t['pagination']->getLimitBox();
}
if ($this->params->get('show_pagination_categories')) {
echo '<div class="counter pull-right">'.$this->t['pagination']->getPagesCounter().'</div>'
.'<div class="pagination pagination-centered">'.$this->t['pagination']->getPagesLinks().'</div>';
}
echo '</div>'. "\n";
}
echo '<input type="hidden" name="controller" value="categories" />';
echo HTMLHelper::_( 'form.token' );
echo '</form>';
echo '<div class="ph-cb"></div>';
} else {
echo '<div class="ph-cb"></div>';
}
?>

View File

@ -0,0 +1,47 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
// Rating
if ($this->t['display_rating'] == 1) {
$votesCount = $votesAverage = $votesWidth = 0;
if (!empty($this->cv->ratingcount)) {
$votesCount = $this->cv->ratingcount;
}
if (!empty($this->cv->ratingaverage)) {
$votesAverage = $this->cv->ratingaverage;
if ($votesAverage > 0) {
$votesAverage = round(((float)$votesAverage / 0.5)) * 0.5;
$votesWidth = 16 * $votesAverage;
}
}
if ((int)$votesCount > 1) {
$votesText = 'COM_PHOCAGALLERY_VOTES';
} else {
$votesText = 'COM_PHOCAGALLERY_VOTE';
}
echo '<div class="pg-categories-box-rating">'
/*.'<div>' . JText::_('COM_PHOCAGALLERY_RATING'). ': '
. $votesAverage .' / '.$votesCount . ' ' . JText::_($votesText). '</div>'*/
.' <div><ul class="star-rating-small">'
.' <li class="current-rating" style="width:'.$votesWidth.'px"></li>'
.' <li><span class="star1"></span></li>';
for ($r = 2;$r < 6;$r++) {
echo '<li><span class="stars'.$r.'"></span></li>';
}
echo '</ul></div></div>'."\n";
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,158 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Document\Feed\FeedItem;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
jimport( 'joomla.application.component.view');
phocagalleryimport( 'phocagallery.ordering.ordering');
phocagalleryimport( 'phocagallery.picasa.picasa');
phocagalleryimport( 'phocagallery.facebook.fbsystem');
class PhocaGalleryViewCategories extends HtmlView
{
function display($tpl = null) {
$app = Factory::getApplication();
$user = Factory::getUser();
$userLevels = implode (',', $user->getAuthorisedViewLevels());
$db = Factory::getDBO();
$menu = $app->getMenu();
$document = Factory::getDocument();
$params = $app->getParams();
// Specific category
$id = $app->input->get('id', 0, 'int');
// Params
$categories = $params->get( 'feed_cat_ids', '' );
$ordering = $params->get( 'feed_img_ordering', 6 );
$imgCount = $params->get( 'feed_img_count', 5 );
$feedTitle = $params->get( 'feed_title', Text::_('COM_PHOCAGALLERY_GALLERY') );
$t['picasa_correct_width_m'] = (int)$params->get( 'medium_image_width', 256 );
$t['picasa_correct_height_m'] = (int)$params->get( 'medium_image_height', 192 );
$document->setTitle($this->escape( html_entity_decode($feedTitle)));
if($id > 0) {
$wheres[] = ' c.id ='.(int)$id;
} else {
if (!empty($categories) && count($categories) > 1) {
\Joomla\Utilities\ArrayHelper::toInteger($categories);
$categoriesString = implode(',', $categories);
$wheres[] = ' c.id IN ( '.$categoriesString.' ) ';
} else if ((int)$categories > 0) {
$wheres[] = ' c.id IN ( '.$categories.' ) ';
}
}
$imageOrdering = PhocaGalleryOrdering::getOrderingString($ordering, 6);
$wheres[] = ' a.published = 1';
$wheres[] = ' a.approved = 1';
$wheres[] = ' c.published = 1';
$wheres[] = ' c.approved = 1';
$wheres[] = ' c.access IN ('.$userLevels.')';
$u = " (c.accessuserid LIKE '%0%' OR c.accessuserid LIKE '%-1%' OR c.accessuserid LIKE '%,".(int)$user->id."' OR c.accessuserid LIKE '".(int)$user->id.",%' OR c.accessuserid LIKE '%,".(int)$user->id.",%' OR c.accessuserid =".(int)$user->id.") ";
$e = 'c.accessuserid IS NULL';
$wheres[] = ' CASE WHEN c.accessuserid IS NOT NULL THEN '.$u.' ELSE '.$e.' END';
$query = 'SELECT a.*, c.alias as catalias, c.title as categorytitle'
.' FROM #__phocagallery AS a'
.' LEFT JOIN #__phocagallery_categories AS c ON a.catid = c.id'
. ' WHERE ' . implode( ' AND ', $wheres )
.$imageOrdering['output'];
$db->setQuery( $query , 0, $imgCount );
$images = $db->loadObjectList( );
foreach ($images as $keyI => $value) {
$item = new FeedItem();
$title = $this->escape( $value->title );
$title = html_entity_decode( $title );
$item->title = $title;
$link = PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias);
$item->link = Route::_($link);
// imgDate
$imgDate = '';
$imgDate = HTMLHelper::Date($value->date, "Y-m-d h:m:s");
if ($imgDate != '') {
$item->date = $imgDate;
}
$item->description = '';
if ($value->description != '') {
$item->description .= '<div>'.$value->description.'</div>';
}
$extImage = false;
if (isset($value->extid)) {
$extImage = PhocaGalleryImage::isExtImage($value->extid);
}
// Trying to fix but in Joomla! method $this->_relToAbs - it cannot work with JRoute links :-(
$itemL = str_replace(Uri::base(true), '', $item->link);
if (substr($itemL, 0, 1) == '/') {
$itemL = substr_replace($itemL, '', 0, 1);
}
$itemL = Uri::base().$itemL;
// Should really not happen
$itemLTmp = str_replace('http://', '', $itemL);
$pos = stripos($itemLTmp, '//');
if ($pos !== false) {
$itemLTmp = str_replace('//', '/', $itemLTmp);
$itemL = 'http://'.$itemLTmp;
}
// - - - - - - - - - - -
if ($extImage) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($value->extw, $value->exth, $t['picasa_correct_width_m'], $t['picasa_correct_height_m']);
$imgLink = $value->extm;
//$i = '<div><a href="'.JRoute::_($link).'"><img src="'.$imgLink .'" border="0" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" /></a></div>';
$i = '<div><a href="'.$itemL.'"><img src="'.$imgLink .'" border="0" /></a></div>';
} else {
$imgLink = PhocaGalleryImageFront::displayCategoryImageOrNoImage($value->filename, 'medium');
$i = '<div><a href="'.$itemL.'"><img src="'. /*JUri::base(true) .*/ $imgLink.'" border="0" /></a></div>';
}
$item->description .= $i;
$item->category = $value->categorytitle;
/*if ($value->author != '') {
$item->author = $value->author;
}*/
$document->addItem( $item );
}
}
}
?>

View File

@ -0,0 +1,522 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
jimport( 'joomla.application.component.view');
jimport( 'joomla.filesystem.file' );
phocagalleryimport('phocagallery.access.access');
phocagalleryimport('phocagallery.path.path');
phocagalleryimport('phocagallery.file.file');
phocagalleryimport('phocagallery.render.renderinfo');
phocagalleryimport('phocagallery.picasa.picasa');
phocagalleryimport('phocagallery.image.imagefront');
phocagalleryimport('phocagallery.ordering.ordering');
phocagalleryimport('phocagallery.render.rendermaposm');
class PhocaGalleryViewCategories extends HtmlView
{
public $t;
protected $params;
public $cv;
public function display($tpl = null) {
$app = Factory::getApplication();
$user = Factory::getUser();
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$path = PhocaGalleryPath::getPath();
$this->params = $app->getParams();
$this->tGeo = array();
$this->t = array();
$this->itemId = $app->input->get('Itemid', 0, 'int');
$document = Factory::getDocument();
$library = PhocaGalleryLibrary::getLibrary();
$this->t['action'] = $uri->toString();
// CSS
PhocaGalleryRenderFront::renderAllCSS();
// Params
$this->t['display_name'] = 1;//$this->params->get( 'display_name', 1);
$this->t['image_categories_size'] = $this->params->get( 'image_categories_size', 1);
$display_categories_geotagging = $this->params->get( 'display_categories_geotagging', 0 );
$display_access_category = $this->params->get( 'display_access_category', 1 );
$display_empty_categories = $this->params->get( 'display_empty_categories', 0 );
$hideCatArray = explode( ',', trim( $this->params->get( 'hide_categories', '' ) ) );
$showCatArray = explode( ',', trim( $this->params->get( 'show_categories', '' ) ) );
$showParentCatArray = explode( ',', trim( $this->params->get( 'show_parent_categories', '' ) ) );
$this->t['categoriesimageordering'] = $this->params->get( 'categories_image_ordering', 10 );
$this->t['categoriesdisplayavatar'] = $this->params->get( 'categories_display_avatar');
$this->t['categories_description'] = $this->params->get( 'categories_description', '' );
$this->t['phocagallery_width'] = $this->params->get( 'phocagallery_width', '');
$this->t['phocagallery_center'] = $this->params->get( 'phocagallery_center', 0);
$this->t['display_rating'] = $this->params->get( 'display_rating', 0 );
$this->t['categories_box_space'] = $this->params->get( 'categories_box_space', '');
$this->t['display_cat_desc_box'] = $this->params->get( 'display_cat_desc_box', 0);
//$this->t['char_cat_length_name'] = $this->params->get( 'char_cat_length_name', 9);
//$this->t['categories_mosaic_images'] = $this->params->get( 'categories_mosaic_images', 0);
//$this->t['diff_thumb_height'] = $this->params->get( 'diff_thumb_height', 0 );
$this->t['responsive'] = $this->params->get( 'responsive', 0 );
$this->t['bootstrap_icons'] = $this->params->get( 'bootstrap_icons', 0 );
$this->t['equal_heights'] = $this->params->get( 'equal_heights', 0 );
$this->t['masonry_center'] = $this->params->get( 'masonry_center', 0 );
$this->t['map_type'] = $this->params->get( 'map_type', 2 );
$this->t['display_feed'] = $this->params->get('display_feed', 1);
$this->t['medium_image_width'] = $this->params->get( 'medium_image_width', 256 );
$this->t['medium_image_height'] = $this->params->get( 'medium_image_height', 192 );
// L E G A C Y ===
/*$this->t['equalpercentagewidth'] = $this->params->get( 'equal_percentage_width', 1);
$this->t['categoriesboxwidth'] = $this->params->get( 'categories_box_width','33%');
$this->t['categoriescolumns'] = $this->params->get( 'categories_columns', 1 );
$this->t['displayrating'] = $this->params->get( 'display_rating', 0 );
$this->t['display_image_categories'] = $this->params->get( 'display_image_categories', 1 );
if ($this->t['display_image_categories'] == 1) {
} else {
// If legacy no different height, no mosaic
$this->t['diff_thumb_height'] = 0;
$this->t['categories_mosaic_images'] = 0;
}*/
// END L E G A C Y ===
switch($this->t['image_categories_size']) {
// medium
case 1:
case 3:
$this->t['picasa_correct_width'] = (int)$this->params->get( 'medium_image_width', 256 );
$this->t['picasa_correct_height'] = (int)$this->params->get( 'medium_image_height', 192 );
$this->t['imagewidth'] = (int)$this->params->get( 'medium_image_width', 256 );
$this->t['imageheight'] = (int)$this->params->get( 'medium_image_height', 192 );
$this->t['class_suffix'] = 'medium';
/*if ($this->t['categories_mosaic_images'] == 1) {
$this->t['imagewidth'] = (int)$this->params->get( 'medium_image_width', 256 ) * 3;
$this->t['imageheight'] = (int)$this->params->get( 'medium_image_height', 192 ) * 2;
}*/
break;
// small
case 0:
case 2:
default:
$this->t['picasa_correct_width'] = (int)$this->params->get( 'small_image_width', 128 );
$this->t['picasa_correct_height'] = (int)$this->params->get( 'small_image_height', 96 );
$this->t['imagewidth'] = (int)$this->params->get( 'small_image_width', 128 );
$this->t['imageheight'] = (int)$this->params->get( 'small_image_height', 96 );
$this->t['class_suffix'] = 'small';
/*if ($this->t['categories_mosaic_images'] == 1) {
$this->t['imagewidth'] = (int)$this->params->get( 'small_image_width', 128 ) * 3;
$this->t['imageheight'] = (int)$this->params->get( 'small_image_height', 96 ) * 2;
}*/
break;
}
$this->t['boxsize'] = PhocaGalleryImage::setBoxSize($this->t, 1);
// Image next to Category in Categories View is ordered by Random as default
$categoriesImageOrdering = PhocaGalleryOrdering::getOrderingString($this->t['categoriesimageordering']);
// MODEL
$model = $this->getModel();
$this->t['ordering'] = $model->getOrdering();
$this->categories = $this->get('data');
// Add link and unset the categories which user cannot see (if it is enabled in params)
// If it will be unset while access view, we must sort the keys from category array - ACCESS
$unSet = 0;
foreach ($this->categories as $key => $item) {
// Unset empty categories if it is set
if ($display_empty_categories == 0) {
if($this->categories[$key]->numlinks < 1) {
unset($this->categories[$key]);
$unSet = 1;
continue;
}
}
// Set only selected category ID
if (!empty($showCatArray[0]) && is_array($showCatArray)) {
$unSetHCA = 0;
foreach ($showCatArray as $valueHCA) {
if((int)trim($valueHCA) == $this->categories[$key]->id) {
$unSetHCA = 0;
$unSet = 0;
break;
} else {
$unSetHCA = 1;
$unSet = 1;
}
}
if ($unSetHCA == 1) {
unset($this->categories[$key]);
continue;
}
}
// Unset hidden category
if (!empty($hideCatArray) && is_array($hideCatArray)) {
$unSetHCA = 0;
foreach ($hideCatArray as $valueHCA) {
if((int)trim($valueHCA) == $this->categories[$key]->id) {
unset($this->categories[$key]);
$unSet = 1;
$unSetHCA = 1;
break;
}
}
if ($unSetHCA == 1) {
continue;
}
}
// Unset not set parent categories - only categories which have specific parent id will be displayed
if (!empty($showParentCatArray[0]) && is_array($showParentCatArray)) {
$unSetPHCA = 0;
foreach ($showParentCatArray as $valuePHCA) {
if((int)trim($valuePHCA) == $this->categories[$key]->parent_id) {
$unSetPHCA = 0;
//$unSet = 0;
break;
} else {
$unSetPHCA = 1;
$unSet = 1;
}
}
if ($unSetPHCA == 1) {
unset($this->categories[$key]);
continue;
}
}
// Link
$this->categories[$key]->link = PhocaGalleryRoute::getCategoryRoute($item->id, $item->alias);
// USER RIGHT - ACCESS - - - - -
// First Check - check if we can display category
$rightDisplay = 1;
if (!empty($this->categories[$key])) {
$rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $this->categories[$key]->accessuserid, $this->categories[$key]->access, $user->getAuthorisedViewLevels(), $user->get('id', 0), $display_access_category);
}
// Second Check - if we can display hidden category, set Key icon for them
// if we don't have access right to see them
// Display Key Icon (in case we want to display unaccessable categories in list view)
$rightDisplayKey = 1;
if ($display_access_category == 1) {
// we simulate that we want not to display unaccessable categories
// so if we get rightDisplayKey = 0 then the key will be displayed
if (!empty($this->categories[$key])) {
$rightDisplayKey = PhocaGalleryAccess::getUserRight('accessuserid', $this->categories[$key]->accessuserid, $this->categories[$key]->access, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0); // 0 - simulation
}
}
// Is Ext Image Album?
$extCategory = PhocaGalleryImage::isExtImage($this->categories[$key]->extid, $this->categories[$key]->extfbcatid);
// DISPLAY AVATAR, IMAGE(ordered), IMAGE(not ordered, not recursive) OR FOLDER ICON
$displayAvatar = 0;
if($this->t['categoriesdisplayavatar'] == 1 && isset($this->categories[$key]->avatar) && $this->categories[$key]->avatar !='' && $this->categories[$key]->avatarapproved == 1 && $this->categories[$key]->avatarpublished == 1) {
$sizeString = PhocaGalleryImageFront::getSizeString($this->t['image_categories_size']);
$pathAvatarAbs = $path->avatar_abs .'thumbs/phoca_thumb_'.$sizeString.'_'. $this->categories[$key]->avatar;
$pathAvatarRel = $path->avatar_rel . 'thumbs/phoca_thumb_'.$sizeString.'_'. $this->categories[$key]->avatar;
if (File::exists($pathAvatarAbs)){
$this->categories[$key]->linkthumbnailpath = $pathAvatarRel;
$this->categories[$key]->rightdisplaykey = $rightDisplayKey;
$displayAvatar = 1;
}
}
if ($displayAvatar == 0) {
if ($extCategory) {
$this->categories[$key]->rightdisplaykey = $rightDisplayKey;
if ($this->t['categoriesimageordering'] != 10) {
$imagePic = PhocaGalleryImageFront::getRandomImageRecursive($this->categories[$key]->id, $categoriesImageOrdering, 1);
if ($rightDisplayKey == 0) {
$imagePic = new StdClass();
$imagePic->exts = '';
$imagePic->extm = '';
$imagePic->extw = '';
$imagePic->exth = '';
}
$fileThumbnail = PhocaGalleryImageFront::displayCategoriesExtImgOrFolder($imagePic->exts,$imagePic->extm, $imagePic->extw,$imagePic->exth, $this->t['image_categories_size'], $rightDisplayKey);
if ($rightDisplayKey == 0) {
$this->categories[$key]->rightdisplaykey = 0;// Lock folder will be displayed
$this->categories[$key]->linkthumbnailpath = '';
} else if (!$fileThumbnail) {
$this->categories[$key]->linkthumbnailpath = '';// Standard folder will be displayed
} else {
$this->categories[$key]->linkthumbnailpath = $fileThumbnail->rel;
$this->categories[$key]->extw = $fileThumbnail->extw;
$this->categories[$key]->exth = $fileThumbnail->exth;
$this->categories[$key]->extpic = $fileThumbnail->extpic;
}
} else {
$fileThumbnail = PhocaGalleryImageFront::displayCategoriesExtImgOrFolder($this->categories[$key]->exts,$this->categories[$key]->extm, $this->categories[$key]->extw, $this->categories[$key]->exth, $this->t['image_categories_size'], $rightDisplayKey);
if ($rightDisplayKey == 0) {
$this->categories[$key]->rightdisplaykey = 0;// Lock folder will be displayed
$this->categories[$key]->linkthumbnailpath = '';
} else if (!$fileThumbnail) {
$this->categories[$key]->linkthumbnailpath = '';// Standard folder will be displayed
} else {
$this->categories[$key]->linkthumbnailpath = $fileThumbnail->rel;
$this->categories[$key]->extw = $fileThumbnail->extw;
$this->categories[$key]->exth = $fileThumbnail->exth;
$this->categories[$key]->extpic = $fileThumbnail->extpic;
}
}
} else {
$this->categories[$key]->rightdisplaykey = $rightDisplayKey;
if (isset($item->image_id) && $item->image_id > 0) {
// User has selected image in category edit
$selectedImg = PhocaGalleryImageFront::setFileNameByImageId((int)$item->image_id);
if (isset($selectedImg->filename) && ($selectedImg->filename != '' && $selectedImg->filename != '-')) {
$fileThumbnail = PhocaGalleryImageFront::displayCategoriesImageOrFolder($selectedImg->filename, $this->t['image_categories_size'], $rightDisplayKey);
if ($rightDisplayKey == 0) {
$this->categories[$key]->rightdisplaykey = 0;// Lock folder will be displayed
$this->categories[$key]->linkthumbnailpath = '';
} else if (!$fileThumbnail) {
$this->categories[$key]->linkthumbnailpath = '';// Standard folder will be displayed
} else {
$this->categories[$key]->filename = $selectedImg->filename;
$this->categories[$key]->linkthumbnailpath = $fileThumbnail->rel;
}
} else if (isset($selectedImg->exts) && isset($selectedImg->extm) && $selectedImg->exts != '' && $selectedImg->extm != '') {
$fileThumbnail = PhocaGalleryImageFront::displayCategoriesExtImgOrFolder($selectedImg->exts, $selectedImg->extm, $selectedImg->extw, $selectedImg->exth, $this->t['image_categories_size'], $rightDisplayKey);
if ($rightDisplayKey == 0) {
$this->categories[$key]->rightdisplaykey = 0;// Lock folder will be displayed
$this->categories[$key]->linkthumbnailpath = '';
} else if (!$fileThumbnail) {
$this->categories[$key]->linkthumbnailpath = '';// Standard folder will be displayed
} else {
$this->categories[$key]->linkthumbnailpath = $fileThumbnail->rel;
$this->categories[$key]->extw = $fileThumbnail->extw;
$this->categories[$key]->exth = $fileThumbnail->exth;
$this->categories[$key]->extpic = $fileThumbnail->extpic;
}
}
} else {
// Standard Internal Image
if ($this->t['categoriesimageordering'] != 10) {
$this->categories[$key]->filename = PhocaGalleryImageFront::getRandomImageRecursive($this->categories[$key]->id, $categoriesImageOrdering);
}
$fileThumbnail = PhocaGalleryImageFront::displayCategoriesImageOrFolder($this->categories[$key]->filename, $this->t['image_categories_size'], $rightDisplayKey);
if ($rightDisplayKey == 0) {
$this->categories[$key]->rightdisplaykey = 0;// Lock folder will be displayed
$this->categories[$key]->linkthumbnailpath = '';
} else if (!$fileThumbnail) {
$this->categories[$key]->linkthumbnailpath = '';// Standard folder will be displayed
} else {
$this->categories[$key]->linkthumbnailpath = $fileThumbnail->rel;
}
}
}
}
if ($rightDisplay == 0) {
unset($this->categories[$key]);
$unSet = 1;
}
// - - - - - - - - - - - - - - -
}
// ACCESS - - - - - -
// In case we unset some category from the list, we must sort the array new
if ($unSet == 1) {
$this->categories = array_values($this->categories);
}
// - - - - - - - - - - - - - - - -
// Do Pagination - we can do it after reducing all unneeded $this->categories, not before
$totalCount = count($this->categories);
$model->setTotal($totalCount);
$this->t['pagination'] = $this->get('pagination');
$this->categories = array_slice($this->categories,(int)$this->t['pagination']->limitstart, (int)$this->t['pagination']->limit);
// - - - - - - - - - - - - - - - -
// L E G A C Y ===
/* $this->t['countcategories'] = count($this->categories);
$this->t['begin'] = array();
$this->t['end'] = array();
$this->t['begin'][0] = 0;// first
// Prevent from division by zero error message
if ((int)$this->t['categoriescolumns'] == 0) {
$this->t['categoriescolumns'] = 1;
}
$this->t['begin'][1] = ceil ($this->t['countcategories'] / (int)$this->t['categoriescolumns']);
$this->t['end'][0] = $this->t['begin'][1] -1;
for ( $j = 2; $j < (int)$this->t['categoriescolumns']; $j++ ) {
$this->t['begin'][$j] = ceil(($this->t['countcategories'] / (int)$this->t['categoriescolumns']) * $j);
$this->t['end'][$j-1] = $this->t['begin'][$j] - 1;
}
$this->t['end'][$j-1] = $this->t['countcategories'] - 1;// last
$this->t['endfloat'] = $this->t['countcategories'] - 1;
if($this->t['equalpercentagewidth'] == 1) {
$fixedWidth = 100 / (int)$this->t['categoriescolumns'];
$this->t['fixedwidthstyle1'] = 'width:'.$fixedWidth.'%;';
$this->t['fixedwidthstyle2'] = 'width:'.$fixedWidth.'%;';
} else {
$this->t['fixedwidthstyle1'] = '';//'margin: 10px;';
$this->t['fixedwidthstyle2'] = '';//'margin: 0px;';
}*/
// END L E G A C Y ===
$this->_prepareDocument();
if ($display_categories_geotagging == 1) {
// Params
$this->tGeo['categorieslng'] = $this->params->get( 'categories_lng', '' );
$this->tGeo['categorieslat'] = $this->params->get( 'categories_lat', '' );
$this->tGeo['categorieszoom'] = $this->params->get( 'categories_zoom', 2 );
$this->tGeo['googlemapsapikey'] = $this->params->get( 'google_maps_api_key', '' );
$this->tGeo['categoriesmapwidth'] = $this->params->get( 'categories_map_width', '' );
$this->tGeo['categoriesmapheight'] = $this->params->get( 'categorires_map_height', 500 );
// If no lng and lat will be added, Phoca Gallery will try to find it in categories
if ($this->tGeo['categorieslat'] == '' || $this->tGeo['categorieslng'] == '') {
phocagalleryimport('phocagallery.geo.geo');
$latLng = PhocaGalleryGeo::findLatLngFromCategory($this->categories);
$this->tGeo['categorieslng'] = $latLng['lng'];
$this->tGeo['categorieslat'] = $latLng['lat'];
}
$this->tmplGeo = $this->tGeo;
if ($this->t['map_type'] == 2) {
parent::display('map_osm');
} else {
parent::display('map');
}
} else {
parent::display($tpl);
}
}
protected function _prepareDocument() {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
$title = null;
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$menu = $menus->getActive();
/*if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}*/
if ($menu && $this->params->get('display_menu_link_title', 1) == 1) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
} else if ($app->get('sitename_pagetitles', 0) == 2) {
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
// Features added by Bernard Gilly - alphaplug.com
// load external plugins
//$dispatcher = JDispatcher::getInstance();
PluginHelper::importPlugin('phocagallery');
$results = $app->triggerEvent('onViewCategories', array() );
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="_COM_PHOCAGALLERY_CATEGORY_GROUP">
<message>
<![CDATA[_COM_PHOCAGALLERY_CATEGORY_GROUP_DESC]]>
</message>
</view>
</metadata>

View File

@ -0,0 +1,298 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Component\ComponentHelper;
phocagalleryimport('phocagallery.render.rendertabs');
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
$layoutC = new FileLayout('comments', null, array('component' => 'com_phocagallery'));
// SVG Definitions
$d = array();
echo $layoutSVG->render($d);
echo '<div id="phocagallery" class="pg-category-view'.$this->params->get( 'pageclass_sfx' ).' pg-cv">';
// Heading
$heading = '';
if ($this->params->get( 'page_heading' ) != '') {
$heading .= $this->params->get( 'page_heading' );
}
// Category Name Title
if ( $this->t['display_cat_name_title'] == 1) {
if (isset($this->category->title) && $this->category->title != '') {
if ($heading != '') {
$heading .= ' - ';
}
$heading .= $this->category->title;
}
}
// Pagetitle
if ($this->t['show_page_heading'] != 0) {
if ( $heading != '') {
echo '<div class="page-header"><h1>'. $this->escape($heading) . '</h1></div>';
}
}
// Feed
if ($this->t['display_feed'] == 1 || $this->t['display_feed'] == 3) {
if (isset($this->category->id) && (int)$this->category->id > 0 && isset($this->category->alias)) {
echo '<div class="pg-top-icons">';
echo '<a href="' . Route::_(PhocaGalleryRoute::getFeedRoute('category'), $this->category->id, $this->category->alias) . '" title="' . Text::_('COM_PHOCAGALLERY_RSS') . '"><svg class="ph-si ph-si-feed"><use xlink:href="#ph-si-feed"></use></svg></a>';
echo '</div>';
echo '<div class="ph-cb"></div>';
}
}
// Category Description
if (isset($this->category->description) && $this->category->description != '' ) {
echo '<div class="pg-category-desc">'. HTMLHelper::_('content.prepare', $this->category->description) .'</div>'. "\n";
}
$this->checkRights = 1;
if ((int)$this->tagId > 0) {
// Search by tags
$this->checkRights = 1;
// Categories View in Category View
if ($this->t['display_categories_cv']) {
echo $this->loadTemplate('categories');
}
echo $this->loadTemplate('images');
echo $this->loadTemplate('pagination');
} else {
// Standard category displaying
$this->checkRights = 0;
// Categories View in Category View
if ($this->t['display_back_button_cv'] == 1 || $this->t['display_categories_cv'] == 1) {
echo $this->loadTemplate('categories');
}
// Rendering images
echo $this->loadTemplate('images');
echo $this->loadTemplate('pagination');
if ($this->t['displaytabs'] > 0) {
$tabItems = array();
$tabItemsI = 0;
$tabs = new PhocaGalleryRenderTabs();
echo $tabs->startTabs();
if ((int)$this->t['display_rating'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgvotes', 'title' => Text::_('COM_PHOCAGALLERY_RATING'), 'image' => 'vote', 'icon' => 'star');
$tabItemsI++;
}
if ((int)$this->t['display_comment'] == 1) {
//if ($this->t['externalcommentsystem'] == 2) {
// $tabItems[$tabItemsI] = array('id' => 'pgcomments', 'title' => JText::_('COM_PHOCAGALLERY_COMMENTS'), 'image' => 'comment-fb-small', 'icon' => 'comment-fb');
//} else {
$tabItems[$tabItemsI] = array('id' => 'pgcomments', 'title' => Text::_('COM_PHOCAGALLERY_COMMENTS'), 'image' => 'comment', 'icon' => 'comment');
//}
$tabItemsI++;
}
if ((int)$this->t['displaycategorystatistics'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgstatistics', 'title' => Text::_('COM_PHOCAGALLERY_STATISTICS'), 'image' => 'statistics', 'icon' => 'stats');
$tabItemsI++;
}
if ((int)$this->t['displaycategorygeotagging'] == 1) {
if ($this->map['longitude'] == '' || $this->map['latitude'] == '') {
//echo '<p>' . JText::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
$tabItems[$tabItemsI] = array('id' => 'pggeotagging', 'title' => Text::_('COM_PHOCAGALLERY_GEOTAGGING'), 'image' => 'geo', 'icon' => 'earth');
$tabItemsI++;
}
}
if ((int)$this->t['displaycreatecat'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgnewcategory', 'title' => Text::_('COM_PHOCAGALLERY_CATEGORY'), 'image' => 'subcategories', 'icon' => 'category');
$tabItemsI++;
}
if ((int)$this->t['displayupload'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgupload', 'title' => Text::_('COM_PHOCAGALLERY_UPLOAD'), 'image' => 'upload', 'icon' => 'upload');
$tabItemsI++;
}
if ((int)$this->t['ytbupload'] == 1 && $this->t['displayupload'] == 1 ) {
$tabItems[$tabItemsI] = array('id' => 'pgytbupload', 'title' => Text::_('COM_PHOCAGALLERY_YTB_UPLOAD'), 'image' => 'upload-ytb', 'icon' => 'ytb');
$tabItemsI++;
}
if((int)$this->t['enablemultiple'] == 1 && (int)$this->t['displayupload'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgmultipleupload', 'title' => Text::_('COM_PHOCAGALLERY_MULTIPLE_UPLOAD'), 'image' => 'upload-multiple', 'icon' => 'upload-multiple');
$tabItemsI++;
}
/*if($this->t['enablejava'] == 1 && (int)$this->t['displayupload'] == 1) {
$tabItems[$tabItemsI] = array('id' => 'pgjavaupload', 'title' => Text::_('COM_PHOCAGALLERY_JAVA_UPLOAD'), 'image' => 'upload-java', 'icon' => 'upload-java');
$tabItemsI++;
}*/
$tabs->setActiveTab(isset($tabItems[$this->t['tab']]['id']) ? $tabItems[$this->t['tab']]['id'] : 0);
echo $tabs->renderTabsHeader($tabItems);
//echo '<div id="phocagallery-pane">';
//echo JHtml::_('tabs.start', 'config-tabs-com_phocagallery-category', array('useCookie'=>1, 'startOffset'=> $this->t['tab']));
if ((int)$this->t['display_rating'] == 1) {
echo $tabs->startTab('pgvotes');
echo $this->loadTemplate('rating');
echo $tabs->endTab();
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('vote', 'media/com_phocagallery/images/icon-vote.png', ''). '&nbsp;'. JText::_('COM_PHOCAGALLERY_RATING'), 'pgvotes' );
}
if ((int)$this->t['display_comment'] == 1) {
//$commentImg = ($this->t['externalcommentsystem'] == 2) ? 'icon-comment-fb' : 'icon-comment';
//echo JHtml::_('tabs.panel', JHtml::_( 'image', 'media/com_phocagallery/images/'.$commentImg.'.png','') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_COMMENTS'), 'pgcomments' );
echo $tabs->startTab('pgcomments');
/*if ($this->t['externalcommentsystem'] == 2) {
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('comment-fb', 'media/com_phocagallery/images/icon-comment-fb-small.png', ''). '&nbsp;'.Text::_('COM_PHOCAGALLERY_COMMENTS'), 'pgcomments' );
} else {
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('comment', 'media/com_phocagallery/images/icon-comment.png', ''). '&nbsp;'.Text::_('COM_PHOCAGALLERY_COMMENTS'), 'pgcomments' );
}*/
/*if ($this->t['externalcommentsystem'] == 1) {
if (ComponentHelper::isEnabled('com_jcomments', true)) {
include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php');
echo JComments::showComments($this->category->id, 'com_phocagallery', Text::_('COM_PHOCAGALLERY_CATEGORY') .' '. $this->category->title);
}
} else if($this->t['externalcommentsystem'] == 2) {
echo $this->loadTemplate('comments-fb');
} else {
echo $this->loadTemplate('comments');
}*/
$d = array();
$d['t'] = $this->t;
$d['form']['task'] = 'comment';
$d['form']['view'] = 'category';
$d['form']['controller'] = 'category';
$d['form']['tab'] = $this->t['currenttab']['comment'];
$d['form']['id'] = '';
$d['form']['catid'] = $this->category->slug;
$d['form']['itemid'] = $this->itemId;
echo $layoutC->render($d);
echo $tabs->endTab();
}
if ((int)$this->t['displaycategorystatistics'] == 1) {
//echo JHtml::_('tabs.panel', JHtml::_( 'image', 'media/com_phocagallery/images/icon-statistics.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_STATISTICS'), 'pgstatistics' );
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('statistics', 'media/com_phocagallery/images/icon-statistics.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_STATISTICS'), 'pgstatistics' );
echo $tabs->startTab('pgstatistics');
echo $this->loadTemplate('statistics');
echo $tabs->endTab();
}
if ((int)$this->t['displaycategorygeotagging'] == 1) {
if ($this->map['longitude'] == '' || $this->map['latitude'] == '') {
//echo '<p>' . JText::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
//echo JHtml::_('tabs.panel', JHtml::_( 'image', 'media/com_phocagallery/images/icon-geo.png','') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_GEOTAGGING'), 'pggeotagging' );
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('geo', 'media/com_phocagallery/images/icon-geo.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_GEOTAGGING'), 'pggeotagging' );
echo $tabs->startTab('pggeotagging');
if ($this->t['map_type'] == 2){
echo $this->loadTemplate('geotagging_osm');
} else {
echo $this->loadTemplate('geotagging');
}
echo $tabs->endTab();
}
}
if ((int)$this->t['displaycreatecat'] == 1) {
echo $tabs->startTab('pgnewcategory');
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('subcategory', 'media/com_phocagallery/images/icon-subcategories.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_CATEGORY'), 'pgnewcategory' );
echo $this->loadTemplate('newcategory');
echo $tabs->endTab();
}
if ((int)$this->t['displayupload'] == 1) {
echo $tabs->startTab('pgupload');
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('upload', 'media/com_phocagallery/images/icon-upload.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_UPLOAD'), 'pgupload' );
echo $this->loadTemplate('upload');
echo $tabs->endTab();
}
if ((int)$this->t['ytbupload'] == 1 && $this->t['displayupload'] == 1 ) {
echo $tabs->startTab('pgytbupload');
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('upload-ytb', 'media/com_phocagallery/images/icon-upload-ytb.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_YTB_UPLOAD'), 'pgytbupload' );
echo $this->loadTemplate('ytbupload');
echo $tabs->endTab();
}
if((int)$this->t['enablemultiple'] == 1 && (int)$this->t['displayupload'] == 1) {
echo $tabs->startTab('pgmultipleupload');
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('upload-multiple', 'media/com_phocagallery/images/icon-upload-multiple.png', '') . '&nbsp;'.JText::_('COM_PHOCAGALLERY_MULTIPLE_UPLOAD'), 'pgmultipleupload' );
echo $this->loadTemplate('multipleupload');
echo $tabs->endTab();
}
/*if($this->t['enablejava'] == 1 && (int)$this->t['displayupload'] == 1) {
echo $tabs->startTab('pgjavaupload');
//echo JHtml::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('upload-java', 'media/com_phocagallery/images/icon-upload-java.png', ''). '&nbsp;'.JText::_('COM_PHOCAGALLERY_JAVA_UPLOAD'), 'pgjavaupload' );
echo $this->loadTemplate('javaupload');
echo $tabs->endTab();
}*/
echo $tabs->endTabs();
//echo JHtml::_('tabs.end');
//echo '</div>'. "\n";// end phocagallery-pane
}
}
if ($this->t['detail_window'] == 6) {
?><script type="text/javascript">
var gjaks = new SZN.LightBox(dataJakJs, optgjaks);
</script><?php
}
if ($this->t['detail_window'] == 14) {
echo PhocaGalleryRenderDetailWindow::loadPhotoswipeBottom();
}
echo PhocaGalleryUtils::getExtInfo();
echo '</div>';
?>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_PHOCAGALLERY_CATEGORY_LIST_LAYOUT">
<message>
<![CDATA[COM_PHOCAGALLERY_CATEGORY_LIST_LAYOUT_DESC]]>
</message>
</layout>
<name>COM_PHOCAGALLERY_CATEGORY_LIST_LAYOUT</name>
<description>COM_PHOCAGALLERY_CATEGORY_LIST_LAYOUT_DESC</description>
<fields name="request">
<fieldset name="request" addfieldpath="/administrator/components/com_phocagallery/models/fields">
<field name="id" type="phocagallerycategory" section="com_phocagallery" default="0" label="COM_PHOCAGALLERY_FIELD_SELECT_CATEGORY_LABEL" description="COM_PHOCAGALLERY_FIELD_SELECT_CATEGORY_DESC" required="true" />
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic" addfieldpath="/administrator/components/com_phocagallery/models/fields" >
<field name="show_pagination_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_category" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_PAGINATION_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_limit_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_pagination_limit_category" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_SELECT_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_ordering_categories" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORIES_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORIES_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="show_ordering_images" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORY_VIEW_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_ORDERING_CATEGORY_VIEW_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="@spacer" type="spacer" default="" label="" description="" />
<field name="display_menu_link_title" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_MENU_LINK_TITLE_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_MENU_LINK_TITLE_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="display_cat_name_title" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_PAGE_TITLE_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_PAGE_TITLE_DESC">
<option value="0">COM_PHOCAGALLERY_HIDE</option>
<option value="1">COM_PHOCAGALLERY_DISPLAY</option>
</field>
<field name="display_cat_name_breadcrumbs" type="list" default="0" label="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_BREADCRUMBS_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_CAT_NAME_IN_BREADCRUMBS_DESC">
<option value="0">COM_PHOCAGALLERY_MENU_ITEM_TITLE</option>
<option value="1">COM_PHOCAGALLERY_MENU_ITEM_TITLE_CAT_TITLE</option>
<option value="2">COM_PHOCAGALLERY_MENU_CAT_TITLE</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,33 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\Router\Route;
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery-categories-detail" class="pg-category-categories-top-box">'."\n";
foreach ($this->itemscv as $k => $item) {
echo '<div class="pg-category-categories-top-box-title">';
if ($item->type == 3) {
echo '<svg class="ph-si ph-si-category-top-back"><use xlink:href="#ph-si-back"></use></svg>';
} else {
echo '<svg class="ph-si ph-si-category-top-category"><use xlink:href="#ph-si-category"></use></svg>';
}
echo '<a href="' . Route::_($item->link) . '">' . $item->title. '</a>';
echo $item->numlinks > 0 ? ' <span class="pg-category-box-count">(' . $item->numlinks . ')</span>' : '';
echo '</div>';
}
echo '</div>'."\n";
?>

View File

@ -0,0 +1,53 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?><div id="phocagallery-comments"><?php
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';//because of IE bug
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$getParamsArray = explode(',', 'start,limitstart,template,fb_comment_id');
if (!empty($getParamsArray) ) {
foreach($getParamsArray as $key => $value) {
$uri->delVar($value);
}
}
if ($this->t['fb_comment_app_id'] == '') {
echo JText::_('COM_PHOCAGALLERY_ERROR_FB_APP_ID_EMPTY');
} else {
$cCount = '';
if ((int)$this->t['fb_comment_count'] > 0) {
$cCount = 'numposts="'.$this->t['fb_comment_count'].'"';
}
?><fb:comments href="<?php echo $uri->toString(); ?>" simple="1" <?php echo $cCount;?> width="<?php echo (int)$this->t['fb_comment_width'] ?>"></fb:comments>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $this->t['fb_comment_app_id'] ?>',
status: true,
cookie: true,
xfbml: true
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/<?php echo $this->t['fb_comment_lang']; ?>/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<?php } ?>
</div>

View File

@ -0,0 +1,112 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery-comments">'. "\n";
echo '<div class="ph-tabs-iefix">&nbsp;</div>';//because of IE bug
if (!empty($this->commentitem)){
$userImage = Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->t['icon_path']. 'icon-user.png','');
$smileys = PhocaGalleryComment::getSmileys();
foreach ($this->commentitem as $itemValue) {
$date = Joomla\CMS\HTML\HTMLHelper::_('date', $itemValue->date, JText::_('DATE_FORMAT_LC2') );
$comment = $itemValue->comment;
$comment = PhocaGalleryComment::bbCodeReplace($comment);
foreach ($smileys as $smileyKey => $smileyValue) {
$comment = str_replace($smileyKey, Joomla\CMS\HTML\HTMLHelper::_( 'image', $this->t['icon_path']. ''.$smileyValue .'.png',''), $comment);
}
echo '<blockquote>'
.'<h4>'.$userImage.'&nbsp;'.$itemValue->name.'</h4>'
.'<p><strong>'.PhocaGalleryText::wordDelete($itemValue->title, 50, '...').'</strong></p>'
.'<p style="overflow:auto;width:'.$this->t['commentwidth'].'px;">'.$comment.'</p>'
.'<p style="text-align:right"><small>'.$date.'</small></p>'
.'</blockquote>';
}
}
echo '<h4>'.JText::_('COM_PHOCAGALLERY_ADD_COMMENT').'</h4>';
if ($this->t['already_commented']) {
echo '<p>'.JText::_('COM_PHOCAGALLERY_COMMENT_ALREADY_SUBMITTED').'</p>';
} else if ($this->t['not_registered']) {
echo '<p>'.JText::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_SUBMIT_COMMENT').'</p>';
} else {
?>
<form action="<?php echo htmlspecialchars($this->t['action']);?>" name="phocagallerycommentsform" id="phocagallery-comments-form" method="post" >
<table>
<tr>
<td><?php echo JText::_('COM_PHOCAGALLERY_NAME');?>:</td>
<td><?php echo $this->t['name']; ?></td>
</tr>
<tr>
<td><?php echo JText::_('COM_PHOCAGALLERY_TITLE');?>:</td>
<td><input type="text" name="phocagallerycommentstitle" id="phocagallery-comments-title" value="" maxlength="255" class="comment-input" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<a href="#" onclick="pasteTag('b', true); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('bold', $this->t['icon_path'].'icon-b.png', JText::_('COM_PHOCAGALLERY_BOLD')); ?></a>&nbsp;
<a href="#" onclick="pasteTag('i', true); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('italic', $this->t['icon_path'].'icon-i.png', JText::_('COM_PHOCAGALLERY_ITALIC')); ?></a>&nbsp;
<a href="#" onclick="pasteTag('u', true); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('underline', $this->t['icon_path'].'icon-u.png', JText::_('COM_PHOCAGALLERY_UNDERLINE')); ?></a>&nbsp;&nbsp;
<a href="#" onclick="pasteSmiley(':)'); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('smile', $this->t['icon_path'].'icon-s-smile.png', JText::_('COM_PHOCAGALLERY_SMILE')); ?></a>&nbsp;
<a href="#" onclick="pasteSmiley(':lol:'); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('lol', $this->t['icon_path'].'icon-s-lol.png', JText::_('COM_PHOCAGALLERY_LOL')); ?></a>&nbsp;
<a href="#" onclick="pasteSmiley(':('); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('sad', $this->t['icon_path'].'icon-s-sad.png', JText::_('COM_PHOCAGALLERY_SAD')); ?></a>&nbsp;
<a href="#" onclick="pasteSmiley(':?'); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('confused', $this->t['icon_path'].'icon-s-confused.png', JText::_('COM_PHOCAGALLERY_CONFUSED')); ?></a>&nbsp;
<a href="#" onclick="pasteSmiley(':wink:'); return false;"><?php echo PhocaGalleryRenderFront::renderIcon('wink', $this->t['icon_path'].'icon-s-wink.png', JText::_('COM_PHOCAGALLERY_WINK')); ?></a>&nbsp;
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<textarea name="phocagallerycommentseditor" id="phocagallery-comments-editor" cols="30" rows="10" class= "comment-input" onkeyup="countChars();" ></textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><?php echo JText::_('COM_PHOCAGALLERY_CHARACTERS_WRITTEN');?> <input name="phocagallerycommentscountin" value="0" readonly="readonly" class="comment-input2" /> <?php echo JText::_('COM_PHOCAGALLERY_AND_LEFT_FOR_COMMENT');?> <input name="phocagallerycommentscountleft" value="<?php echo $this->t['maxcommentchar'];?>" readonly="readonly" class="comment-input2" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right">
<input class="btn" type="submit" id="phocagallerycommentssubmit" onclick="return(checkCommentsForm());" value="<?php echo JText::_('COM_PHOCAGALLERY_SUBMIT_COMMENT'); ?>"/>
</td>
</tr>
</table>
<input type="hidden" name="task" value="comment"/>
<input type="hidden" name="view" value="category"/>
<input type="hidden" name="controller" value="category"/>
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['comment'];?>" />
<input type="hidden" name="catid" value="<?php echo $this->category->slug ?>"/>
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
<?php echo Joomla\CMS\HTML\HTMLHelper::_( 'form.token' ); ?>
</form>
<?php
}
echo '</div>'. "\n";
?>

View File

@ -0,0 +1,59 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
phocagalleryimport('phocagallery.render.rendermap');
$map = new PhocaGalleryRenderMap();
echo '<noscript>'.Text::_('COM_PHOCAGALLERY_ERROR_MAP_ENABLE_JAVASCRIPT').'</noscript>';
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;">';
$cmw = '';
if ((int)$this->t['categorymapwidth'] > 0) {
$cmw = 'width:'.$this->t['categorymapwidth'].'px;';
}
echo '<div id="phocaMap" style="margin:0;padding:0;'. $cmw. 'height:'.$this->t['categorymapheight'].'px">';
echo '</div></div>';
//echo $map->loadApi();
?><script type='text/javascript'>//<![CDATA[
<?php
echo $map->createMap('phocaMap', 'mapPhocaMap', 'phocaLatLng', 'phocaOptions','tstPhocaMap', 'tstIntPhocaMap');
echo $map->cancelEventF();
echo $map->checkMapF();
echo $map->startMapF();
echo $map->setLatLng( $this->map['latitude'], $this->map['longitude'] );
echo $map->startOptions();
echo $map->setZoomOpt($this->map['zoom']).','."\n";
echo $map->setCenterOpt().','."\n";
echo $map->setTypeControlOpt().','."\n";
echo $map->setNavigationControlOpt().','."\n";
echo $map->setScaleControlOpt(1).','."\n";
echo $map->setScrollWheelOpt(1).','."\n";
echo $map->setDisableDoubleClickZoomOpt(0).','."\n";
echo $map->setMapTypeOpt()."\n";
echo $map->endOptions();
echo $map->setMap();
// Markers
$iconOutput = $map->setMarkerIcon(0);
echo $iconOutput['js'];
echo $map->setMarker(1,$this->map['geotitle'],$this->map['description'],$this->map['latitude'], $this->map['longitude'], $iconOutput['icon'] );
echo $map->setListener();
echo $map->endMapF();
echo $map->setInitializeF();
?>//]]></script>
<?php echo $map->loadApi(); ?>

View File

@ -0,0 +1,41 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
phocagalleryimport('phocagallery.render.rendermaposm');
$id = uniqid();
$map = new PhocaGalleryRenderMaposm($id);
echo '<noscript>'.Text::_('COM_PHOCAGALLERY_ERROR_MAP_ENABLE_JAVASCRIPT').'</noscript>';
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;">';
$cmw = '';
if ((int)$this->t['categorymapwidth'] > 0) {
$cmw = 'width:'.$this->t['categorymapwidth'].'px;';
}
echo '<div id="phocaGalleryMap'.$id.'" style="margin:0;padding:0;'. $cmw. 'height:'.$this->t['categorymapheight'].'px">';
echo '</div></div>';
$map->loadAPI();
$map->loadCoordinatesJS();
$map->createMap($this->map['latitude'], $this->map['longitude'], $this->map['zoom']);
$map->setMapType();
$map->setMarker(1, $this->map['geotitle'],$this->map['description'],$this->map['latitude'], $this->map['longitude']);
$map->renderFullScreenControl();
//$map->renderCurrentPosition();
//$map->renderSearch('', 'topleft');
$map->renderMap();

View File

@ -0,0 +1,519 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Session\Session;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Uri\Uri;
phocagalleryimport( 'phocagallery.youtube.youtube');
$app = Factory::getApplication();
$layoutBI = new FileLayout('box_image', null, array('component' => 'com_phocagallery'));
//$layoutBIM = new FileLayout('box_image_masonry', null, array('component' => 'com_phocagallery'));
$layoutBC = new FileLayout('box_category', null, array('component' => 'com_phocagallery'));
$layoutBB = new FileLayout('box_back', null, array('component' => 'com_phocagallery'));
$layoutCM = new FileLayout('category_modal', null, array('component' => 'com_phocagallery'));
// - - - - - - - - - -
// Images
// - - - - - - - - - -
if (!empty($this->items)) {
$classBox = ' pg-category-items-box';
$classItem = 'pg-item-box';
if ($this->t['display_masonry'] == 1) {
$classBox = ' pg-masonry';
$classItem = 'pg-item-box pg-masonry-item';
}
echo '<div id="pg-msnr-container" class="pg-photoswipe pg-msnr-container'.$classBox.'" itemscope itemtype="http://schema.org/ImageGallery">' . "\n";
foreach($this->items as $k => $item) {
if ($this->checkRights == 1) {
// USER RIGHT - Access of categories (if file is included in some not accessed category) - - - - -
// ACCESS is handled in SQL query, ACCESS USER ID is handled here (specific users)
$rightDisplay = 0;
if (!isset($item->cataccessuserid)) {
$item->cataccessuserid = 0;
}
if (isset($item->catid) && isset($item->cataccessuserid) && isset($item->cataccess)) {
$rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $item->cataccessuserid, $item->cataccess, $this->t['user']->getAuthorisedViewLevels(), $this->t['user']->get('id', 0), 0);
}
} else {
$rightDisplay = 1;
}
// Display back button to categories list
if ($item->item_type == 'categorieslist'){
$rightDisplay = 1;
}
if ($rightDisplay == 1) {
$this->items[$k]->rightdisplay = 1;
echo '<div class="'.$classItem.'">'. "\n";// BOX START
if ($this->t['detail_window'] == 14 && $item->type == 2) {
echo '<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">'. "\n";
}
// Image Box (image, category, folder)
$d = array();
$d['item'] = $item;
$d['t'] = $this->t;
if ($item->type == 2 ) {
echo $layoutBI->render($d);
} else if ($item->type == 1) {
echo $layoutBC->render($d);
} else {
echo $layoutBB->render($d);
}
if ($this->t['detail_window'] == 14 && $item->type == 2){
if (isset($item->photoswipecaption)) {
echo '<figcaption itemprop="caption description">' . $item->photoswipecaption . '</figcaption>'. "\n";
}
echo '</figure>';
}
// HOT, NEW
if ($item->type == 2) {
//echo PhocaGalleryRenderFront::getOverImageIcons($item->date, $item->hits);
if ($this->t['display_new'] != 0 || $this->t['display_hot'] != 0) {
echo '<div class="pg-category-box-label-box">';
if ($this->t['display_new'] != 0) {
$dateAdded = strtotime($item->date, time());
$dateToday = time();
$dateExists = $dateToday - $dateAdded;
$dateNew = (int)$this->t['display_new'] * 24 * 60 * 60;
if ($dateExists < $dateNew) {
echo '<div class="pg-category-box-label-new">' . Text::_('COM_PHOCACART_LABEL_TXT_NEW') . '</div>';
}
}
if ($this->t['display_hot'] != 0) {
if ((int)$this->t['display_hot'] <= $item->hits) {
echo '<div class="pg-category-box-label-hot">' . Text::_('COM_PHOCACART_LABEL_TXT_HOT') . '</div>';
}
}
echo '</div>';
}
}
echo '<div class="pg-item-box-info">';
// Category name
if ($item->type == 1) {
if ($item->display_name == 1 || $item->display_name == 2) {
echo '<div class="pg-item-box-title category">' . "\n";
echo '<svg class="ph-si ph-si-category"><use xlink:href="#ph-si-category"></use></svg>' . "\n";
echo '<a href="' . Route::_($item->link) . '">' . $item->title . '</a>';
echo '</div>' . "\n";
}
}
// Image Name
if ($item->type == 2) {
if ($item->display_name == 1 || $item->display_name == 2) {
echo '<div class="pg-item-box-title image pg-display-name-'.$item->display_name.'">' . "\n";
if ($item->display_name == 1) {
echo '<svg class="ph-si ph-si-image"><use xlink:href="#ph-si-image"></use></svg>' . "\n";
echo ' <a class="' . $item->class2 . '" title="' . htmlentities($item->oimgtitledetail, ENT_QUOTES, 'UTF-8') . '"'
. ' data-img-title="' . $item->title . '" href="' . Route::_($item->link2) . '"';
if ($item->onclick2 != '') {
echo 'onclick="' . $item->onclick2 . '"';
}
echo ' >';
echo '' . $item->title . '';
echo '</a>';
}
if ($item->display_name == 2) {
echo '&nbsp;';
}
echo '</div>' . "\n";
}
}
// Rate Image
if ($item->item_type == 'image') {
if ($this->t['display_rating_img'] == 2) {
echo '<div class="pg-category-box-rating">';
echo PhocaGalleryRateImage::renderRateImg($item->id, $this->t['display_rating_img'], 1);
echo '</div>';
} else if ($this->t['display_rating_img'] == 1) {
echo '<div class="pg-category-box-rating">';
echo '<a class="' . $item->class3 . '" title="' . Text::_('COM_PHOCAGALLERY_RATE_IMAGE') . '" data-img-title="' . $item->title . ' - ' . Text::_('COM_PHOCAGALLERY_RATE_IMAGE') . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=detail&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcom'] . '&Itemid=' . $this->itemId) . '"';
//echo PhocaGalleryRenderFront::renderAAttributeOther($this->t['detail_window'], $item->buttonother->optionsrating, $this->t['highslideonclick'], $this->t['highslideonclick2']);
echo 'onclick="' . $item->onclick4 . '"';
echo ' >';
echo '<div><ul class="star-rating-small">'
. '<li class="current-rating" style="width:' . $item->voteswidthimg . 'px"></li>'
. '<li><span class="star1"></span></li>';
for ($iV = 2; $iV < 6; $iV++) {
echo '<li><span class="stars' . $iV . '"></span></li>';
}
echo '</ul></div>' . "\n";
echo '</a></div>' . "\n";
}
}
if ($item->display_icon_detail == 1 ||
$item->display_icon_download > 0 ||
$item->display_icon_pc ||
$item->trash == 1 ||
$item->publish_unpublish == 1 ||
$item->display_icon_geo == 1 ||
$item->display_icon_commentimg == 1 ||
$item->camera_info == 1 ||
$item->display_icon_extlink1 == 1 ||
$item->display_icon_extlink2 == 1 ||
$item->camera_info == 1) {
echo '<div class="pg-item-box-icons-box">';
// ICON DETAIL
if ($item->display_icon_detail == 1) {
echo ' <a class="' . $item->class2 . '" title="' . htmlentities($item->oimgtitledetail, ENT_QUOTES, 'UTF-8') . '"'
. ' data-img-title="' . $item->title . '" href="' . $item->link2 . '"';
if ($item->onclick2 != '') {
echo 'onclick="' . $item->onclick2 . '"';
}
echo ' >';
echo '<svg class="ph-si ph-si-view"><title>' . $item->oimgaltdetail . '</title><use xlink:href="#ph-si-view"></use></svg>';
echo '</a>';
}
// ICON DOWNLOAD
if ($item->display_icon_download > 0) {
// Direct Download but not if there is a youtube
if ($item->display_icon_download == 2 && $item->videocode == '') {
echo ' <a title="' . Text::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD') . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=detail&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcom'] . '&phocadownload=' . $item->display_icon_download . '&Itemid=' . $this->itemId) . '"';
} else {
echo ' <a class="' . $item->class3 . '" title="' . Text::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD') . '" data-img-title="' . $item->title . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=detail&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcom'] . '&phocadownload=' . (int)$item->display_icon_download . '&Itemid=' . $this->itemId) . '"';
if ($item->onclick3 != '') {
echo 'onclick="' . $item->onclick3 . '"';
}
}
echo ' >';
echo '<svg class="ph-si ph-si-download"><use xlink:href="#ph-si-download"></use></svg>';
echo '</a>';
}
// ICON GEO
if ($item->display_icon_geo == 1) {
echo ' <a class="' . $item->class3 . '" title="' . Text::_('COM_PHOCAGALLERY_GEOTAGGING') . '" data-img-title="' . $item->title . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=map&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcom'] . '&Itemid=' . $this->itemId) . '"';
if ($item->onclick3 != '') {
echo 'onclick="' . $item->onclick3 . '"';
}
echo ' >';
//echo PhocaGalleryRenderFront::renderIcon('geo', $this->t['icon_path'].'icon-geo.png', JText::_('COM_PHOCAGALLERY_GEOTAGGING'));
echo '<svg class="ph-si ph-si-earth"><use xlink:href="#ph-si-earth"></use></svg>';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-geo.png', JText::_('COM_PHOCAGALLERY_GEOTAGGING'));
echo '</a>';
}
// ICON EXIF
if ($item->camera_info == 1) {
echo ' <a class="' . $item->class3 . '" title="' . Text::_('COM_PHOCAGALLERY_CAMERA_INFO') . '" data-img-title="' . $item->title . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=info&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcom'] . '&Itemid=' . $this->itemId) . '"';
if ($item->onclick3 != '') {
echo 'onclick="' . $item->onclick3 . '"';
}
echo ' >';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-info.png', JText::_('COM_PHOCAGALLERY_CAMERA_INFO'));
//echo PhocaGalleryRenderFront::renderIcon('camera', $this->t['icon_path'].'icon-info.png', JText::_('COM_PHOCAGALLERY_CAMERA_INFO'));
echo '<svg class="ph-si ph-si-camera"><use xlink:href="#ph-si-camera"></use></svg>';
echo '</a>';
}
// ICON COMMENT
if ($item->display_icon_commentimg == 1) {
if ($this->t['detail_window'] == 7 || $this->t['display_comment_nopup'] == 1) {
$tClass = '';
} else {
$tClass = 'class="' . $item->class3 . '"';
}
//echo ' <a '.$tClass.' title="'.JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE').'"'
// .' href="'. JRoute::_('index.php?option=com_phocagallery&view=comment&catid='.$item->catslug.'&id='.$item->slug.$this->t['tmplcomcomments'].'&Itemid='. $this->itemId ).'"';
echo ' <a ' . $tClass . ' title="' . Text::_('COM_PHOCAGALLERY_COMMENT_IMAGE') . '" data-img-title="' . $item->title . '"'
. ' href="' . Route::_('index.php?option=com_phocagallery&view=detail&catid=' . $item->catslug . '&id=' . $item->slug . $this->t['tmplcomcomments'] . '&Itemid=' . $this->itemId) . '"';
if ($this->t['display_comment_nopup'] == 1) {
echo '';
} else {
if ($item->onclick3 != '') {
echo 'onclick="' . $item->onclick3 . '"';
}
}
echo ' >';
// If you go from RSS or administration (e.g. jcomments) to category view, you will see already commented image (animated icon)
$cimgid = $app->input->get('cimgid', 0, 'int');
if ($cimgid > 0) {
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-comment-a.gif', JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE'));
//echo PhocaGalleryRenderFront::renderIcon('comment-a', $this->t['icon_path'].'icon-comment-a.gif', JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE'), 'ph-icon-animated');
echo '<svg class="pg-icon ph-icon-active pg-icon-comment-image"><use xlink:href="#ph-si-comment"></use></svg>';
} else {
//$commentImg = ($this->t['externalcommentsystem'] == 2) ? 'icon-comment-fb-small' : 'icon-comment';
//echo HTMLHelper::_('image', $this->t['icon_path'].$commentImg.'.png', JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE'));
//if ($this->t['externalcommentsystem'] == 2) {
// echo PhocaGalleryRenderFront::renderIcon('comment-fb', $this->t['icon_path'].'icon-comment-fb-small.png', JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE'), 'ph-icon-fb');
//} else {
//echo PhocaGalleryRenderFront::renderIcon('comment', $this->t['icon_path'].'icon-comment.png', JText::_('COM_PHOCAGALLERY_COMMENT_IMAGE'));
echo '<svg class="ph-si ph-si-comment-image"><use xlink:href="#ph-si-comment"></use></svg>';
//}
}
echo '</a>';
}
// ICON EXTERNAL LINK 1
if ($item->display_icon_extlink1 == 1) {
$pos10 = strpos($item->extlink1[0], 'http://');
$pos20 = strpos($item->extlink1[0], 'https://');
$extLink1 = 'http://' . $item->extlink1[0];
if ($pos10 === 0) {
$extLink1 = $item->extlink1[0];
} else if ($pos20 === 0) {
$extLink1 = $item->extlink1[0];
}
echo ' <a title="' . $item->extlink1[1] . '"'
. ' href="' . $extLink1 . '" target="' . $item->extlink1[2] . '" ' . $item->extlink1[5] . '>'
. $item->extlink1[4] . '</a>';
}
// ICON EXTERNAL LINK 2
if ($item->display_icon_extlink2 == 1) {
$pos11 = strpos($item->extlink2[0], 'http://');
$pos21 = strpos($item->extlink2[0], 'https://');
$extLink2 = 'http://' . $item->extlink2[0];
if ($pos11 === 0) {
$extLink2 = $item->extlink2[0];
} else if ($pos21 === 0) {
$extLink2 = $item->extlink2[0];
}
echo ' <a title="' . $item->extlink2[1] . '"'
. ' href="' . $extLink2 . '" target="' . $item->extlink2[2] . '" ' . $item->extlink2[5] . '>'
. $item->extlink2[4] . '</a>';
}
// ICON Phoca Cart Product
if ($item->display_icon_pc == 1) {
echo ' <a title="' . Text::_('COM_PHOCAGALLERY_ESHOP') . '" href="' . Route::_($item->pclink) . '">';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-cart.png', JText::_('COM_PHOCAGALLERY_ESHOP'));
//echo PhocaGalleryRenderFront::renderIcon('cart', $this->t['icon_path'].'icon-cart.png', JText::_('COM_PHOCAGALLERY_ESHOP'));
echo '<svg class="ph-si ph-si-cart"><title>' . Text::_('COM_PHOCAGALLERY_ESHOP') . '</title><use xlink:href="#ph-si-cart"></use></svg>';
echo '</a>';
}
// ICON Trash for private categories
if ($item->trash == 1) {
$url = PhocaGalleryRoute::getCategoryRoute($item->catid, $item->catalias);
$url .= '&removeid=' . (int)$item->id . '&controller=category&task=remove&' . Session::getFormToken() . '=1';
echo ' <a onclick="return confirm(\'' . Text::_('COM_PHOCAGALLERY_WARNING_DELETE_ITEMS') . '\')" title="' . Text::_('COM_PHOCAGALLERY_DELETE') . '" href="' . Route::_($url) . $this->t['limitstarturl'] . '">';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-trash.png', JText::_('COM_PHOCAGALLERY_DELETE'));
//echo PhocaGalleryRenderFront::renderIcon('trash', $this->t['icon_path'].'icon-trash.png', JText::_('COM_PHOCAGALLERY_DELETE'));
echo '<svg class="ph-si ph-si-trash"><title>' . Text::_('COM_PHOCAGALLERY_DELETE') . '</title><use xlink:href="#ph-si-trash"></use></svg>';
echo '</a>';
}
// ICON Publish Unpublish for private categories
if ($item->publish_unpublish == 1) {
if ($item->published == 1) {
$url = PhocaGalleryRoute::getCategoryRoute($item->catid, $item->catalias);
$url .= '&publishid=' . (int)$item->id . '&controller=category&task=unpublish&' . Session::getFormToken() . '=1';
echo ' <a title="' . Text::_('COM_PHOCAGALLERY_UNPUBLISH') . '" href="' . Route::_($url) . $this->t['limitstarturl'] . '">';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_UNPUBLISH'));
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['icon_path'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_UNPUBLISH'));
echo '<svg class="ph-si ph-si-enabled"><title>' . Text::_('COM_PHOCAGALLERY_UNPUBLISH') . '</title><use xlink:href="#ph-si-enabled"></use></svg>';
echo '</a>';
}
if ($item->published == 0) {
$url = PhocaGalleryRoute::getCategoryRoute($item->catid, $item->catalias);
$url .= '&publishid=' . (int)$item->id . '&controller=category&task=publish&' . Session::getFormToken() . '=1';
echo ' <a title="' . Text::_('COM_PHOCAGALLERY_PUBLISH') . '" href="' . Route::_($url) . $this->t['limitstarturl'] . '">';
//echo HTMLHelper::_('image', $this->t['icon_path'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_PUBLISH'));
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['icon_path'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_PUBLISH'));
echo '<svg class="ph-si ph-si-disabled"><title>' . Text::_('COM_PHOCAGALLERY_PUBLISH') . '</title><use xlink:href="#ph-si-disabled"></use></svg>';
echo '</a>';
}
}
// ICON Approve
if ($item->approved_not_approved == 1) {
// Display the information about Approving too:
if ($item->approved == 1) {
echo ' <span title="' . Text::_('COM_PHOCAGALLERY_IMAGE_APPROVED') . '">'
//.PhocaGalleryRenderFront::renderIcon('publish', $this->t['icon_path'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'))
. '<svg class="ph-si ph-si-enabled"><title>' . Text::_('COM_PHOCAGALLERY_APPROVED') . '</title><use xlink:href="#ph-si-enabled"></use></svg>'
. '</span>';
}
if ($item->approved == 0) {
echo ' <span title="' . Text::_('COM_PHOCAGALLERY_IMAGE_NOT_APPROVED') . '">'
//.PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['icon_path'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'))
. '<svg class="ph-si ph-si-disabled"><title>' . Text::_('COM_PHOCAGALLERY_NOT_APPROVED') . '</title><use xlink:href="#ph-si-disabled"></use></svg>'
. '</span>';
}
}
echo '</div>';
/*echo '<div class="pg-icon-detail">';
/* if ($item->type == 2 && ($this->t['display_comment_img'] == 2 || $this->t['display_comment_img'] == 3)) {
echo '<div class="pg-cv-comment-img-box">';
if (isset($item->comment_items)) {
foreach($item->comment_items as $cok => $cov) {
echo '<div class="pg-cv-comment-img-box-item">';
echo '<div class="pg-cv-comment-img-box-avatar">';
$img = '<div style="width: 20px; height: 20px;">&nbsp;</div>';
if (isset($cov->avatar) && $cov->avatar != '') {
$pathAvatarAbs = $this->t['path']->avatar_abs .'thumbs/phoca_thumb_s_'. $cov->avatar;
$pathAvatarRel = $this->t['path']->avatar_rel . 'thumbs/phoca_thumb_s_'. $cov->avatar;
if (File::exists($pathAvatarAbs)){
$avSize = getimagesize($pathAvatarAbs);
$avRatio = $avSize[0]/$avSize[1];
$avHeight = 20;
$avWidth = 20 * $avRatio;
$img = '<img src="'.Uri::base().'/'.$pathAvatarRel.'" width="'.(int)$avWidth.'" height="'.(int)$avHeight.'" alt="" />';
}
}
echo $img;
echo '</div>';
echo '<div class="pg-cv-comment-img-box-comment">'.$cov->name.': '.$cov->comment.'</div>';
echo '<div style="clear:both"></div>';
echo '</div>';
}
}
echo '<div id="pg-cv-comment-img-box-result'.$item->id.'"></div>';//AJAX
//echo '<div id="pg-cv-comment-img-box-newcomment'.$item->id.'"></div>';//AJAX
// href="javascript:void(0);"
echo '<div class="pg-tb-m5"><button class="btn btn-mini" onclick="javascript:document.getElementById(\'pg-cv-add-comment-img'.$item->id.'\').style.display = \'block\';var wall = new Masonry( document.getElementById(\'pg-msnr-container\'), {});">'.Text::_('COM_PHOCAGALLERY_COMMENT').'</button></div>';
echo '<div id="pg-cv-add-comment-img'.$item->id.'" class="pg-cv-add-comment-img">';
if (isset($item->allready_commented)) {
if ($item->allready_commented == 1) {
echo '<p>'.Text::_('COM_PHOCAGALLERY_COMMENT_ALREADY_SUBMITTED').'</p>';
} else if ($this->t['not_registered']) {
echo '<p>'.Text::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_SUBMIT_COMMENT').'</p>';
} else {
///echo '<form id="pgcvcommentimg'.$item->id.'" method="post" >';
echo '<textarea name="pg-cv-comments-editor-img'.(int)$item->id.'" id="pg-cv-comments-editor-img'.(int)$item->id.'" rows="2" class= "comment-input" ></textarea>';
echo '<button onclick="pgCommentImage('.(int)$item->id.', '.$this->t['diff_thumb_height'].', \'pg-msnr-container\');document.getElementById(\'pg-cv-add-comment-img'.$item->id.'\').style.display = \'none\';var wall = new Masonry( document.getElementById(\'pg-msnr-container\'), {});" class="btn btn-small" type="submit" id="phocagallerycommentssubmitimg">'. Text::_('COM_PHOCAGALLERY_SUBMIT_COMMENT').'</button>';
?>
<input type="hidden" name="catid" value="<?php echo $item->catid ?>"/>
<input type="hidden" name="imgid" value="<?php echo $item->id ?>"/>
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/> <?php
echo HTMLHelper::_( 'form.token' );
///echo '</form>';
}
}
echo '</div>';
echo '</div>';*/
}
// Tags
if ($item->type == 2 && isset($item->otags) && $item->otags != '') {
echo '<div class="ph-cb"></div>';
echo '<div class="pg-item-box-tags">' . $item->otags . '</div>' . "\n";
}
echo '<div class="ph-cb"></div>';
// Description in Box
if ($this->t['display_img_desc_box'] == 1 && $item->description != '') {
echo '<div class="pg-item-box-descripton">' . strip_tags($item->description) . '</div>' . "\n";
} else if ($this->t['display_img_desc_box'] == 2 && $item->description != '') {
echo '<div class="pg-item-box-descripton">' . (HTMLHelper::_('content.prepare', $item->description, 'com_phocagallery.image')) . '</div>' . "\n";
}
echo '</div>';// ph-item-box-info
echo '</div>'; // BOX END
}
}
echo '</div>'; // End category box items
// Modal
$d = array();
$d['t'] = $this->t;
echo $layoutCM->render($d);
} else {
//echo JText::_('COM_PHOCAGALLERY_THERE_IS_NO_IMAGE');
}

View File

@ -0,0 +1,23 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery-javaupload">';
echo '<div class="ph-tabs-iefix">&nbsp;</div>';//because of IE bug
echo '<form action="'. JURI::base().'index.php?option=com_phocagallery" >';
//if ($this->t['ftp']) {echo PhocaGalleryFileUpload::renderFTPaccess();}
echo '<h4>';
echo JText::_( 'Upload File' ).' [ '. JText::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).':&nbsp;'.$this->t['uploadmaxsizeread'].','
.' '.JText::_('COM_PHOCAGALLERY_MAX_RESOLUTION').':&nbsp;'. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
echo ' </h4>';
echo $this->t['ju_output'];
echo '</form>';
echo '</div>';

View File

@ -0,0 +1,26 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
echo '<div id="phocagallery-multipleupload">';
echo $this->t['mu_response_msg'] ;
echo '<form action="'. Uri::base().'index.php?option=com_phocagallery" >';
//if ($this->t['ftp']) {echo PhocaGalleryFileUpload::renderFTPaccess();}
echo '<h4>';
echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_FILE' ).' [ '. Text::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).':&nbsp;'.$this->t['uploadmaxsizeread'].','
.' '.Text::_('COM_PHOCAGALLERY_MAX_RESOLUTION').':&nbsp;'. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
echo ' </h4>';
echo $this->t['mu_output'];
echo '</form>';
echo '</div>';
?>

View File

@ -0,0 +1,54 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery-category-creating">';
echo '<h4>' . Text::_('COM_PHOCAGALLERY_CREATE') . '</h4>';
echo '<form action="' . htmlspecialchars($this->t['action']) . '" name="phocagallerycreatesubcatform" id="phocagallery-create-subcat-form" method="post" >';
?>
<table>
<tr>
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_SUBCATEGORY'); ?>:</strong></td>
<td><input type="text" id="subcategoryname" name="subcategoryname" maxlength="255" class="form-control comment-input" value=""/></td>
</tr>
<tr>
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_DESCRIPTION'); ?>:</strong></td>
<td><textarea id="phocagallery-create-subcat-description" name="phocagallerycreatesubcatdescription" onkeyup="countCharsCreateSubCat();" cols="30" rows="10" class="form-control comment-input"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><?php echo Text::_('COM_PHOCAGALLERY_CHARACTERS_WRITTEN'); ?>
<input name="phocagallerycreatesubcatcountin" value="0" readonly="readonly" class="form-control comment-input2"/>
<?php echo Text::_('COM_PHOCAGALLERY_AND_LEFT_FOR_DESCRIPTION'); ?>
<input name="phocagallerycreatesubcatcountleft" value="<?php echo $this->t['max_create_cat_char']; ?>" readonly="readonly" class="form-control comment-input2"/></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right"><input type="submit" onclick="return(checkCreateSubCatForm());" id="phocagallerycreatesubcatsubmit" class="btn btn-primary" value="<?php echo Text::_('COM_PHOCAGALLERY_CREATE_SUBCATEGORY'); ?>"/></td>
</tr>
</table>
<?php echo HTMLHelper::_('form.token'); ?>
<input type="hidden" name="task" value="createsubcategory"/>
<input type="hidden" name="controller" value="category"/><input type="hidden" name="view" value="category"/>
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['createsubcategory']; ?>"/>
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
<input type="hidden" name="catid" value="<?php echo $this->category->slug ?>"/>
<input type="hidden" name="parentcategoryid" value="<?php echo $this->category->slug ?>"/></form>
<?php echo '</div>'; ?>

View File

@ -0,0 +1,41 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
if ($this->params->get('show_ordering_images') || $this->params->get('show_pagination_limit_category') || $this->params->get('show_pagination_category')) {
echo '<form action="'.htmlspecialchars($this->t['action']).'" method="post" name="adminForm">'. "\n";
if (count($this->items)) {
echo '<div class="pagination pagination-centered">';
if ($this->params->get('show_ordering_images')) {
echo Text::_('COM_PHOCAGALLERY_ORDER_FRONT') .'&nbsp;'.$this->t['ordering'];
}
if ($this->params->get('show_pagination_limit_category')) {
echo Text::_('COM_PHOCAGALLERY_DISPLAY_NUM') .'&nbsp;'.$this->t['pagination']->getLimitBox();
}
if ($this->params->get('show_pagination_category')) {
echo '<div class="counter pull-right">'.$this->t['pagination']->getPagesCounter().'</div>'
.'<div class="pagination pagination-centered">'.$this->t['pagination']->getPagesLinks().'</div>';
}
echo '</div>'. "\n";
}
echo '<input type="hidden" name="controller" value="category" />';
echo HTMLHelper::_( 'form.token' );
echo '</form>';
echo '<div class="ph-cb pg-cv-paginaton">&nbsp;</div>';
} else {
echo '<div class="ph-cb pg-csv-paginaton">&nbsp;</div>';
}
?>

View File

@ -0,0 +1,60 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
// SEF problem
$isThereQMR = false;
$isThereQMR = preg_match("/\?/i", $this->t['action']);
if ($isThereQMR) {$amp = '&amp;';} else {$amp = '?';}
echo '<div id="phocagallery-votes">'. "\n";
echo '<h4>'. Text::_('COM_PHOCAGALLERY_RATE_THIS_CATEGORY'). '</h4>'. "\n";
echo '<p><strong>' . Text::_('COM_PHOCAGALLERY_RATING'). '</strong>: ' . $this->t['votesaverage'] .' / '.$this->t['votescount'] . ' ' . Text::_($this->t['votestext']). '</p>'. "\n";
if ($this->t['alreay_rated']) {
echo '<ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidth'].'px"></li>'
.'<li><span class="star1"></span></li>';
for ($i = 2;$i < 6;$i++) {
echo '<li><span class="stars'.$i.'"></span></li>';
}
echo '</ul>'
.'<p>'.Text::_('COM_PHOCAGALLERY_RATING_ALREADY_RATED').'</p>'. "\n";
} else if ($this->t['not_registered']) {
echo '<ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidth'].'px"></li>'
.'<li><span class="star1"></span></li>';
for ($i = 2;$i < 6;$i++) {
echo '<li><span class="stars'.$i.'"></span></li>';
}
echo '</ul>'
.'<p>'.Text::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_RATE_CATEGORY').'</p>'. "\n";
} else {
echo '<ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidth'].'px"></li>'
.'<li><a href="'.htmlspecialchars($this->t['action']).$amp.'controller=category&task=rate&rating=1&tab='.$this->t['currenttab']['rating'].$this->t['limitstarturl'].'" title="'. Text::sprintf('COM_PHOCAGALLERY_STAR_OUT_OF', 1, 5). '" class="star1">1</a></li>';
for ($i = 2;$i < 6;$i++) {
echo '<li><a href="'.htmlspecialchars($this->t['action']).$amp.'controller=category&task=rate&rating='.$i.'&tab='.$this->t['currenttab']['rating'].$this->t['limitstarturl'].'" title="'. Text::sprintf('COM_PHOCAGALLERY_STARS_OUT_OF', $i, 5) .'" class="stars'.$i.'">'.$i.'</a></li>';
}
echo '</ul>';
}
echo '</div>'. "\n";
?>

View File

@ -0,0 +1,228 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
$layoutBI = new FileLayout('box_image', null, array('component' => 'com_phocagallery'));
if ($this->t['detail_window'] == 14) {
echo '<div id="phocagallery-statistics" class="pg-photoswipe" itemscope itemtype="http://schema.org/ImageGallery">';
//echo '<div id="phocagallery-statistics">';
} else {
echo '<div id="phocagallery-statistics">';
}
if ($this->t['displaymaincatstat']) {
echo '<h4>'.Text::_('COM_PHOCAGALLERY_CATEGORY').'</h4>'
.'<table>'
.'<tr><td>'.Text::_('COM_PHOCAGALLERY_NR_PUBLISHED_IMG_CAT') .': </td>'
.'<td>'.$this->t['numberimgpub'].'</td></tr>'
.'<tr><td>'.Text::_('COM_PHOCAGALLERY_NR_UNPUBLISHED_IMG_CAT') .': </td>'
.'<td>'.$this->t['numberimgunpub'].'</td></tr>'
.'<tr><td>'.Text::_('COM_PHOCAGALLERY_CATEGORY_VIEWED') .': </td>'
.'<td>'.$this->t['categoryviewed'].' x</td></tr>'
.'</table>';
}
// MOST VIEWED
if ($this->t['displaymostviewedcatstat']) {
echo '<h4>'.Text::_('COM_PHOCAGALLERY_MOST_VIEWED_IMG_CAT').'</h4>';
echo '<div id="pg-msnr-container" class="pg-photoswipe pg-msnr-container pg-category-items-box" itemscope itemtype="http://schema.org/ImageGallery">' . "\n";
if (!empty($this->t['mostviewedimg'])) {
foreach($this->t['mostviewedimg'] as $key => $item) {
echo '<div class="pg-item-box">'. "\n";// BOX START
if ($this->t['detail_window'] == 14 && $item->type == 2) {
echo '<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">'. "\n";
}
// Image Box (image, category, folder)
$d = array();
$d['item'] = $item;
$d['t'] = $this->t;
echo $layoutBI->render($d);
if ($this->t['detail_window'] == 14 && $item->type == 2){
if (isset($item->photoswipecaption)) {
echo '<figcaption itemprop="caption description">' . $item->photoswipecaption . '</figcaption>'. "\n";
}
echo '</figure>';
}
// Image Name
echo '<div class="pg-item-box-title image">'. "\n";
echo '<svg class="ph-si ph-si-image"><use xlink:href="#ph-si-image"></use></svg>'. "\n";
echo $item->title;
echo '<div class="pg-item-box-stats-value">'.$item->hits.' <small>x</small></div>';
echo '</div>'. "\n";
echo '</div>';
}
}
echo '</div>';
} // END MOST VIEWED
// LAST ADDED
if ($this->t['displaylastaddedcatstat']) {
echo '<h4>'.Text::_('COM_PHOCAGALLERY_LAST_ADDED_IMG_CAT').'</h4>';
echo '<div id="pg-msnr-container" class="pg-photoswipe pg-msnr-container pg-category-items-box" itemscope itemtype="http://schema.org/ImageGallery">' . "\n";
if (!empty($this->t['lastaddedimg'])) {
foreach($this->t['lastaddedimg'] as $key => $item) {
echo '<div class="pg-item-box">'. "\n";// BOX START
if ($this->t['detail_window'] == 14 && $item->type == 2) {
echo '<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">'. "\n";
}
// Image Box (image, category, folder)
$d = array();
$d['item'] = $item;
$d['t'] = $this->t;
echo $layoutBI->render($d);
if ($this->t['detail_window'] == 14 && $item->type == 2){
if (isset($item->photoswipecaption)) {
echo '<figcaption itemprop="caption description">' . $item->photoswipecaption . '</figcaption>'. "\n";
}
echo '</figure>';
}
// Image Name
echo '<div class="pg-item-box-title image">'. "\n";
echo '<svg class="ph-si ph-si-image"><use xlink:href="#ph-si-image"></use></svg>'. "\n";
echo $item->title;
echo '<div class="pg-item-box-stats-value">'.HTMLHelper::Date($item->date, "d. m. Y").' <small>x</small></div>';
echo '</div>'. "\n";
echo '</div>';
}
}
echo '</div>';
} // END LAST ADDED
/*
// LAST ADDED
if ($this->t['displaylastaddedcatstat']) {
echo '<h4>'.Text::_('COM_PHOCAGALLERY_LAST_ADDED_IMG_CAT').'</h4>';
if (!empty($this->t['lastaddedimg'])) {
foreach($this->t['lastaddedimg'] as $key => $value) {
$extImage = PhocaGalleryImage::isExtImage($value->extid);
if ($extImage) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($value->extw, $value->exth, $this->t['picasa_correct_width_m'], $this->t['picasa_correct_height_m']);
}
?><div class="pg-cv-box pg-cv-box-stat">
<div class="pg-cv-box-img pg-box1">
<div class="pg-box2">
<div class="pg-box3"><?php
if ($this->t['detail_window'] == 14) {
echo '<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">';
}
?><a class="<?php echo $value->button->methodname; ?>"<?php
echo ' href="'. $value->link.'"';
//Correction (to not be in conflict - statistics vs. standard images)
// e.g. shadowbox shadowbox[PhocaGallery] --> shadowbox[PhocaGallery3]
$options4 = str_replace('[PhocaGallery]', '[PhocaGallery4]', $value->button->options);
echo PhocaGalleryRenderFront::renderAAttributeStat($this->t['detail_window'], $options4, '', $this->t['highslideonclick'], $this->t['highslideonclick2'], '', $this->category->alias, 'la');
if (isset($value->datasize)) {
echo ' '. $value->datasize;
}
echo ' >';
if ($extImage) {
echo HTMLHelper::_( 'image', $value->linkthumbnailpath, $value->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-image', 'itemprop' => "thumbnail"));
} else {
echo HTMLHelper::_( 'image', $value->linkthumbnailpath, $value->altvalue, array('class' => 'pg-image', 'itemprop' => "thumbnail") );
}
?></a><?php
if ($this->t['detail_window'] == 14) {
if ($this->t['photoswipe_display_caption'] == 1) {
echo '<figcaption itemprop="caption description">'. $value->title.'</figcaption>';
}
echo '</figure>';
}
?></div>
</div>
</div><?php
// subfolder
if ($value->type == 1) {
if ($value->display_name == 1 || $value->display_name == 2) {
echo '<div class="pg-name">'.$value->title.'</div>';
}
}
// image
if ($value->type == 2) {
if ($value->display_name == 1) {
echo '<div class="pg-name">'.$value->title.'</div>';
}
if ($value->display_name == 2) {
echo '<div class="pg-name">&nbsp;</div>';
}
}
echo '<div class="detail" style="margin-top:2px;text-align:left">';
//echo JHtml::_('image', 'media/com_phocagallery/images/icon-date.png', JText::_('COM_PHOCAGALLERY_IMAGE_DETAIL'));
echo PhocaGalleryRenderFront::renderIcon('calendar', 'media/com_phocagallery/images/icon-date.png', Text::_('COM_PHOCAGALLERY_IMAGE_DETAIL'));
echo '&nbsp;&nbsp; '.HTMLHelper::Date($value->date, "d. m. Y");
echo '</div>';
echo '<div class="ph-cb"></div>';
echo '</div>';
}
echo '<div class="ph-cb"></div>';
}
}// END MOST VIEWED
*/
echo '</div>'. "\n";
?>

View File

@ -0,0 +1,30 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// NO htmlspecialchars - it is used in view.html.php
use Joomla\CMS\HTML\HTMLHelper;
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
echo '<div id="phocagallery-upload">';
echo '<form onsubmit="return OnUploadSubmitCategoryPG(\'loading-label\');" action="'. $this->t['su_url'] .'" id="phocaGalleryUploadFormU" method="post" enctype="multipart/form-data">';
//if ($this->t['ftp']) { echo PhocaGalleryFileUpload::renderFTPaccess();}
echo '<h4>';
echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_FILE' ).' [ '. Text::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).':&nbsp;'.$this->t['uploadmaxsizeread'].','
.' '.Text::_('COM_PHOCAGALLERY_MAX_RESOLUTION').':&nbsp;'. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
echo ' </h4>';
echo $this->t['su_output'];
$this->t['upload_form_id'] = 'phocaGalleryUploadFormU';
echo $this->loadTemplate('uploadform');
echo HTMLHelper::_('form.token');
echo '</form>';
echo '</div>';

View File

@ -0,0 +1,52 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
?><table>
<tr>
<td><?php echo Text::_('COM_PHOCAGALLERY_FILENAME');?>:</td>
<td>
<input type="file" id="file-upload" name="Filedata" class="form-control" /><?php
/*<input type="submit" id="file-upload-submit" value="<?php echo JText::_('COM_PHOCAGALLERY_START_UPLOAD'); ?>"/>*/
?><button class="btn btn-primary" id="file-upload-submit"><i class="icon-upload icon-white"></i><?php echo Text::_('COM_PHOCAGALLERY_START_UPLOAD'); ?></button>
<span id="upload-clear"></span>
</td>
</tr>
<tr>
<td><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_TITLE' ); ?>:</td>
<td>
<input type="text" id="phocagallery-upload-title" name="phocagalleryuploadtitle" value="" maxlength="255" class="form-control comment-input" /></td>
</tr>
<tr>
<td><?php echo Text::_( 'COM_PHOCAGALLERY_DESCRIPTION' ); ?>:</td>
<td><textarea id="phocagallery-upload-description" name="phocagalleryuploaddescription" onkeyup="countCharsUpload('<?php echo $this->t['upload_form_id']; ?>');" cols="30" rows="10" class="form-control comment-input"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><?php echo Text::_('COM_PHOCAGALLERY_CHARACTERS_WRITTEN');?> <input name="phocagalleryuploadcountin" value="0" readonly="readonly" class="form-control comment-input2" /> <?php echo Text::_('COM_PHOCAGALLERY_AND_LEFT_FOR_DESCRIPTION');?> <input name="phocagalleryuploadcountleft" value="<?php echo $this->t['max_upload_char'];?>" readonly="readonly" class="form-control comment-input2" />
</td>
</tr>
</table>
<?php
if ($this->t['upload_form_id'] == 'phocaGalleryUploadFormU') {
/*echo '<div id="loading-label" style="text-align:center">'
. HTMLHelper::_('image', 'media/com_phocagallery/images/icon-switch.gif', '')
. ' '.JText::_('COM_PHOCAGALLERY_LOADING').'</div>';*/
echo '<div id="loading-label" class="ph-loading-text ph-loading-hidden"><div class="ph-lds-ellipsis"><div></div><div></div><div></div><div></div></div><div>'. Text::_('COM_PHOCAGALLERY_LOADING') . '</div></div>';
}
?>

View File

@ -0,0 +1,43 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
echo '<div id="phocagallery-ytbupload">';
echo '<div class="ph-tabs-iefix">&nbsp;</div>';//because of IE bug
echo '<form onsubmit="return OnUploadSubmitCategoryPG(\'loading-label-ytb\');" action="'. $this->t['syu_url'] .'" id="phocaGalleryUploadFormYU" method="post">';
//if ($this->t['ftp']) { echo PhocaGalleryFileUpload::renderFTPaccess();}
echo '<h4>'.Text::_('COM_PHOCAGALLERY_YTB_UPLOAD').'</h4>';
echo $this->t['syu_output'];
$this->t['upload_form_id'] = 'phocaGalleryUploadFormYU';
?>
<table>
<tr>
<td><?php echo Text::_( 'COM_PHOCAGALLERY_YTB_LINK' ); ?>:</td>
<td><input type="text" id="phocagallery-ytbupload-link" name="phocagalleryytbuploadlink" value="" class="form-control" maxlength="255" size="48" /></td>
</tr>
<tr style="text-align: right">
<td></td>
<td><input type="submit" class="btn btn-primary" id="file-upload-submit" value="<?php echo Text::_('COM_PHOCAGALLERY_START_UPLOAD'); ?>"/></td>
</tr>
</table><?php
if ($this->t['upload_form_id'] == 'phocaGalleryUploadFormYU') {
/* echo '<div id="loading-label-ytb" style="text-align:center">'
. HTMLHelper::_('image', 'media/com_phocagallery/images/icon-switch.gif', '')
. ' '.Text::_('COM_PHOCAGALLERY_LOADING').'</div>';
*/
echo '<div id="loading-label-ytb" class="ph-loading-text ph-loading-hidden"><div class="ph-lds-ellipsis"><div></div><div></div><div></div><div></div></div><div>'. Text::_('COM_PHOCAGALLERY_LOADING') . '</div></div>';
}
echo HTMLHelper::_('form.token');
echo '</form>';
echo '</div>';

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,158 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Document\Feed\FeedItem;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
jimport( 'joomla.application.component.view');
phocagalleryimport( 'phocagallery.ordering.ordering');
phocagalleryimport( 'phocagallery.picasa.picasa');
phocagalleryimport( 'phocagallery.facebook.fbsystem');
class PhocaGalleryViewCategory extends HtmlView
{
function display($tpl = null) {
$app = Factory::getApplication();
$user = Factory::getUser();
$userLevels = implode (',', $user->getAuthorisedViewLevels());
$db = Factory::getDBO();
$menu = $app->getMenu();
$document = Factory::getDocument();
$params = $app->getParams();
// Specific category
$id = $app->input->get('id', 0, 'int');
// Params
$categories = $params->get( 'feed_cat_ids', '' );
$ordering = $params->get( 'feed_img_ordering', 6 );
$imgCount = $params->get( 'feed_img_count', 5 );
$feedTitle = $params->get( 'feed_title', Text::_('COM_PHOCAGALLERY_GALLERY') );
$t['picasa_correct_width_m'] = (int)$params->get( 'medium_image_width', 256 );
$t['picasa_correct_height_m'] = (int)$params->get( 'medium_image_height', 192 );
$document->setTitle($this->escape( html_entity_decode($feedTitle)));
if($id > 0) {
$wheres[] = ' c.id ='.(int)$id;
} else {
if (count($categories) > 1) {
\Joomla\Utilities\ArrayHelper::toInteger($categories);
$categoriesString = implode(',', $categories);
$wheres[] = ' c.id IN ( '.$categoriesString.' ) ';
} else if ((int)$categories > 0) {
$wheres[] = ' c.id IN ( '.$categories.' ) ';
}
}
$imageOrdering = PhocaGalleryOrdering::getOrderingString($ordering, 6);
$wheres[] = ' a.published = 1';
$wheres[] = ' a.approved = 1';
$wheres[] = ' c.published = 1';
$wheres[] = ' c.approved = 1';
$wheres[] = ' c.access IN ('.$userLevels.')';
$u = " (c.accessuserid LIKE '%0%' OR c.accessuserid LIKE '%-1%' OR c.accessuserid LIKE '%,".(int)$user->id."' OR c.accessuserid LIKE '".(int)$user->id.",%' OR c.accessuserid LIKE '%,".(int)$user->id.",%' OR c.accessuserid =".(int)$user->id.") ";
$e = 'c.accessuserid IS NULL';
$wheres[] = ' CASE WHEN c.accessuserid IS NOT NULL THEN '.$u.' ELSE '.$e.' END';
$query = 'SELECT a.*, c.alias as catalias, c.title as categorytitle'
.' FROM #__phocagallery AS a'
.' LEFT JOIN #__phocagallery_categories AS c ON a.catid = c.id'
. ' WHERE ' . implode( ' AND ', $wheres )
.$imageOrdering['output'];
$db->setQuery( $query , 0, $imgCount );
$images = $db->loadObjectList( );
foreach ($images as $keyI => $value) {
$item = new FeedItem();
$title = $this->escape( $value->title );
$title = html_entity_decode( $title );
$item->title = $title;
$link = PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias);
$item->link = Route::_($link);
// imgDate
$imgDate = '';
$imgDate = HTMLHelper::Date($value->date, "Y-m-d h:m:s");
if ($imgDate != '') {
$item->date = $imgDate;
}
$item->description = '';
if ($value->description != '') {
$item->description .= '<div>'.$value->description.'</div>';
}
$extImage = false;
if (isset($value->extid)) {
$extImage = PhocaGalleryImage::isExtImage($value->extid);
}
// Trying to fix but in Joomla! method $this->_relToAbs - it cannot work with JRoute links :-(
$itemL = str_replace(Uri::base(true), '', $item->link);
if (substr($itemL, 0, 1) == '/') {
$itemL = substr_replace($itemL, '', 0, 1);
}
$itemL = Uri::base().$itemL;
// Should really not happen
$itemLTmp = str_replace('http://', '', $itemL);
$pos = stripos($itemLTmp, '//');
if ($pos !== false) {
$itemLTmp = str_replace('//', '/', $itemLTmp);
$itemL = 'http://'.$itemLTmp;
}
// - - - - - - - - - - -
if ($extImage) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($value->extw, $value->exth, $t['picasa_correct_width_m'], $t['picasa_correct_height_m']);
$imgLink = $value->extm;
//$i = '<div><a href="'.JRoute::_($link).'"><img src="'.$imgLink .'" border="0" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" /></a></div>';
$i = '<div><a href="'.$itemL.'"><img src="'.$imgLink .'" border="0" /></a></div>';
} else {
$imgLink = PhocaGalleryImageFront::displayCategoryImageOrNoImage($value->filename, 'medium');
$i = '<div><a href="'.$itemL.'"><img src="'. /*JUri::base(true) .*/ $imgLink.'" border="0" /></a></div>';
}
$item->description .= $i;
$item->category = $value->categorytitle;
/*if ($value->author != '') {
$item->author = $value->author;
}*/
$document->addItem( $item );
}
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1,187 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
if ($this->t['backbutton'] != '' && $this->t['enable_multibox_iframe'] != 1) {
echo $this->t['backbutton'];
}
echo '<div id="phocagallery-comments">';
if (($this->t['detailwindow'] == 7 || $this->t['display_comment_nopup'] == 1) && $this->t['enable_multibox_iframe'] != 1) {
echo '<div id="image-box" style="text-align:center">'.$this->item->linkimage.'</div>';
}
if ($this->t['externalcommentsystem'] == 1) {
if (ComponentHelper::isEnabled('com_jcomments', true)) {
include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php');
echo JComments::showComments($this->item->id, 'com_phocagallery_images', Text::_('COM_PHOCAGALLERY_IMAGE') .' '. $this->item->title);
}
} else if($this->t['externalcommentsystem'] == 2) {
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$getParamsArray = explode(',', 'start,limitstart,template,fb_comment_id,tmpl');
if (!empty($getParamsArray) ) {
foreach($getParamsArray as $key => $value) {
$uri->delVar($value);
}
}
echo '<div style="margin:10px">';
if ($this->t['fb_comment_app_id'] == '') {
echo Text::_('COM_PHOCAGALLERY_ERROR_FB_APP_ID_EMPTY');
} else {
$cCount = '';
if ((int)$this->t['fb_comment_count'] > 0) {
$cCount = 'numposts="'.$this->t['fb_comment_count'].'"';
}
?><fb:comments href="<?php echo $uri->toString(); ?>" simple="1" <?php echo $cCount;?> width="<?php echo (int)$this->t['fb_comment_width'] ?>"></fb:comments>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $this->t['fb_comment_app_id'] ?>',
status: true,
cookie: true,
xfbml: true
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/<?php echo $this->t['fb_comment_lang']; ?>/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<?php
echo '</div>';
}
} else {
if (!empty($this->t['commentitem'])){
//$userImage = JHtml::_( 'image', 'media/com_phocagallery/images/icon-user.png', '');
$userImage = PhocaGalleryRenderFront::renderIcon('user', 'media/com_phocagallery/images/icon-user.png', '');
$smileys = PhocaGalleryComment::getSmileys();
foreach ($this->t['commentitem'] as $itemValue) {
$date = HTMLHelper::_('date', $itemValue->date, Text::_('DATE_FORMAT_LC2') );
$comment = $itemValue->comment;
$comment = PhocaGalleryComment::bbCodeReplace($comment);
foreach ($smileys as $smileyKey => $smileyValue) {
$comment = str_replace($smileyKey, HTMLHelper::_( 'image', 'media/com_phocagallery/images/'.$smileyValue .'.png',''), $comment);
}
echo '<blockquote><h4>'.$userImage.'&nbsp;'.$itemValue->name.'</h4>'
.'<p><strong>'.PhocaGalleryText::wordDelete($itemValue->title, 50, '...').'</strong></p>'
.'<p style="overflow:auto;width:'.$this->t['commentwidth'].'px;">'.$comment.'</p>'
.'<p style="text-align:right"><small>'.$date.'</small></p></blockquote>';
}
}
echo '<h4>'.Text::_('COM_PHOCAGALLERY_ADD_COMMENT').'</h4>';
if ($this->t['already_commented']) {
echo '<p>'.Text::_('COM_PHOCAGALLERY_COMMENT_ALREADY_SUBMITTED').'</p>';
} else if ($this->t['not_registered']) {
echo '<p>'.Text::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_SUBMIT_COMMENT').'</p>';
} else {
echo '<form action="'.htmlspecialchars($this->t['action']).'" name="phocagallerycommentsform" id="phocagallery-comments-form" method="post" >'
.'<table>'
.'<tr>'
.'<td>'.Text::_('COM_PHOCAGALLERY_NAME').':</td>'
.'<td>'.$this->t['name'].'</td>'
.'</tr>';
echo '<tr>'
.'<td>'.Text::_('COM_PHOCAGALLERY_TITLE').':</td>'
.'<td><input type="text" name="phocagallerycommentstitle" id="phocagallery-comments-title" value="" maxlength="255" class="comment-input" /></td>'
.'</tr>';
echo '<tr>'
.'<td>&nbsp;</td>'
.'<td>'
.'<a href="#" onclick="pgPasteTag(\'b\', true); return false;">'
. PhocaGalleryRenderFront::renderIcon('bold', $this->t['icon_path'].'icon-b.png', Text::_('COM_PHOCAGALLERY_BOLD'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteTag(\'i\', true); return false;">'
. PhocaGalleryRenderFront::renderIcon('italic', $this->t['icon_path'].'icon-i.png', Text::_('COM_PHOCAGALLERY_ITALIC'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteTag(\'u\', true); return false;">'
. PhocaGalleryRenderFront::renderIcon('underline', $this->t['icon_path'].'icon-u.png', Text::_('COM_PHOCAGALLERY_UNDERLINE'))
.'</a>&nbsp;&nbsp;'
.'<a href="#" onclick="pgPasteSmiley(\':)\'); return false;">'
. PhocaGalleryRenderFront::renderIcon('smile', $this->t['icon_path'].'icon-s-smile.png', Text::_('COM_PHOCAGALLERY_SMILE'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteSmiley(\':lol:\'); return false;">'
. PhocaGalleryRenderFront::renderIcon('lol', $this->t['icon_path'].'icon-s-lol.png', Text::_('COM_PHOCAGALLERY_LOL'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteSmiley(\':(\'); return false;">'
. PhocaGalleryRenderFront::renderIcon('sad', $this->t['icon_path'].'icon-s-sad.png', Text::_('COM_PHOCAGALLERY_SAD'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteSmiley(\':?\'); return false;">'
. PhocaGalleryRenderFront::renderIcon('confused', $this->t['icon_path'].'icon-s-confused.png', Text::_('COM_PHOCAGALLERY_CONFUSED'))
.'</a>&nbsp;'
.'<a href="#" onclick="pgPasteSmiley(\':wink:\'); return false;">'
. PhocaGalleryRenderFront::renderIcon('wink', $this->t['icon_path'].'icon-s-wink.png', Text::_('COM_PHOCAGALLERY_WINK'))
.'</a>&nbsp;'
.'</td>'
.'</tr>';
echo '<tr>'
.'<td>&nbsp;</td>'
.'<td>'
.'<textarea name="phocagallerycommentseditor" id="phocagallery-comments-editor" cols="30" rows="10" class= "comment-input" onkeyup="countChars();" ></textarea>'
.'</td>'
.'</tr>';
echo '<tr>'
.'<td>&nbsp;</td>'
.'<td>'
. Text::_('COM_PHOCAGALLERY_CHARACTERS_WRITTEN').' <input name="phocagallerycommentscountin" value="0" readonly="readonly" class="comment-input2" /> '
. Text::_('COM_PHOCAGALLERY_AND_LEFT_FOR_COMMENT').' <input name="phocagallerycommentscountleft" value="'. $this->t['maxcommentchar'].'" readonly="readonly" class="comment-input2" />'
.'</td>'
.'</tr>';
echo '<tr>'
.'<td>&nbsp;</td>'
.'<td align="right">'
.'<input type="submit" class="btn" id="phocagallerycommentssubmit" onclick="return(checkCommentsForm());" value="'. Text::_('COM_PHOCAGALLERY_SUBMIT_COMMENT').'"/>'
.'</td>'
.'</tr>';
echo '</table>';
echo '<input type="hidden" name="task" value="comment" />';
echo '<input type="hidden" name="view" value="comment" />';
echo '<input type="hidden" name="controller" value="comment" />';
echo '<input type="hidden" name="id" value="'. $this->t['id'].'" />';
echo '<input type="hidden" name="catid" value="'. $this->t['catid'].'" />';
echo '<input type="hidden" name="Itemid" value="'. $this->itemId .'" />';
echo HTMLHelper::_( 'form.token' );
echo '</form>';
}
}
echo '</div>';
if ($this->t['detailwindow'] == 7 || $this->t['display_comment_nopup'] == 1) {
echo PhocaGalleryUtils::getExtInfo();
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,300 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\Factory;
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
jimport( 'joomla.application.component.view');
phocagalleryimport('phocagallery.comment.comment');
phocagalleryimport('phocagallery.comment.commentimage');
phocagalleryimport( 'phocagallery.picasa.picasa');
phocagalleryimport( 'phocagallery.facebook.fbsystem');
class PhocaGalleryViewComment extends HtmlView
{
public $t;
protected $params;
function display($tpl = null) {
$app = Factory::getApplication();
$document = Factory::getDocument();
$this->params = $app->getParams();
$user = Factory::getUser();
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$this->itemId = $app->input->get('Itemid', 0, 'int');
$this->t['icon_path'] = 'media/com_phocagallery/images/';
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
$access = PhocaGalleryAccess::isAccess($user->getAuthorisedViewLevels(), $neededAccessLevels);
// PLUGIN WINDOW - we get information from plugin
$get = array();
$get['comment'] = $app->input->get( 'comment', '', 'string' );
$this->t['id'] = $app->input->get('id', 0, 'int');
$this->t['catid'] = $app->input->get('catid', '', 'string');
$this->t['maxcommentchar'] = $this->params->get( 'max_comment_char', 1000 );
$this->t['displaycommentimg'] = $this->params->get( 'display_comment_img', 0 );
$this->t['detailwindowbackgroundcolor']= $this->params->get( 'detail_window_background_color', '#ffffff' );
$this->t['commentwidth'] = $this->params->get( 'comment_width', 500 );
$this->t['enable_multibox'] = $this->params->get( 'enable_multibox', 0);
$this->t['multibox_comments_width'] = $this->params->get( 'multibox_comments_width', 300 );
$this->t['externalcommentsystem'] = $this->params->get( 'external_comment_system', 0 );
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$this->t['altvalue'] = $this->params->get( 'alt_value', 1 );
$this->t['largewidth'] = $this->params->get( 'large_image_width', 640 );
$this->t['largeheight'] = $this->params->get( 'large_image_height', 480 );
$this->t['picasa_correct_width_l'] = (int)$this->params->get( 'large_image_width', 640 );
$this->t['picasa_correct_height_l'] = (int)$this->params->get( 'large_image_height', 480 );
$paramsFb = [];//PhocaGalleryFbSystem::getCommentsParams($this->params->get( 'fb_comment_user_id', ''));// Facebook
$this->t['fb_comment_app_id'] = isset($paramsFb['fb_comment_app_id']) ? $paramsFb['fb_comment_app_id'] : '';
$this->t['fb_comment_width'] = isset($paramsFb['fb_comment_width']) ? $paramsFb['fb_comment_width'] : 550;
$this->t['fb_comment_lang'] = isset($paramsFb['fb_comment_lang']) ? $paramsFb['fb_comment_lang'] : 'en_US';
$this->t['fb_comment_count'] = isset($paramsFb['fb_comment_count']) ? $paramsFb['fb_comment_count'] : '';
$this->t['display_comment_nopup'] = $this->params->get( 'display_comment_nopup', 0);
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
// Multibox
if ($this->t['enable_multibox'] == 1) {
$this->t['commentwidth'] = (int)$this->t['multibox_comments_width'] - 70;//padding - margin
}
$get['commentsi'] = $app->input->get( 'commentsi', '', 'int' );
$this->t['enable_multibox_iframe'] = 0;
if ($get['commentsi'] == 1) {
// Seems we are in iframe
$this->t['enable_multibox_iframe'] = 1;
}
// CSS
PhocaGalleryRenderFront::renderAllCSS();
if ($this->t['gallerymetakey'] != '') {
$document->setMetaData('keywords', $this->t['gallerymetakey']);
}
if ($this->t['gallerymetadesc'] != '') {
$document->setMetaData('description', $this->t['gallerymetadesc']);
}
// PARAMS - Open window parameters - modal popup box or standard popup window
$detail_window = $this->params->get( 'detail_window', 0 );
// Plugin information
if (isset($get['comment']) && $get['comment'] != '') {
$detail_window = $get['comment'];
}
// Only registered (VOTES + COMMENTS)
$this->t['not_registered'] = true;
$this->t['name'] = '';
if ($access) {
$this->t['not_registered'] = false;
$this->t['name'] = $user->name;
}
//$document->addScript(JUri::base(true).'/media/com_phocagallery/js/comments.js');
//$document->addCustomTag(PhocaGalleryRenderFront::renderCommentJS((int)$this->t['maxcommentchar']));
$this->t['already_commented'] = PhocaGalleryCommentImage::checkUserComment( (int)$this->t['id'], (int)$user->id );
$this->t['commentitem'] = PhocaGalleryCommentImage::displayComment( (int)$this->t['id'] );
// PARAMS - Display Description in Detail window - set the font color
$this->t['detailwindowbackgroundcolor'] = $this->params->get( 'detail_window_background_color', '#ffffff' );
$this->t['detailwindow'] = $this->params->get( 'detail_window', 0 );
$description_lightbox_font_color = $this->params->get( 'description_lightbox_font_color', '#ffffff' );
$description_lightbox_bg_color = $this->params->get( 'description_lightbox_bg_color', '#000000' );
$description_lightbox_font_size = $this->params->get( 'description_lightbox_font_size', 12 );
// NO SCROLLBAR IN DETAIL WINDOW
$document->addCustomTag( "<style type=\"text/css\"> \n"
." html,body, .contentpane{background:".$this->t['detailwindowbackgroundcolor'].";text-align:left;} \n"
." center, table {background:".$this->t['detailwindowbackgroundcolor'].";} \n"
." #sbox-window {background-color:#fff;padding:5px} \n"
." </style> \n");
$model = $this->getModel();
$this->item = $model->getData();
$this->t['imgtitle'] = $this->item->title;
// Back button
$this->t['backbutton'] = '';
if ($this->t['detailwindow'] == 7 || $this->t['display_comment_nopup']) {
// Display Image
// Access check - don't display the image if you have no access to this image (if user add own url)
// USER RIGHT - ACCESS - - - - - - - - - -
$rightDisplay = 0;
if (!empty($this->item)) {
$rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $this->item->cataccessuserid, $this->item->cataccess, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
}
if ($rightDisplay == 0) {
$this->t['pl'] = 'index.php?option=com_users&view=login&return='.base64_encode($uri->toString());
$app->enqueueMessage(Text::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'), 'error');
$app->redirect(Route::_($this->t['pl'], false));
exit;
}
// - - - - - - - - - - - - - - - - - - - -
phocagalleryimport('phocagallery.image.image');
$this->t['backbutton'] = '<div><a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $this->t['catid'].'&Itemid='. $this->itemId).'"'
.' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">'
. PhocaGalleryRenderFront::renderIcon('icon-up-images', 'media/com_phocagallery/images/icon-up-images.png', Text::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY'), 'ph-icon-up-images ph-icon-button').'</a></div>';
// Get file thumbnail or No Image
$this->item->filenameno = $this->item->filename;
$this->item->filename = PhocaGalleryFile::getTitleFromFile($this->item->filename, 1);
$this->item->filesize = PhocaGalleryFile::getFileSize($this->item->filenameno);
$altValue = PhocaGalleryRenderFront::getAltValue($this->t['altvalue'], $this->item->title, $this->item->description, $this->item->metadesc);
$this->item->altvalue = $altValue;
$realImageSize = '';
$extImage = PhocaGalleryImage::isExtImage($this->item->extid);
if ($extImage) {
$this->item->extl = $this->item->extl;
$this->item->exto = $this->item->exto;
$realImageSize = PhocaGalleryImage::getRealImageSize($this->item->extl, '', 1);
$this->item->imagesize = PhocaGalleryImage::getImageSize($this->item->exto, 1, 1);
if ($this->item->extw != '') {
$extw = explode(',',$this->item->extw);
$this->item->extw = $extw[0];
}
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($this->item->extw, $this->item->exth, $this->t['picasa_correct_width_l'], $this->t['picasa_correct_height_l']);
$this->item->linkimage = HTMLHelper::_( 'image', $this->item->extl, $this->item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
$this->item->realimagewidth = $correctImageRes['width'];
$this->item->realimageheight = $correctImageRes['height'];
} else {
$this->item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($this->item->filenameno, 'large');
$this->item->linkimage = HTMLHelper::_( 'image', $this->item->linkthumbnailpath, $this->item->altvalue);
$realImageSize = PhocaGalleryImage::getRealImageSize ($this->item->filenameno);
$this->item->imagesize = PhocaGalleryImage::getImageSize($this->item->filenameno, 1);
if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
$this->item->realimagewidth = $realImageSize['w'];
$this->item->realimageheight = $realImageSize['h'];
} else {
$this->item->realimagewidth = $this->t['largewidth'];
$this->item->realimageheight = $this->t['largeheight'];
}
}
}
// ACTION
$this->t['action'] = $uri->toString();
$this->_prepareDocument();
parent::display($tpl);
}
protected function _prepareDocument() {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
//$this->params = $app->getParams();
$title = null;
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
if (isset($this->item->title) && $this->item->title != '') {
$title = $title .' - ' . $this->item->title;
}
} else if ($app->get('sitename_pagetitles', 0) == 2) {
if (isset($this->item->title) && $this->item->title != '') {
$title = $title .' - ' . $this->item->title;
}
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
if ($this->item->metadesc != '') {
$this->document->setDescription($this->item->metadesc);
} else if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
if ($this->item->metakey != '') {
$this->document->setMetadata('keywords', $this->item->metakey);
} else if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
/*if ($app->get('MetaAuthor') == '1') {
$this->document->setMetaData('author', $this->item->author);
}
/*$mdata = $this->item->metadata->toArray();
foreach ($mdata as $k => $v) {
if ($v) {
$this->document->setMetadata($k, $v);
}
}*/
// Breadcrumbs TO DO (Add the whole tree)
/*if (isset($this->category[0]->parentid)) {
if ($this->category[0]->parentid == 1) {
} else if ($this->category[0]->parentid > 0) {
$pathway->addItem($this->category[0]->parenttitle, Route::_(PhocaDocumentationHelperRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
}
}
if (!empty($this->category[0]->title)) {
$pathway->addItem($this->category[0]->title);
}*/
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1,11 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access'); ?>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
</metadata>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,163 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Uri\Uri;
jimport( 'joomla.application.component.view');
phocagalleryimport('phocagallery.comment.comment');
phocagalleryimport('phocagallery.comment.commentimage');
jimport( 'joomla.filesystem.file' );
jimport( 'joomla.filesystem.folder' );
class PhocaGalleryViewCommentImgA extends HtmlView
{
function display($tpl = null){
if (!Session::checkToken('request')) {
$response = array(
'status' => '0',
'error' => Text::_('JINVALID_TOKEN')
);
echo json_encode($response);
return;
}
$app = Factory::getApplication();
$params = $app->getParams();
$commentValue = $app->input->get( 'commentValue', '', 'string' );
$commentId = $app->input->get( 'commentId', 0, 'int' );// ID of File
$format = $app->input->get( 'format', '', 'string' );
$task = $app->input->get( 'task', '', 'string' );
$view = $app->input->get( 'view', '', 'string' );
$paramsC = ComponentHelper::getParams('com_phocagallery');
$param['display_comment_img'] = $paramsC->get( 'display_comment_img', 0 );
if ($task == 'refreshcomment' && ((int)$param['display_comment_img'] == 2 || (int)$param['display_comment_img'] == 3)) {
$user = Factory::getUser();
//$view = J Request::get Var( 'view', '', 'get', '', J REQUEST_NOTRIM );
//$Itemid = J Request::get Var( 'Itemid', 0, '', 'int');
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
$access = PhocaGalleryAccess::isAccess($user->getAuthorisedViewLevels(), $neededAccessLevels);
$post['imgid'] = (int)$commentId;
$post['userid'] = $user->id;
$post['comment'] = strip_tags($commentValue);
if ($format != 'json') {
$msg = Text::_('COM_PHOCAGALLERY_ERROR_WRONG_COMMENT') ;
$response = array(
'status' => '0',
'error' => $msg);
echo json_encode($response);
return;
}
if ((int)$post['imgid'] < 1) {
$msg = Text::_('COM_PHOCAGALLERY_ERROR_IMAGE_NOT_EXISTS');
$response = array(
'status' => '0',
'error' => $msg);
echo json_encode($response);
return;
}
$model = $this->getModel();
$checkUserComment = PhocaGalleryCommentImage::checkUserComment( $post['imgid'], $post['userid'] );
// User has already commented this category
if ($checkUserComment) {
$msg = Text::_('COM_PHOCAGALLERY_COMMENT_ALREADY_SUBMITTED');
$response = array(
'status' => '0',
'error' => '',
'message' => $msg);
echo json_encode($response);
return;
} else {
if ($access > 0 && $user->id > 0) {
if(!$model->comment($post)) {
$msg = Text::_('COM_PHOCAGALLERY_ERROR_COMMENTING_IMAGE');
$response = array(
'status' => '0',
'error' => $msg);
echo json_encode($response);
return;
} else {
$o = '<div class="pg-cv-comment-img-box-item">';
$o .= '<div class="pg-cv-comment-img-box-avatar">';
$avatar = PhocaGalleryCommentImage::getUserAvatar($user->id);
$this->t['path'] = PhocaGalleryPath::getPath();
$img = '<div style="width: 20px; height: 20px;">&nbsp;</div>';
if (isset($avatar->avatar) && $avatar->avatar != '') {
$pathAvatarAbs = $this->t['path']->avatar_abs .'thumbs/phoca_thumb_s_'. $avatar->avatar;
$pathAvatarRel = $this->t['path']->avatar_rel . 'thumbs/phoca_thumb_s_'. $avatar->avatar;
if (File::exists($pathAvatarAbs)){
$avSize = getimagesize($pathAvatarAbs);
$avRatio = $avSize[0]/$avSize[1];
$avHeight = 20;
$avWidth = 20 * $avRatio;
$img = '<img src="'.Uri::base().'/'.$pathAvatarRel.'" width="'.$avWidth.'" height="'.$avHeight.'" alt="" />';
}
}
$o .= $img;
$o .= '</div>';
$o .= '<div class="pg-cv-comment-img-box-comment">'.$user->name.': '.$post['comment'].'</div>';
$o .= '<div style="clear:both"></div>';
$o .= '</div>';
$msg = $o . '<br />' . Text::_('COM_PHOCAGALLERY_SUCCESS_COMMENT_SUBMIT');
$response = array(
'status' => '1',
'error' => '',
'message' => $msg);
echo json_encode($response);
return;
}
} else {
$msg = Text::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION');
$response = array(
'status' => '0',
'error' => $msg);
echo json_encode($response);
return;
}
}
} else {
$msg = Text::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION');
$response = array(
'status' => '0',
'error' => $msg);
echo json_encode($response);
return;
}
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>
<!--<metadata>
<view title="_COM_PHOCAGALLERY_COOLIRS_3D_WALL_GROUP">
<message>
<![CDATA[_COM_PHOCAGALLERY_COOLIRS_3D_WALL_GROUP_DESC]]>
</message>
</view>
</metadata>-->

View File

@ -0,0 +1,74 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
if ($this->t['display_category'] == 0) {
echo Text::_('COM_PHOCAGALLERY_CATEGORY was not selected in parameters');
} else {
echo '<div id="phocagallery" class="pg-cooliris3dwall-view-view'.$this->params->get( 'pageclass_sfx' ).'">'. "\n";
// Heading
$heading = '';
if ($this->params->get( 'page_title' ) != '') {
$heading .= $this->params->get( 'page_title' );
}
if ( $this->t['displaycatnametitle'] == 1) {
if ($this->category->title != '') {
if ($heading != '') {
$heading .= ' - ';
}
$heading .= $this->category->title;
}
}
// Pagetitle
if ($this->t['showpageheading'] != 0) {
if ( $heading != '') {
echo '<h1>'. $this->escape($heading) . '</h1>';
}
}
// Category Description
if ( $this->category->description != '' ) {
echo '<div class="pg-cooliris3dwall-view-desc'.$this->params->get( 'pageclass_sfx' ).'">';
echo $this->category->description.'</div>'. "\n";
}
?>
<object id="o"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="<?php echo $this->t['cooliris3d_wall_width'];?>"
height="<?php echo $this->t['cooliris3d_wall_height'];?>">
<param name="movie"
value="http://apps.cooliris.com/embed/cooliris.swf" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="transparent" />
<param name="flashvars"
value="feed=<?php echo Uri::root() . $this->t['path']->image_rel . (int)$this->category->id;?>.rss" />
<embed type="application/x-shockwave-flash"
src="http://apps.cooliris.com/embed/cooliris.swf"
flashvars="feed=<?php echo Uri::root() . $this->t['path']->image_rel . (int)$this->category->id;?>.rss"
width="<?php echo $this->t['cooliris3d_wall_width'];?>"
height="<?php echo $this->t['cooliris3d_wall_height'];?>"
allowFullScreen="true"
allowScriptAccess="always"
wmode="transparent" >
</embed>
</object>
<?php
}
echo '<div>&nbsp;</div>';
echo PhocaGalleryUtils::getExtInfo();
echo '</div>';
?>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_PHOCAGALLERY_COOLIRIS_3D_WALL_LAYOUT">
<message>
<![CDATA[COM_PHOCAGALLERY_COOLIRIS_3D_WALL_LAYOUT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request" addfieldpath="/administrator/components/com_phocagallery/models/fields">
<field name="id" type="phocagallerycategory" section="com_phocagallery" default="0" label="Select Category" description="A Phoca gallery category" required="true" />
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic" addfieldpath="/administrator/components/com_phocagallery/models/fields" >
<field name="cooliris3d_wall_width" default="600" size="10" type="text" label="Cooliris 3D Wall Width" description="Cooliris 3D Wall Width DESC" />
<field name="cooliris3d_wall_height" default="370" size="10" type="text" label="Cooliris 3D Wall Height" description="Cooliris 3D Wall Height DESC" />
<field name="display_cat_name_title" type="list" default="1" label="Display Category Name in Page Title" description="Display Category Name in Page Title DESC">
<option value="0">Hide</option>
<option value="1">Show</option>
</field>
<field name="display_cat_name_breadcrumbs" type="list" default="0" label="Display Category Name in Breadcrumbs" description="Display Category Name in Breadcrumbs DESC">
<option value="0">Menu Item Title</option>
<option value="1">Menu Item Title - Category Title</option>
<option value="2">Category Title</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,178 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined( '_JEXEC' ) or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
jimport( 'joomla.application.component.view' );
class PhocaGalleryViewCooliris3DWall extends HtmlView
{
public $t;
protected $params;
function display($tpl = null) {
$app = Factory::getApplication();
$document = Factory::getDocument();
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$menus = $app->getMenu();
$menu = $menus->getActive();
$this->params = $app->getParams();
$this->t['path'] = PhocaGalleryPath::getPath();
$model = $this->getModel();
// PARAMS
$this->t['displaycatnametitle'] = $this->params->get( 'display_cat_name_title', 1 );
$display_cat_name_breadcrumbs = $this->params->get( 'display_cat_name_breadcrumbs', 1 );
$this->t['showpageheading'] = $this->params->get( 'show_page_heading', 1 );
$this->t['cooliris3d_wall_width'] = $this->params->get( 'cooliris3d_wall_width', 600 );
$this->t['cooliris3d_wall_height'] = $this->params->get( 'cooliris3d_wall_height', 370 );
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
$idCategory = $app->input->get('id', 0, 'int');
// CSS
HTMLHelper::stylesheet('media/com_phocagallery/css/phocagallery.css' );
if ($this->t['enablecustomcss'] == 1) {
HTMLHelper::stylesheet('media/com_phocagallery/css/phocagallerycustom.css' );
PhocaGalleryRenderFront::displayCustomCSS($this->t['customcss']);
}
if ((int)$idCategory > 0) {
$category = $model->getCategory($idCategory);
$this->_prepareDocument($category);
// Define image tag attributes
/*if (!empty ($category->image)) {
$attribs['align'] = '"'.$category->image_position.'"';
$attribs['hspace'] = '"6"';
$this->t['image'] = HTMLHelper::_('image', 'images/stories/'.$category->image, '', $attribs);
}*/
$this->_addBreadCrumbs($category, isset($menu->query['id']) ? $menu->query['id'] : 0, $display_cat_name_breadcrumbs);
// ASIGN
$this->t['display_category'] = 1;
$this->tmpl = $this->t;
$this->category = $category;
//$this->params = $this->params;
} else {
$this->t['display_category'] = 0;
$this->tmpl = $this->t;
}
parent::display($tpl);
}
protected function _prepareDocument($category) {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
//$this->params = $app->getParams();
$title = null;
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$this->t['displaycatnametitle'] = $this->params->get( 'display_cat_name_title', 1 );
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
if ($this->t['display_cat_name_title'] == 1 && isset($this->category->title) && $this->category->title != '') {
$title = $title .' - ' . $this->category->title;
}
} else if ($app->get('sitename_pagetitles', 0) == 2) {
if ($this->t['display_cat_name_title'] == 1 && isset($this->category->title) && $this->category->title != '') {
$title = $title .' - ' . $this->category->title;
}
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
if ($category->metadesc != '') {
$this->document->setDescription($category->metadesc);
} else if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
if ($category->metakey != '') {
$this->document->setMetadata('keywords', $category->metakey);
} else if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
/*if ($app->get('MetaAuthor') == '1') {
$this->document->setMetaData('author', $this->item->author);
}
/*$mdata = $this->item->metadata->toArray();
foreach ($mdata as $k => $v) {
if ($v) {
$this->document->setMetadata($k, $v);
}
}*/
}
/**
* Method to add Breadcrubms in Phoca Gallery
* @param array $category Object array of Category
* @param int $rootId Id of Root Category
* @param int $displayStyle Displaying of Breadcrubm - Nothing, Category Name, Menu link with Name
* @return string Breadcrumbs
*/
function _addBreadCrumbs($category, $rootId, $displayStyle) {
$app = Factory::getApplication();
$pathway = $app->getPathway();
$pathWayItems = $pathway->getPathWay();
$lastItemIndex = count($pathWayItems) - 1;
switch ($displayStyle) {
case 0: // 0 - only menu link
// do nothing
break;
case 1: // 1 - menu link with category name
// replace the last item in the breadcrumb (menu link title) with the current value plus the category title
$pathway->setItemName($lastItemIndex, $pathWayItems[$lastItemIndex]->name . ' - ' . $category->title);
break;
case 2: // 2 - only category name
// replace the last item in the breadcrumb (menu link title) with the category title
$pathway->setItemName($lastItemIndex, $category->title);
break;
}
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1,167 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Component\ComponentHelper;
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
$layoutC = new FileLayout('comments', null, array('component' => 'com_phocagallery'));
// SVG Definitions
$d = array();
echo $layoutSVG->render($d);
echo '<div id="phocagallery" class="pg-detail-item-box'.$this->params->get( 'pageclass_sfx' ).'">';
// Bootstrap Modal Popup - change dynamically the title in Bootstrap Modal Header (it is not reloaded when image is reloaded inside the iframe so we need to change it with help of JS - see
// main.js pgFrameOnLoad()
// pgFrameOnLoad() in iframe components/com_phocagallery/layouts/category_modal.php
if ($this->t['detailwindow'] == 0) {
echo '<div id="pgDetailTitle" data-title="' . $this->item->title . '" style="display:none"></div>';
}
if ($this->t['detailwindow'] == 7) {
echo '<div class="pg-detail-top-box-back-title">';
echo '<a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $this->item->catslug.'&Itemid='. $this->itemId).'"';
echo ' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">';
echo '<svg class="ph-si ph-si-detail-top-back"><use xlink:href="#ph-si-back"></use></svg>';
echo '</a></div>';
}
switch ($this->t['detailwindow']) {
case 4:
case 7:
case 9:
case 10:
case 11:
$closeImage = $this->item->linkimage;
$closeButton = '';
break;
default:
$closeButton = str_replace("%onclickclose%", $this->t['detailwindowclose'], $this->item->closebutton);
$closeImage = '<a href="#" onclick="'.$this->t['detailwindowclose'].'" style="margin:auto;padding:0">'.$this->item->linkimage.'</a>';
break;
}
$classSuffix = ' popup';
if ($this->t['detailwindow'] == 7) {
$classSuffix = ' no-popup';
}
/*
echo '<div class="ph-mc" style="padding-top:10px">'
.'<table border="0" class="ph-w100 ph-mc" cellpadding="0" cellspacing="0">'
.'<tr>'
.'<td colspan="6" align="center" valign="middle"'
.' style="'.$iH.'vertical-align: middle;" >'
.'<div id="phocaGalleryImageBox" style="'.$iW.'margin: auto;padding: 0;">'
.$closeImage;
*/
echo '<div class="pg-detail-item-image-box">'.$closeImage.'</div>';
$titleDesc = '';
if ($this->t['display_title_description'] == 1) {
$titleDesc .= $this->item->title;
if ($this->item->description != '' && $titleDesc != '') {
$titleDesc .= ' - ';
}
}
// Lightbox Description
if ($this->t['displaydescriptiondetail'] == 2 && (!empty($this->item->description) || !empty($titleDesc))){
echo '<div class="pg-detail-item-desc-box">' .(HTMLHelper::_('content.prepare', $titleDesc . $this->item->description, 'com_phocagallery.item')).'</div>';
}
/*
if ($this->t['detailbuttons'] == 1){
echo '<div class="pg-detail-item-button-box">'
.'<td align="left" width="30%" style="padding-left:48px">'.$this->item->prevbutton.'</td>'
.'<td align="center">'.$this->item->slideshowbutton.'</td>'
.'<td align="center">'.str_replace("%onclickreload%", $this->t['detailwindowreload'], $this->item->reloadbutton).'</td>'
. $closeButton
//.'<td align="right" width="30%" style="padding-right:48px">'.$this->item->nextbutton.'</td>'
.'</div>';
}
*/
if ((isset($this->itemnext[0]) && $this->itemnext[0]) || (isset($this->itemprev[0]) && $this->itemprev[0])) {
$suffix = '';
if ($this->t['tmpl'] == 'component') {
$suffix = 'tmpl=component';
}
echo '<div class="pg-detail-nav-box">';
if(isset($this->itemprev[0]) && $this->itemprev[0]) {
$p = $this->itemprev[0];
$linkPrev = Route::_(PhocaGalleryRoute::getImageRoute($p->id, $p->catid, $p->alias, $p->categoryalias, 'detail', $suffix));
echo '<div class="ph-left"><a href="'.$linkPrev.'" class="btn btn-primary ph-image-navigation" role="button"><svg class="ph-si ph-si-prev-btn"><use xlink:href="#ph-si-prev"></use></svg> '.Text::_('COM_PHOCAGALLERY_PREVIOUS').'</a></div>';
}
if(isset($this->itemnext[0]) && $this->itemnext[0]) {
$n = $this->itemnext[0];
$linkNext = Route::_(PhocaGalleryRoute::getImageRoute($n->id, $n->catid, $n->alias, $n->categoryalias, 'detail', $suffix));
echo '<div class="ph-right"><a href="'.$linkNext.'" class="btn btn-primary ph-image-navigation" role="button">'.Text::_('COM_PHOCAGALLERY_NEXT').' <svg class="ph-si ph-si-next-btn"><use xlink:href="#ph-si-next"></use></svg></a></div>';
}
echo '<div class="ph-cb"></div>';
echo '</div>';
}
echo $this->loadTemplate('rating');
// Tags
if ($this->t['displaying_tags_output'] != '') {
echo '<div class="pg-detail-item-tag-box">'.$this->t['displaying_tags_output'].'</div>';
}
if ($this->t['display_comment_img'] == 1 || $this->t['display_comment_img'] == 3 || ($this->t['display_comment_img'] == 2 && $this->t['tmpl'] == 'component')) {
$d = array();
$d['t'] = $this->t;
$d['form']['task'] = 'comment';
$d['form']['view'] = 'detail';
$d['form']['controller'] = 'detail';
$d['form']['tab'] = '';
$d['form']['id'] = $this->item->id;
$d['form']['catid'] = $this->item->catid;
$d['form']['itemid'] = $this->itemId;
echo $layoutC->render($d);
/*if ($this->t['externalcommentsystem'] == 1) {
if (ComponentHelper::isEnabled('com_jcomments', true)) {
include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php');
echo JComments::showComments($this->item->id, 'com_phocagallery_images', Text::_('COM_PHOCAGALLERY_IMAGE') .' '. $this->item->title);
}
} else if ($this->t['externalcommentsystem'] == 2) {
echo $this->loadTemplate('comments-fb');
}*/
echo PhocaGalleryUtils::getExtInfo();
}
echo '</div>';
?>

View File

@ -0,0 +1,53 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?><div id="phocagallery-comments"><?php
//echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;">&nbsp;</div>';//because of IE bug
$uri = \Joomla\CMS\Uri\Uri::getInstance();
$getParamsArray = explode(',', 'start,limitstart,template,fb_comment_id');
if (!empty($getParamsArray) ) {
foreach($getParamsArray as $key => $value) {
$uri->delVar($value);
}
}
if ($this->t['fb_comment_app_id'] == '') {
echo JText::_('COM_PHOCAGALLERY_ERROR_FB_APP_ID_EMPTY');
} else {
$cCount = '';
if ((int)$this->t['fb_comment_count'] > 0) {
$cCount = 'numposts="'.$this->t['fb_comment_count'].'"';
}
?><fb:comments href="<?php echo $uri->toString(); ?>" simple="1" <?php echo $cCount;?> width="<?php echo (int)$this->t['fb_comment_width'] ?>"></fb:comments>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $this->t['fb_comment_app_id'] ?>',
status: true,
cookie: true,
xfbml: true
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/<?php echo $this->t['fb_comment_lang']; ?>/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<?php } ?>
</div>

View File

@ -0,0 +1,76 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
$title = $this->item->filename;
$imgLink = HTMLHelper::_( 'image', 'images/phocagallery/'. $this->item->filenameno, '');
$extImage = PhocaGalleryImage::isExtImage($this->item->extid);
if ($extImage) {
$title = $this->item->title;
$imgLink = HTMLHelper::_( 'image', $this->item->exto, '');
}
if (isset($this->t['backbutton']) && $this->t['backbutton'] != '') {
echo $this->t['backbutton'];
echo '<div id="download-box"><div style="overflow:scroll;width:'.$this->t['boxlargewidth'].'px;height:'.$this->t['boxlargeheight'].'px;margin:0px;padding:0px;">' . $imgLink . '</div>';
echo '<div id="download-box"><div style="overflow:scroll;width:100%;height:'.$this->t['boxlargeheight'].'px;margin:0px;padding:0px;">' . $imgLink . '</div>';
echo '<div id="download-msg-nopopup"><div>'
.'<table width="360">'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_NAME') . ': </td><td>'.$title.'</td></tr>'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_FORMAT') . ': </td><td>'.$this->item->imagesize.'</td></tr>'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_SIZE') . ': </td><td>'.$this->item->filesize.'</td></tr>';
echo '<tr><td align="left"><a title="'. Text::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD').'" href="'. Route::_('index.php?option=com_phocagallery&view=detail&catid='.$this->item->catslug.'&id='.$this->item->slug.'&phocadownload=2'.'&Itemid='. $this->itemId ).'">'.Text::_('COM_PHOCAGALLERY_IMAGE_DOWNLOAD').'</a></td><td>&nbsp;</td>';
echo '</table>';
echo '</div></div></div>';
} else {
//echo '<div id="download-box"><div style="overflow:scroll;width:'.$this->t['boxlargewidth'].'px;height:'.$this->t['boxlargeheight'].'px;margin:0px;padding:0px;">' . $imgLink. '</div>';
echo '<div id="download-box"><div style="overflow:scroll;width: 100%;height:'.$this->t['boxlargeheight'].'px;margin:0px;padding:0px;">' . $imgLink. '</div>';
echo '<div id="download-msg"><div>'
.'<table width="360">'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_NAME') . ': </td><td>'.$title.'</td></tr>'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_FORMAT') . ': </td><td>'.$this->item->imagesize.'</td></tr>'
.'<tr><td align="left">' . Text::_('COM_PHOCAGALLERY_IMAGE_SIZE') . ': </td><td>'.$this->item->filesize.'</td></tr>'
.'<tr><td colspan="2" align="left"><small>' . Text::_('COM_PHOCAGALLERY_DOWNLOAD_IMAGE') . '</small></td></tr>';
switch($this->t['detailwindow']) {
case 3:
case 4:
case 5:
case 7:
case 9:
case 10:
break;
default:
//echo '<tr><td>&nbsp;</td><td align="right">'.str_replace("%onclickclose%", $this->t['detailwindowclose'], $this->item->closetext).'</td></tr>';
break;
}
echo '</table>';
echo '</div></div></div>';
}
echo '<div id="phocaGallerySlideshowC" style="display:none"></div>';//because of loaded slideshow js
if ($this->t['detailwindow'] == 7) {
echo PhocaGalleryUtils::getExtInfo();
}
?>

View File

@ -0,0 +1,193 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery" class="pg-detail-view-multibox'.$this->params->get( 'pageclass_sfx' ).'">';
if ($this->t['backbutton'] != '') {
echo $this->t['backbutton'];
echo '<p>&nbsp;</p>';
}
// Min Width
$wRightO = $wLeftO = $wLeftOIE = '';
if ($this->t['multibox_fixed_cols'] == 1) {
$wLeft = $this->t['large_image_width'];
$wRight = (int)$this->t['multibox_width'] - (int)$wLeft - 20;//margin 4 x 5px
$wRightO = 'min-width: '.$wRight.'px';
$wLeftO = 'min-width: '.$wLeft.'px';
$wLeftOIE = 'width: '.$wLeft.'px';
// IE7
$document = JFactory::getDocument();
$document->addCustomTag("<!--[if lt IE 8 ]>\n<style type=\"text/css\"> \n"
." #phocagallery.pg-detail-view-multibox table tr td.pg-multibox-lefttd {"
." ".$wLeftOIE."; "
."} \n"
." </style>\n<![endif]-->");
}
// - - - - -
// LEFT
// - - - - -
echo '<table id="pg-multibox-table" cellpadding="0" cellspacing="0" border="0" style="height: '.$this->t['multibox_height'].'px;">'. "\n";
echo '<tr>'. "\n";
echo '<td valign="middle" align="center" class="pg-multibox-lefttd pg-dv-multibox-left">'. "\n";
$over = 'onmouseover="document.getElementById(\'phocagallerymultiboxnext\').style.display = \'block\';document.getElementById(\'phocagallerymultiboxprev\').style.display = \'block\';" ';
$out = 'onmouseout="document.getElementById(\'phocagallerymultiboxnext\').style.display = \'none\';document.getElementById(\'phocagallerymultiboxprev\').style.display = \'none\';"';
echo '<div class="pg-multibox-left pg-dv-multibox-left" '.$over.$out.' style="'.$wLeftO.'">';
if ($this->item->download == 1) {
echo $this->loadTemplate('download');
} else {
if ($this->item->videocode != '') {
$this->item->linkimage = $this->item->videocode;
}
if ($this->item->nextbuttonhref != '') {
echo '<a href="'.$this->item->nextbuttonhref.'">'.$this->item->linkimage.'</a>';
} else {
echo '<span >'.$this->item->linkimage.'</span>';
}
echo $this->item->prevbutton;
echo $this->item->nextbutton;
}
echo '</div>'. "\n";
echo '</td>'. "\n";
// - - - - -
// RIGHT
// - - - - -
echo '<td valign="top" class="pg-multibox-righttd pg-dv-multibox-right">'. "\n";
echo '<div class="pg-multibox-right pg-dv-multibox-right" style="height: '.$this->t['multibox_height_overflow'].'px;'.$wRightO.'">'. "\n";
// Title
if ($this->t['mb_title']) {
echo '<div class="pg-multibox-title">'.$this->item->title.'</div>'. "\n";
}
// Description
if ($this->t['mb_desc']) {
//echo '<div class="pg-multibox-desc">'.$this->item->description.'</div>'. "\n";
echo '<div class="pg-multibox-desc">'.Joomla\CMS\HTML\HTMLHelper::_('content.prepare', $this->item->description, 'com_phocagallery.item').'</div>'. "\n";
}
// Uploaded By
if ($this->t['mb_uploaded_by']) {
echo '<div class="pg-multibox-user" >' . JText::_('COM_PHOCAGALLERY_UPLOADED_BY') . '</div>';
if ($this->t['useravatarimg'] != '') {
echo '<div class="pg-multibox-avatar">'.$this->t['useravatarimg'].'</div>';
}
echo '<div class="pg-multibox-username" style="padding-top: '.$this->t['useravatarmiddle'].'px;">'.$this->item->usernameno.'</div>';
echo '<div style="clear:both"></div>';
}
// Rating
if ($this->t['mb_rating']) {
echo "\n";
echo $this->loadTemplate('rating');
echo "\n";
}
//Thumbnails
if ($this->t['mb_thumbs']) {
if (!empty($this->t['mb_thumbs_data'])) {
echo '<div class="pg-multibox-thumbs-box" style="width: '.(int)$this->t['multibox_thubms_box_width'].'px;">';
foreach ($this->t['mb_thumbs_data'] as $k => $v) {
$extImage = PhocaGalleryImage::isExtImage($v->extid);
//$altValue = PhocaGalleryRenderFront::getAltValue($this->t['altvalue'], $v->title, $v->description, $v->metadesc);
$altValue = '';//Save resources - not necessary
if ($extImage) {
$img = Joomla\CMS\HTML\HTMLHelper::_( 'image', $v->exts, $altValue);
} else {
$linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($v->filename, 'small');
$img = Joomla\CMS\HTML\HTMLHelper::_( 'image', $linkthumbnailpath, $altValue);
}
if ($this->t['detailwindow'] == 7) {
$tCom = '';
} else {
$tCom = '&tmpl=component';
}
echo '<div class="pg-multibox-thumbs-item"><a href="'.JRoute::_('index.php?option=com_phocagallery&view=detail&catid='. $v->catslug.'&id='.$v->slug.$tCom.'&Itemid='. $this->itemId).'">';
echo $img;
echo '</a></div>';
}
echo '<div style="clear:both"></div>';
echo '</div>';
}
}
// Map
if ($this->t['mb_maps']) {
$src = JRoute::_('index.php?option=com_phocagallery&view=map&catid='.$this->item->catid
.'&id='.$this->item->id.'&mapwidth='
.$this->t['multibox_map_width'].'&mapheight='
.$this->t['multibox_map_height'].'&tmpl=component&Itemid='
.$this->itemId );
$this->t['multibox_map_width'] = $this->t['multibox_map_width'] + 20;
$this->t['multibox_map_height'] = $this->t['multibox_map_height'] + 10;
echo '<iframe src="'.$src.'" width="'
.$this->t['multibox_map_width'].'" height="'
.$this->t['multibox_map_height'].'" frameborder="0" style="border:none; overflow:hidden;padding:0px;margin:0px;" name="pgmap"></iframe>'. "\n";
}
// Tags
if ($this->t['mb_tags'] && $this->t['displaying_tags_output'] != '') {
echo '<div class="pg-multibox-tags-box">';
echo '<div class="pg-multibox-tags" >' . JText::_('COM_PHOCAGALLERY_TAGS') . '</div>';
echo '<div class="pg-detail-tags-multibox">'.$this->t['displaying_tags_output'].'</div>';
echo '</div>';
}
// Comments
if ($this->t['mb_comments']) {
echo '<div class="pg-multibox-comments">';
if ((int)$this->t['externalcommentsystem'] == 2) {
echo $this->loadTemplate('comments-fb');
} else if ((int)$this->t['externalcommentsystem'] == 1) {
if (JComponentHelper::isEnabled('com_jcomments', true)) {
include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php');
echo JComments::showComments($this->item->id, 'com_phocagallery_images', JText::_('COM_PHOCAGALLERY_IMAGE') .' '. $this->item->title);
}
} else {
$src = JRoute::_('index.php?option=com_phocagallery&view=comment&catid='.$this->item->catid.'&id='.$this->item->id.'&tmpl=component&commentsi=1&Itemid='. $this->itemId );
echo '<iframe src="'.$src.'" width="'.$this->t['multibox_comments_width'].'" height="'.$this->t['multibox_comments_height'].'" frameborder="0" class="pg-multibox-comments-iframe" name="pgcomment"></iframe>'. "\n";
}
echo '</div>';
}
echo '</div>'. "\n";
echo '</td>'. "\n";
echo '</tr>'. "\n";
echo '</table>'. "\n";
echo '</div>'. "\n";
if ($this->t['detailwindow'] == 7) {
echo '<p>&nbsp;</p>';
echo PhocaGalleryUtils::getExtInfo();
}
?>

View File

@ -0,0 +1,85 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
$app = Factory::getApplication();
$amp = PhocaGalleryUtils::setQuestionmarkOrAmp($this->t['action']);
//if ((int)$this->t['display_rating_img'] == 1 || $this->t['mb_rating']) {
if ((int)$this->t['display_rating_img'] == 1) {
// Leave message for already voted images
$vote = $app->input->get('vote', 0, 'int');;
if ($vote == 1) {
$voteMsg = Text::_('COM_PHOCAGALLERY_ALREADY_RATED_IMG_THANKS');
} else {
$voteMsg = Text::_('COM_PHOCAGALLERY_ALREADY_RATE_IMG');
}
echo '<table style="text-align:left" border="0">'
.'<tr>'
.'<td><strong>' . Text::_('COM_PHOCAGALLERY_RATING'). '</strong>: ' . $this->t['votesaverageimg'] .' / '.$this->t['votescountimg'] . ' ' . Text::_($this->t['votestextimg']). '&nbsp;&nbsp;</td>';
if ($this->t['alreay_ratedimg']) {
echo '<td style="text-align:left"><ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidthimg'].'px"></li>'
.'<li><span class="star1"></span></li>';
for ($i = 2;$i < 6;$i++) {
echo '<li><span class="stars'.$i.'"></span></li>';
}
echo '</ul></td>';
if ($this->t['enable_multibox'] == 1) {
echo '<td></td></tr>';
echo '<tr><td style="text-align:left" colspan="4" class="pg-rating-msg">'.$voteMsg.'</td></tr>';
} else {
echo '<td style="text-align:left" colspan="4" class="pg-rating-msg">&nbsp;&nbsp;'.$voteMsg.'</td></tr>';
}
} else if ($this->t['not_registered_img']) {
echo '<td style="text-align:left"><ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidthimg'].'px"></li>'
.'<li><span class="star1"></span></li>';
for ($i = 2;$i < 6;$i++) {
echo '<li><span class="stars'.$i.'"></span></li>';
}
echo '</ul></td>';
if ($this->t['enable_multibox'] == 1) {
echo '<td></td></tr>';
echo '<tr><td style="text-align:left" colspan="4" class="pg-rating-msg">'.Text::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_RATE_IMAGE').'</td></tr>';
} else {
echo '<td style="text-align:left" colspan="4" class="pg-rating-msg">&nbsp;&nbsp;' . Text::_('COM_PHOCAGALLERY_COMMENT_ONLY_REGISTERED_LOGGED_RATE_IMAGE').'</td></tr>';
}
} else {
echo '<td style="text-align:left"><ul class="star-rating">'
.'<li class="current-rating" style="width:'.$this->t['voteswidthimg'].'px"></li>'
//.'<li><a href="'.$this->t['action'].$amp.'controller=detail&task=rate&rating=1" title="1 '. JText::_('COM_PHOCAGALLERY_STAR_OUT_OF').' 5" class="star1">1</a></li>';
.'<li><a href="'.htmlspecialchars($this->t['action']).$amp.'controller=detail&task=rate&rating=1" title="'. Text::sprintf('COM_PHOCAGALLERY_STAR_OUT_OF', 1, 5). '" class="star1">1</a></li>';
for ($i = 2;$i < 6;$i++) {
//echo '<li><a href="'.$this->t['action'].$amp.'controller=detail&task=rate&rating='.$i.'" title="'.$i.' '. JText::_('COM_PHOCAGALLERY_STARS_OUT_OF').' 5" class="stars'.$i.'">'.$i.'</a></li>';
echo '<li><a href="'.htmlspecialchars($this->t['action']).$amp.'controller=detail&task=rate&rating='.$i.'" title="'.Text::sprintf('COM_PHOCAGALLERY_STARS_OUT_OF', $i, 5). '" class="stars'.$i.'">'.$i.'</a></li>';
}
echo '</ul></td></tr>';
}
echo '</table>';
}
?>

View File

@ -0,0 +1,73 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
echo '<div id="phocagallery" class="pg-detail-view'.$this->params->get( 'pageclass_sfx' ).'">';
if ($this->t['backbutton'] != '') {
echo $this->t['backbutton'];
}
/*if($this->t['responsive'] == 1) {
$iW = '100%';
$iH = '100%';
$iH = $this->t['largeheight']. 'px';
$iW = $this->t['largewidth']. 'px';
} else {*/
$iW = $this->t['largewidth']. 'px';
$iH = $this->t['largeheight']. 'px';
//}
//echo '<div id="phocaGallerySlideshowC" style="width:'. $iW.';height:'.$iH .';padding:0;margin: auto"></div>';
echo '<div class="ph-mc">'
.'<table border="0" class="ph-mc" cellpadding="0" cellspacing="0">'
.'<tr>'
.'<td colspan="6" valign="middle"'
.' style="height:'.$iH.';width: '.$iW.';" >';
echo '<div id="phocaGallerySlideshowC" style="max-width:'. $iW.';max-height:'.$iH .';padding:0;margin: auto;">';
//.'<a href="#" onclick="'.$this->t['detailwindowclose'].'">'.$this->item->linkimage.'</a>';
/*.'<script type="text/javascript" style="padding:0;margin:0;">';
if ( $this->t['slideshowrandom'] == 1 ) {
echo 'new fadeshow(fadeimages, '.$this->t['largewidth'] .', '. $this->t['largeheight'] .', 0, '. $this->t['slideshowdelay'] .', '. $this->t['slideshowpause'] .', \'R\')';
} else {
echo 'new fadeshow(fadeimages, '.$this->t['largewidth'] .', '. $this->t['largeheight'] .', 0, '. $this->t['slideshowdelay'] .', '. $this->t['slideshowpause'] .')';
}
echo '</script>';*/
echo '</div>';
echo '</td>'
.'</tr>';
echo '<tr><td colspan="6"><div style="padding:0;margin:0;height:3px;font-size:0px;">&nbsp;</div></td></tr>';
// Standard Description (to get the same height as by not slideshow
if ($this->t['displaydescriptiondetail'] == 1) {
echo '<tr><td colspan="6" align="left" valign="top"><div></div></td></tr>';
}
echo '<tr>'
.'<td align="left" width="30%" style="padding-left:48px">'. $this->item->prevbutton .'</td>'
.'<td align="center">'. $this->item->slideshowbutton .'</td>'
.'<td align="center">'. str_replace("%onclickreload%", $this->t['detailwindowreload'], $this->item->reloadbutton).'</td>';
if ($this->t['detailwindow'] == 4 || $this->t['detailwindow'] == 5 || $this->t['detailwindow'] == 7) {
} else {
echo '<td align="center">'. str_replace("%onclickclose%", $this->t['detailwindowclose'], $this->item->closebutton).'</td>';
}
echo '<td align="right" width="30%" style="padding-right:48px">'. $this->item->nextbutton .'</td>'
.'</tr>'
.'</table>'
.'</div>';
if ($this->t['detailwindow'] == 7) {
echo PhocaGalleryUtils::getExtInfo();
}
echo '</div>';

View File

@ -0,0 +1,43 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();
//$document->addScript(JURI::base(true).'/media/com_phocagallery/js/jquery/jquery-1.6.4.min.js');
Joomla\CMS\HTML\HTMLHelper::_('jquery.framework', false);// Load it here because of own nonConflict method (nonconflict is set below)
$document->addScript(JURI::base(true).'/media/com_phocagallery/js/fadeslideshow/fadeslideshow.js');
if($this->t['responsive'] == 1) {
$iW = '\'100%\'';
$iH = '\'100%\''; // DOES NOT WORK IN FADESLIDESHOW
//$iH = $this->t['largeheight'];
} else {
$iW = $this->t['largewidth'];
$iH = $this->t['largeheight'];
}
?><script type="text/javascript">
/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
var phocagallery=new fadeSlideShow({
wrapperid: "phocaGallerySlideshowC",
dimensions: [<?php echo $iW; ?>, <?php echo $iH; ?>],
imagearray: [<?php echo $this->item->slideshowfiles ;?>],
displaymode: {type:'auto', pause: <?php echo $this->t['slideshow_pause'] ?>, cycles:0, wraparound:false, randomize: <?php echo $this->t['slideshowrandom'] ?>},
persist: false,
fadeduration: <?php echo $this->t['slideshow_delay'] ?>,
descreveal: "<?php echo $this->t['slideshow_description'] ?>",
togglerid: "",
})
</script>

View File

@ -0,0 +1,240 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Component\ComponentHelper;
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
$layoutC = new FileLayout('comments', null, array('component' => 'com_phocagallery'));
// SVG Definitions
$d = array();
echo $layoutSVG->render($d);
if ($this->t['ytb_display'] == 1) {
/*$document = Factory::getDocument();
/$document->addCustomTag( "<style type=\"text/css\"> \n"
." body {overflow:hidden;} \n"
." </style> \n");*/
echo '<div class="pg-ytb-full">'.$this->item->videocode.'</div>';
} else {
echo '<div id="phocagallery" class="pg-detail-item-box'.$this->params->get( 'pageclass_sfx' ).'">';
if ($this->t['detailwindow'] == 7) {
echo '<div class="pg-detail-top-box-back-title">';
echo '<a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $this->item->catslug.'&Itemid='. $this->itemId).'"';
echo ' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">';
echo '<svg class="ph-si ph-si-detail-top-back"><use xlink:href="#ph-si-back"></use></svg>';
echo '</a></div>';
}
switch ($this->t['detailwindow']) {
case 4:
case 7:
case 9:
case 10:
case 11:
$closeImage = $this->item->linkimage;
$closeButton = '';
break;
default:
$closeButton = str_replace("%onclickclose%", $this->t['detailwindowclose'], $this->item->closebutton);
$closeImage = '<a href="#" onclick="'.$this->t['detailwindowclose'].'" style="margin:auto;padding:0">'.$this->item->linkimage.'</a>';
break;
}
$classSuffix = ' popup';
if ($this->t['detailwindow'] == 7) {
$classSuffix = ' no-popup';
}
/*
echo '<div class="ph-mc" style="padding-top:10px">'
.'<table border="0" class="ph-w100 ph-mc" cellpadding="0" cellspacing="0">'
.'<tr>'
.'<td colspan="6" align="center" valign="middle"'
.' style="'.$iH.'vertical-align: middle;" >'
.'<div id="phocaGalleryImageBox" style="'.$iW.'margin: auto;padding: 0;">'
.$closeImage;
*/
//echo '<div class="pg-detail-item-image-box">'.$closeImage.'</div>';
echo '<div class="pg-ytb-detail">'.$this->item->videocode.'</div>';
$titleDesc = '';
if ($this->t['display_title_description'] == 1) {
$titleDesc .= $this->item->title;
if ($this->item->description != '' && $titleDesc != '') {
$titleDesc .= ' - ';
}
}
// Lightbox Description
if ($this->t['displaydescriptiondetail'] == 2 && (!empty($this->item->description) || !empty($titleDesc))){
echo '<div class="pg-detail-item-desc-box">' .(HTMLHelper::_('content.prepare', $titleDesc . $this->item->description, 'com_phocagallery.item')).'</div>';
}
/*
if ($this->t['detailbuttons'] == 1){
echo '<div class="pg-detail-item-button-box">'
.'<td align="left" width="30%" style="padding-left:48px">'.$this->item->prevbutton.'</td>'
.'<td align="center">'.$this->item->slideshowbutton.'</td>'
.'<td align="center">'.str_replace("%onclickreload%", $this->t['detailwindowreload'], $this->item->reloadbutton).'</td>'
. $closeButton
//.'<td align="right" width="30%" style="padding-right:48px">'.$this->item->nextbutton.'</td>'
.'</div>';
}
*/
if ((isset($this->itemnext[0]) && $this->itemnext[0]) || (isset($this->itemprev[0]) && $this->itemprev[0])) {
$suffix = '';
if ($this->t['tmpl'] == 'component') {
$suffix = 'tmpl=component';
}
echo '<div class="pg-detail-nav-box">';
if(isset($this->itemprev[0]) && $this->itemprev[0]) {
$p = $this->itemprev[0];
$linkPrev = Route::_(PhocaGalleryRoute::getImageRoute($p->id, $p->catid, $p->alias, $p->categoryalias, 'detail', $suffix));
echo '<div class="ph-left"><a href="'.$linkPrev.'" class="btn btn-primary ph-image-navigation" role="button"><svg class="ph-si ph-si-prev-btn"><use xlink:href="#ph-si-prev"></use></svg> '.Text::_('COM_PHOCAGALLERY_PREVIOUS').'</a></div>';
}
if(isset($this->itemnext[0]) && $this->itemnext[0]) {
$n = $this->itemnext[0];
$linkNext = Route::_(PhocaGalleryRoute::getImageRoute($n->id, $n->catid, $n->alias, $n->categoryalias, 'detail', $suffix));
echo '<div class="ph-right"><a href="'.$linkNext.'" class="btn btn-primary ph-image-navigation" role="button">'.Text::_('COM_PHOCAGALLERY_NEXT').' <svg class="ph-si ph-si-next-btn"><use xlink:href="#ph-si-next"></use></svg></a></div>';
}
echo '<div class="ph-cb"></div>';
echo '</div>';
}
echo $this->loadTemplate('rating');
// Tags
if ($this->t['displaying_tags_output'] != '') {
echo '<div class="pg-detail-item-tag-box">'.$this->t['displaying_tags_output'].'</div>';
}
if ($this->t['display_comment_img'] == 1 || $this->t['display_comment_img'] == 3 || ($this->t['display_comment_img'] == 2 && $this->t['tmpl'] == 'component')) {
$d = array();
$d['t'] = $this->t;
$d['form']['task'] = 'comment';
$d['form']['view'] = 'detail';
$d['form']['controller'] = 'detail';
$d['form']['tab'] = '';
$d['form']['id'] = $this->item->id;
$d['form']['catid'] = $this->item->catid;
$d['form']['itemid'] = $this->itemId;
echo $layoutC->render($d);
/*if ($this->t['externalcommentsystem'] == 1) {
if (ComponentHelper::isEnabled('com_jcomments', true)) {
include_once(JPATH_BASE.'/components/com_jcomments/jcomments.php');
echo JComments::showComments($this->item->id, 'com_phocagallery_images', Text::_('COM_PHOCAGALLERY_IMAGE') .' '. $this->item->title);
}
} else if ($this->t['externalcommentsystem'] == 2) {
echo $this->loadTemplate('comments-fb');
}*/
echo PhocaGalleryUtils::getExtInfo();
}
echo '</div>';
}
/*echo '<div id="phocagallery" class="pg-detail-view'.$this->params->get( 'pageclass_sfx' ).'">';
if ($this->t['backbutton'] != '') {
echo $this->t['backbutton'];
}
echo '<table border="0" style="width:'.$this->t['boxlargewidth'].'px;height:'.$this->t['boxlargeheight'].'px;">'
.'<tr>'
.'<td colspan="5" class="pg-center" align="center" valign="middle">'
.$this->item->videocode
.'</td>'
.'</tr>';
$titleDesc = '';
if ($this->t['display_title_description'] == 1) {
$titleDesc .= $this->item->title;
if ($this->item->description != '' && $titleDesc != '') {
$titleDesc .= ' - ';
}
}
// Standard Description
if ($this->t['displaydescriptiondetail'] == 1) {
echo '<tr>'
.'<td colspan="6" align="left" valign="top" class="pg-dv-desc">'
.'<div class="pg-dv-desc">'
. $titleDesc . $this->item->description . '</div>'
.'</td>'
.'</tr>';
}
if ($this->t['detailbuttons'] == 1){
echo '<tr>'
.'<td align="left" width="30%" style="padding-left:48px">'.$this->item->prevbutton.'</td>'
.'<td align="center"></td>'
.'<td align="center">'.str_replace("%onclickreload%", $this->t['detailwindowreload'], $this->item->reloadbutton).'</td>';
if ($this->t['detailwindow'] == 4 || $this->t['detailwindow'] == 5 || $this->t['detailwindow'] == 7) {
} else {
echo '<td align="center">' . str_replace("%onclickclose%", $this->t['detailwindowclose'], $this->item->closebutton). '</td>';
}
echo '<td align="right" width="30%" style="padding-right:48px">'.$this->item->nextbutton.'</td>'
.'</tr>';
}
echo '</table>';
echo $this->loadTemplate('rating');
if ($this->t['detailwindow'] == 7) {
echo PhocaGalleryUtils::getExtInfo();
}
echo '</div>';
}
*/
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,678 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
use Joomla\CMS\Factory;
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Plugin\PluginHelper;
jimport( 'joomla.application.component.view');
phocagalleryimport( 'phocagallery.image.image');
phocagalleryimport( 'phocagallery.image.imagefront');
phocagalleryimport( 'phocagallery.file.filethumbnail');
phocagalleryimport( 'phocagallery.rate.rateimage');
phocagalleryimport( 'phocagallery.picasa.picasa');
phocagalleryimport( 'phocagallery.facebook.fbsystem');
phocagalleryimport( 'phocagallery.youtube.youtube');
phocagalleryimport( 'phocagallery.user.user');
phocagalleryimport('phocagallery.comment.comment');
phocagalleryimport('phocagallery.comment.commentimage');
class PhocaGalleryViewDetail extends HtmlView
{
public $t;
protected $params;
protected $itemnext;
protected $itemprev;
protected $category;
function display($tpl = null) {
$app = Factory::getApplication();
$uri = Uri::getInstance();
$id = $app->input->get('id', 0, 'int');
$document = Factory::getDocument();
$this->params = $app->getParams();
$user = Factory::getUser();
$var['slideshow'] = $app->input->get('phocaslideshow', 0, 'int');
$var['download'] = $app->input->get('phocadownload', 0, 'int');
$this->t['action'] = $uri->toString();
$path = PhocaGalleryPath::getPath();
$this->itemId = $app->input->get('Itemid', 0, 'int');
$this->t['tmpl'] = $app->input->get('tmpl', '', 'string');
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
$access = PhocaGalleryAccess::isAccess($user->getAuthorisedViewLevels(), $neededAccessLevels);
PhocaGalleryRenderFront::renderAllCSS();
PhocaGalleryRenderFront::renderMainJs();
// Information from the plugin - window is displayed after plugin action
$get = array();
$get['detail'] = $app->input->get( 'detail', '', 'string');
$get['buttons'] = $app->input->get( 'buttons', '', 'string' );
$get['ratingimg'] = $app->input->get( 'ratingimg', '', 'string' );
$this->t['tmpl'] = $app->input->get( 'tmpl', '', 'string');
$this->t['picasa_correct_width_l'] = (int)$this->params->get( 'large_image_width', 640 );
$this->t['picasa_correct_height_l'] = (int)$this->params->get( 'large_image_height', 480 );
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
$this->t['enable_multibox'] = $this->params->get( 'enable_multibox', 0);
$this->t['multibox_height'] = (int)$this->params->get( 'multibox_height', 560 );
$this->t['multibox_width'] = (int)$this->params->get( 'multibox_width', 980 );
$this->t['multibox_map_height'] = (int)$this->params->get( 'multibox_map_height', 300 );
$this->t['multibox_map_width'] = (int)$this->params->get( 'multibox_map_width', 280 );
$this->t['multibox_height_overflow'] = (int)$this->t['multibox_height'] - 10;//padding
$this->t['multibox_comments_width'] = $this->params->get( 'multibox_comments_width', 300 );
$this->t['multibox_comments_height'] = $this->params->get( 'multibox_comments_height', 600 );
$this->t['multibox_thubms_box_width'] = $this->params->get( 'multibox_thubms_box_width', 300 );
$this->t['multibox_thubms_count'] = $this->params->get( 'multibox_thubms_count', 4 );
$this->t['large_image_width'] = $this->params->get( 'large_image_width', 640 );
$this->t['large_image_height'] = $this->params->get( 'large_image_height', 640 );
$this->t['multibox_fixed_cols'] = $this->params->get( 'multibox_fixed_cols', 1 );
$this->t['display_multibox'] = $this->params->get( 'display_multibox', array(1,2));
$this->t['display_title_description'] = $this->params->get( 'display_title_description', 0);
$this->t['responsive'] = $this->params->get( 'responsive', 0 );
$this->t['bootstrap_icons'] = $this->params->get( 'bootstrap_icons', 0 );
$this->t['display_comment_img'] = $this->params->get( 'display_comment_img', 0 );
$this->t['display_cat_name_breadcrumbs '] = $this->params->get( 'display_cat_name_breadcrumbs', 1 );
// CSS
PhocaGalleryRenderFront::renderAllCSS(1);
// Plugin information
$this->t['detailwindow'] = $this->params->get( 'detail_window', 0 );
if (isset($get['detail']) && $get['detail'] != '') {
$this->t['detailwindow'] = $get['detail'];
}
// Plugin information
$this->t['detailbuttons'] = $this->params->get( 'detail_buttons', 1 );
if (isset($get['buttons']) && $get['buttons'] != '') {
$this->t['detailbuttons'] = $get['buttons'];
}
// Close and Reload links (for different window types)
$close = PhocaGalleryRenderFront::renderCloseReloadDetail($this->t['detailwindow']);
$this->t['detailwindowclose'] = $close['detailwindowclose'];
$this->t['detailwindowreload'] = $close['detailwindowreload'];
$this->t['displaydescriptiondetail'] = $this->params->get( 'display_description_detail', 0 );
$this->t['display_rating_img'] = $this->params->get( 'display_rating_img', 0 );
$this->t['display_icon_download'] = $this->params->get( 'display_icon_download', 0 );
$this->t['externalcommentsystem'] = $this->params->get( 'external_comment_system', 0 );
$this->t['largewidth'] = $this->params->get( 'large_image_width', 640 );
$this->t['largeheight'] = $this->params->get( 'large_image_height', 480 );
$this->t['boxlargewidth'] = $this->params->get( 'front_modal_box_width', 680 );
$this->t['boxlargeheight'] = $this->params->get( 'front_modal_box_height', 560 );
$this->t['slideshow_delay'] = $this->params->get( 'slideshow_delay', 3000 );
$this->t['slideshow_pause'] = $this->params->get( 'slideshow_pause', 2500 );
$this->t['slideshowrandom'] = $this->params->get( 'slideshow_random', 0 );
$this->t['slideshow_description'] = $this->params->get( 'slideshow_description', 'peekaboo' );
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$this->t['altvalue'] = $this->params->get( 'alt_value', 1 );
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
$this->t['display_tags_links'] = $this->params->get( 'display_tags_links', 0 );
$this->t['ytb_display'] = $this->params->get( 'ytb_display', 0 );
/*$paramsFb = PhocaGalleryFbSystem::getCommentsParams($this->params->get( 'fb_comment_user_id', ''));// Facebook
$this->t['fb_comment_app_id'] = isset($paramsFb['fb_comment_app_id']) ? $paramsFb['fb_comment_app_id'] : '';
$this->t['fb_comment_width'] = isset($paramsFb['fb_comment_width']) ? $paramsFb['fb_comment_width'] : 550;
$this->t['fb_comment_lang'] = isset($paramsFb['fb_comment_lang']) ? $paramsFb['fb_comment_lang'] : 'en_US';
$this->t['fb_comment_count'] = isset($paramsFb['fb_comment_count']) ? $paramsFb['fb_comment_count'] : '';*/
$this->t['max_upload_char'] = $this->params->get( 'max_upload_char', 1000 );
$this->t['max_comment_char'] = $this->params->get( 'max_comment_char', 1000 );
$this->t['max_create_cat_char'] = $this->params->get( 'max_create_cat_char', 1000 );
$oH = '';
if ($this->t['enable_multibox'] == 1) {
$this->t['fb_comment_width'] = $this->t['multibox_comments_width'];
$oH = 'overflow:hidden;';
}
// CSS
/*JHtml::stylesheet('media/com_phocagallery/css/phocagallery.css' );
if ($this->t['enablecustomcss'] == 1) {
HTMLHelper::stylesheet('media/com_phocagallery/css/phocagallerycustom.css' );
if ($this->t['customcss'] != ''){
$document->addCustomTag( "\n <style type=\"text/css\"> \n"
.$this->escape(strip_tags($this->t['customcss']))
."\n </style> \n");
}
}*/
//Multibox displaying
/*$this->t['mb_title'] = PhocaGalleryUtils::isEnabledMultiboxFeature(1);
$this->t['mb_desc'] = PhocaGalleryUtils::isEnabledMultiboxFeature(2);
$this->t['mb_uploaded_by'] = PhocaGalleryUtils::isEnabledMultiboxFeature(3);
$this->t['mb_rating'] = PhocaGalleryUtils::isEnabledMultiboxFeature(4);
$this->t['mb_maps'] = PhocaGalleryUtils::isEnabledMultiboxFeature(5);
$this->t['mb_tags'] = PhocaGalleryUtils::isEnabledMultiboxFeature(6);
$this->t['mb_comments'] = PhocaGalleryUtils::isEnabledMultiboxFeature(7);
$this->t['mb_thumbs'] = PhocaGalleryUtils::isEnabledMultiboxFeature(8);
// No bar in Detail View
if ($this->t['detailwindow'] == 7) {
} else {
$oS = " html, body, .contentpane, #all, #main {".$oH."padding:0px !important;margin:0px !important; width: 100% !important; max-width: 100% !important;} \n"
// gantry-fix-begin
."body {min-width:100%} \n"
.".rt-container {width:100%} \n";
// gantry-fix-end
if ($this->t['responsive'] == 1) {
$oS .= "html, body {height:100%;} \n"
. ".pg-detail-view {
position: relative;
top: 50%;
transform: perspective(1px) translateY(-50%);
} \n";
}
$document->addCustomTag( "<style type=\"text/css\"> \n" . $oS . " </style> \n");
}
*/
// Download from the detail view which is not in the popupbox
if ($var['download'] == 2 ){
$this->t['display_icon_download'] = 2;
}
// Plugin Information
if (isset($get['ratingimg']) && $get['ratingimg'] != '') {
$this->t['display_rating_img'] = $get['ratingimg'];
}
// Model
$model = $this->getModel();
$item = $model->getData();
$this->category = $model->getCategory($item->id);
//Multibox Thumbnails
/*$this->t['mb_thumbs_data'] = '';
if ($this->t['mb_thumbs'] == 1) {
// if we get item variable, we have rights to load the thumbnails, this is why we checking it
if (isset($item->id) && isset($item->catid) && (int)$item->id > 0 && (int)$item->catid > 0) {
$this->t['mb_thumbs_data'] = $model->getThumbnails((int)$item->id, (int)$item->catid, (int)$item->ordering);
}
}*/
// User Avatar
$this->t['useravatarimg'] = '';
$this->t['useravatarmiddle'] = '';
$userAvatar = false;
if (isset($item->userid)) {
$userAvatar = PhocaGalleryUser::getUserAvatar($item->userid);
}
if ($userAvatar) {
$pathAvatarAbs = $path->avatar_abs .'thumbs/phoca_thumb_s_'. $userAvatar->avatar;
$pathAvatarRel = $path->avatar_rel . 'thumbs/phoca_thumb_s_'. $userAvatar->avatar;
if (File::exists($pathAvatarAbs)){
$sIH = $this->params->get( 'small_image_height', 96 );
$sIHR = @getImageSize($pathAvatarAbs);
if (isset($sIHR[1])) {
$sIH = $sIHR[1];
}
if ((int)$sIH > 0) {
$this->t['useravatarmiddle'] = ((int)$sIH / 2) - 10;
}
$this->t['useravatarimg'] = '<img src="'.Uri::base(true) . '/' . $pathAvatarRel.'?imagesid='.md5(uniqid(time())).'" alt="" />';
}
}
// Access check - don't display the image if you have no access to this image (if user add own url)
// USER RIGHT - ACCESS - - - - - - - - - -
$rightDisplay = 0;
if (!empty($item)) {
$rightDisplay = PhocaGalleryAccess::getUserRight('accessuserid', $item->cataccessuserid, $item->cataccess, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
}
if ((int)$rightDisplay == 0) {
echo $close['html'];
//Some problem with cache - Joomla! return this message if there is no reason for do it.
//$this->t['pl'] = 'index.php?option=com_users&view=login&return='.base64_encode($uri->toString());
//$app->redirect(JRoute::_($this->t['pl'], false));
exit;
}
// - - - - - - - - - - - - - - - - - - - -
phocagalleryimport('phocagallery.image.image');
phocagalleryimport('phocagallery.render.renderdetailbutton'); // Javascript Slideshow buttons
$detailButton = new PhocaGalleryRenderDetailButton();
if ($this->t['enable_multibox'] == 1) {
$detailButton->setType('multibox');
}
$item->reloadbutton = $detailButton->getReload($item->catslug, $item->slug);
$item->closebutton = $detailButton->getClose($item->catslug, $item->slug);
$item->closetext = $detailButton->getCloseText($item->catslug, $item->slug);
$item->nextbutton = $detailButton->getNext((int)$item->catid, (int)$item->id, (int)$item->ordering);
$item->nextbuttonhref = $detailButton->getNext((int)$item->catid, (int)$item->id, (int)$item->ordering, 1);
$item->prevbutton = $detailButton->getPrevious((int)$item->catid, (int)$item->id, (int)$item->ordering);
$slideshowData = $detailButton->getJsSlideshow((int)$item->catid, (int)$item->id, (int)$var['slideshow'], $item->catslug, $item->slug);
$item->slideshowbutton = $slideshowData['icons'];
$item->slideshowfiles = $slideshowData['files'];
$item->slideshow = $var['slideshow'];
$item->download = $var['download'];
// ALT VALUE
$altValue = PhocaGalleryRenderFront::getAltValue($this->t['altvalue'], $item->title, $item->description, $item->metadesc);
$item->altvalue = $altValue;
// Get file thumbnail or No Image
$item->filenameno = $item->filename;
$item->filename = PhocaGalleryFile::getTitleFromFile($item->filename, 1);
$item->filesize = PhocaGalleryFile::getFileSize($item->filenameno);
$realImageSize = '';
$extImage = PhocaGalleryImage::isExtImage($item->extid);
if ($extImage) {
$item->extl = $item->extl;
$item->exto = $item->exto;
$realImageSize = PhocaGalleryImage::getRealImageSize($item->extl, '', 1);
$item->imagesize = PhocaGalleryImage::getImageSize($item->exto, 1, 1);
if ($item->extw != '') {
$extw = explode(',',$item->extw);
$item->extw = $extw[0];
}
if ($item->exth != '') {
$exth = explode(',',$item->exth);
$item->exth = $exth[0];
}
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($item->extw, $item->exth, $this->t['picasa_correct_width_l'], $this->t['picasa_correct_height_l']);
$item->linkimage = HTMLHelper::_( 'image', $item->extl, $item->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-detail-image img img-responsive'));
$item->realimagewidth = $correctImageRes['width'];
$item->realimageheight = $correctImageRes['height'];
} else {
$item->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($item->filenameno, 'large');
$item->linkimage = HTMLHelper::_( 'image', $item->linkthumbnailpath, $item->altvalue, array( 'class' => 'pg-detail-image img img-responsive'));
$realImageSize = PhocaGalleryImage::getRealImageSize ($item->filenameno);
$item->imagesize = PhocaGalleryImage::getImageSize($item->filenameno, 1);
if (isset($realImageSize['w']) && isset($realImageSize['h'])) {
$item->realimagewidth = $realImageSize['w'];
$item->realimageheight = $realImageSize['h'];
} else {
$item->realimagewidth = $this->t['largewidth'];
$item->realimageheight = $this->t['largeheight'];
}
}
// Add Statistics
$model->hit($app->input->get( 'id', '', 'int' ));
// R A T I N G
// Only registered (VOTES + COMMENTS)
$this->t['not_registered_img'] = true;
$this->t['usernameimg'] = '';
if ($access > 0) {
$this->t['not_registered_img'] = false;
$this->t['usernameimg'] = $user->name;
}
// VOTES Statistics Img
//if ((int)$this->t['display_rating_img'] == 1 || $this->t['mb_rating']) {
if ((int)$this->t['display_rating_img'] == 1) {
$this->t['votescountimg'] = 0;
$this->t['votesaverageimg'] = 0;
$this->t['voteswidthimg'] = 0;
$votesStatistics = PhocaGalleryRateImage::getVotesStatistics((int)$item->id);
if (!empty($votesStatistics->count)) {
$this->t['votescountimg'] = $votesStatistics->count;
}
if (!empty($votesStatistics->average)) {
$this->t['votesaverageimg'] = $votesStatistics->average;
if ($this->t['votesaverageimg'] > 0) {
$this->t['votesaverageimg'] = round(((float)$this->t['votesaverageimg'] / 0.5)) * 0.5;
$this->t['voteswidthimg'] = 22 * $this->t['votesaverageimg'];
} else {
$this->t['votesaverageimg'] = (int)0;// not float displaying
}
}
if ((int)$this->t['votescountimg'] > 1) {
$this->t['votestextimg'] = 'COM_PHOCAGALLERY_VOTES';
} else {
$this->t['votestextimg'] = 'COM_PHOCAGALLERY_VOTE';
}
// Already rated?
$this->t['alreay_ratedimg'] = PhocaGalleryRateImage::checkUserVote( (int)$item->id, (int)$user->id );
}
// Tags
$this->t['displaying_tags_output'] = '';
//if ($this->t['display_tags_links'] == 1 || $this->t['display_tags_links'] == 3 || $this->t['mb_tags']) {
if ($this->t['display_tags_links'] == 1 || $this->t['display_tags_links'] == 3) {
if ($this->t['detailwindow'] == 7) {
$this->t['displaying_tags_output'] = PhocaGalleryTag::displayTags($item->id);
} else {
$this->t['displaying_tags_output'] = PhocaGalleryTag::displayTags($item->id, 1);
}
}
// Only registered (VOTES + COMMENTS)
$this->t['not_registered'] = true;
$this->t['name'] = '';
if ($access) {
$this->t['not_registered'] = false;
$this->t['name'] = $user->name;
}
$this->t['already_commented'] = PhocaGalleryCommentImage::checkUserComment( (int)$item->id, (int)$user->id );
$this->t['commentitem'] = PhocaGalleryCommentImage::displayComment( (int)$item->id);
$this->itemnext[0] = false;
$this->itemprev[0] = false;
//if ($this->t['enable_image_navigation'] == 1) {
if (isset($item->ordering) && isset($item->catid) && isset($item->id) && $item->catid > 0 && $item->id > 0) {
$this->itemnext = $model->getItemNext($item->ordering, $item->catid);
$this->itemprev = $model->getItemPrev($item->ordering, $item->catid);
}
//}
// ASIGN
$this->item = $item;
$this->_prepareDocument($item);
// Breadcrumb display:
// 0 - only menu link
// 1 - menu link - category name
// 2 - only category name
$this->_addBreadCrumbs( isset($menu->query['id']) ? $menu->query['id'] : 0, $this->t['display_cat_name_breadcrumbs '], $item);
if ($this->t['enable_multibox'] == 1) {
if ($item->download > 0) {
if ($this->t['display_icon_download'] == 2) {
$backLink = 'index.php?option=com_phocagallery&view=category&id='. $item->catslug.'&Itemid='. $this->itemId;
phocagalleryimport('phocagallery.file.filedownload');
if (isset($item->exto) && $item->exto != '') {
PhocaGalleryFileDownload::download($item, $backLink, 1);
} else {
PhocaGalleryFileDownload::download($item, $backLink);
}
exit;
} else {
parent::display('multibox');
//parent::display('download');
}
} else {
if (isset($item->videocode) && $item->videocode != '' && $item->videocode != '0') {
$item->videocode = PhocaGalleryYoutube::displayVideo($item->videocode);
}
parent::display('multibox');
}
} else if (isset($item->videocode) && $item->videocode != '' && $item->videocode != '0') {
$item->videocode = PhocaGalleryYoutube::displayVideo($item->videocode);
if ($this->t['detailwindow'] != 7 && $this->t['ytb_display'] == 1) {
$document->addCustomTag( "<style type=\"text/css\"> \n"
." html, body, .contentpane, div#all, div#main, div#system-message-container {padding: 0px !important;margin: 0px !important;} \n"
." div#sbox-window {background-color:#fff;padding: 0px;margin: 0px;} \n"
." </style> \n");
}
parent::display('video');
} else {
//parent::display('slideshowjs');
/*if ($item->slideshow == 1) {
parent::display('slideshow');
} else*/
if ($item->download > 0) {
if ($this->t['display_icon_download'] == 2) {
$backLink = 'index.php?option=com_phocagallery&view=category&id='. $item->catslug.'&Itemid='. $this->itemId;
phocagalleryimport('phocagallery.file.filedownload');
if (isset($item->exto) && $item->exto != '') {
PhocaGalleryFileDownload::download($item, $backLink, 1);
} else {
PhocaGalleryFileDownload::download($item, $backLink);
}
exit;
} else {
parent::display('download');
}
} else {
parent::display($tpl);
}
}
}
protected function _prepareDocument($item) {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
//$this->params = $app->getParams();
$title = null;
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
} else if ($app->get('sitename_pagetitles', 0) == 2) {
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
if ($item->metadesc != '') {
$this->document->setDescription($item->metadesc);
} else if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
if ($item->metakey != '') {
$this->document->setMetadata('keywords', $item->metakey);
} else if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
/*if ($app->get('MetaAuthor') == '1') {
$this->document->setMetaData('author', $this->item->author);
}
/*$mdata = $this->item->metadata->toArray();
foreach ($mdata as $k => $v) {
if ($v) {
$this->document->setMetadata($k, $v);
}
}*/
// Breadcrumbs TO DO (Add the whole tree)
/*if (isset($this->category[0]->parentid)) {
if ($this->category[0]->parentid == 1) {
} else if ($this->category[0]->parentid > 0) {
$pathway->addItem($this->category[0]->parenttitle, Route::_(PhocaDocumentationHelperRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
}
}
if (!empty($this->category[0]->title)) {
$pathway->addItem($this->category[0]->title);
}*/
// Features added by Bernard Gilly - alphaplug.com
// load external plugins
/*$user = Factory::getUser();
$imgid = $item->id;
$catid = $item->catid;
$db = Factory::getDBO();
$query = "SELECT owner_id FROM #__phocagallery_categories WHERE `id`='$catid'";
$db->setQuery( $query );
$ownerid = $db->loadResult();
$dispatcher = JDispatcher::getInstance();
PluginHelper::importPlugin('phocagallery');
$results = Factory::getApplication()->triggerEvent('onViewImage', array($imgid, $catid, $ownerid, $user->id ) );*/
$user = Factory::getUser();
//$dispatcher = J Dispatcher::getInstance();
PluginHelper::importPlugin('phocagallery');
$results = Factory::getApplication()->triggerEvent('onViewImage', array((int)$item->id, (int)$item->catid, (int)$item->owner_id, (int)$user->id ) );
}
/**
* Method to add Breadcrubms in Phoca Gallery
* @param array $this->category Object array of Category
* @param int $rootId Id of Root Category
* @param int $displayStyle Displaying of Breadcrubm - Nothing, Category Name, Menu link with Name
* @return string Breadcrumbs
*/
function _addBreadCrumbs($rootId, $displayStyle, $image)
{
$app = Factory::getApplication();
$i = 0;
$category = $this->category[0];
while (isset($category->id))
{
$crumbList[$i++] = $category;
if ($category->id == $rootId)
{
break;
}
$db = Factory::getDBO();
$query = 'SELECT *' .
' FROM #__phocagallery_categories AS c' .
' WHERE c.id = '.(int) $category->parent_id.
' AND c.published = 1';
$db->setQuery($query);
$rows = $db->loadObjectList('id');
if (!empty($rows))
{
$category = $rows[$category->parent_id];
}
else
{
$category = '';
}
// $category = $rows[$category->parent_id];
}
$pathway = $app->getPathway();
$pathWayItems = $pathway->getPathWay();
$lastItemIndex = count($pathWayItems) - 1;
for ($i--; $i >= 0; $i--)
{
// special handling of the root category
if ($crumbList[$i]->id == $rootId)
{
switch ($displayStyle)
{
case 0: // 0 - only menu link
// do nothing
break;
case 1: // 1 - menu link with category name
// replace the last item in the breadcrumb (menu link title) with the current value plus the category title
$pathway->setItemName($lastItemIndex, $pathWayItems[$lastItemIndex]->name . ' - ' . $crumbList[$i]->title);
break;
case 2: // 2 - only category name
// replace the last item in the breadcrumb (menu link title) with the category title
$pathway->setItemName($lastItemIndex, $crumbList[$i]->title);
break;
}
}
else
{
$pathway->addItem($crumbList[$i]->title, Route::_('index.php?option=com_phocagallery&view=category&id='. $crumbList[$i]->id.':'.$crumbList[$i]->alias.'&Itemid='. $this->itemId ));
}
}
// Add the image title
$pathway->addItem($image->title);
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,158 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Document\Feed\FeedItem;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
jimport( 'joomla.application.component.view');
phocagalleryimport( 'phocagallery.ordering.ordering');
phocagalleryimport( 'phocagallery.picasa.picasa');
phocagalleryimport( 'phocagallery.facebook.fbsystem');
class PhocaGalleryViewFeed extends HtmlView
{
function display($tpl = null) {
$app = Factory::getApplication();
$user = Factory::getUser();
$userLevels = implode (',', $user->getAuthorisedViewLevels());
$db = Factory::getDBO();
$menu = $app->getMenu();
$document = Factory::getDocument();
$params = $app->getParams();
// Specific category
$id = $app->input->get('id', 0, 'int');
// Params
$categories = $params->get( 'feed_cat_ids', '' );
$ordering = $params->get( 'feed_img_ordering', 6 );
$imgCount = $params->get( 'feed_img_count', 5 );
$feedTitle = $params->get( 'feed_title', Text::_('COM_PHOCAGALLERY_GALLERY') );
$t['picasa_correct_width_m'] = (int)$params->get( 'medium_image_width', 256 );
$t['picasa_correct_height_m'] = (int)$params->get( 'medium_image_height', 192 );
$document->setTitle($this->escape( html_entity_decode($feedTitle)));
if($id > 0) {
$wheres[] = ' c.id ='.(int)$id;
} else {
if (count($categories) > 1) {
\Joomla\Utilities\ArrayHelper::toInteger($categories);
$categoriesString = implode(',', $categories);
$wheres[] = ' c.id IN ( '.$categoriesString.' ) ';
} else if ((int)$categories > 0) {
$wheres[] = ' c.id IN ( '.$categories.' ) ';
}
}
$imageOrdering = PhocaGalleryOrdering::getOrderingString($ordering, 6);
$wheres[] = ' a.published = 1';
$wheres[] = ' a.approved = 1';
$wheres[] = ' c.published = 1';
$wheres[] = ' c.approved = 1';
$wheres[] = ' c.access IN ('.$userLevels.')';
$u = " (c.accessuserid LIKE '%0%' OR c.accessuserid LIKE '%-1%' OR c.accessuserid LIKE '%,".(int)$user->id."' OR c.accessuserid LIKE '".(int)$user->id.",%' OR c.accessuserid LIKE '%,".(int)$user->id.",%' OR c.accessuserid =".(int)$user->id.") ";
$e = 'c.accessuserid IS NULL';
$wheres[] = ' CASE WHEN c.accessuserid IS NOT NULL THEN '.$u.' ELSE '.$e.' END';
$query = 'SELECT a.*, c.alias as catalias, c.title as categorytitle'
.' FROM #__phocagallery AS a'
.' LEFT JOIN #__phocagallery_categories AS c ON a.catid = c.id'
. ' WHERE ' . implode( ' AND ', $wheres )
.$imageOrdering['output'];
$db->setQuery( $query , 0, $imgCount );
$images = $db->loadObjectList( );
foreach ($images as $keyI => $value) {
$item = new FeedItem();
$title = $this->escape( $value->title );
$title = html_entity_decode( $title );
$item->title = $title;
$link = PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias);
$item->link = Route::_($link);
// imgDate
$imgDate = '';
$imgDate = HTMLHelper::Date($value->date, "Y-m-d h:m:s");
if ($imgDate != '') {
$item->date = $imgDate;
}
$item->description = '';
if ($value->description != '') {
$item->description .= '<div>'.$value->description.'</div>';
}
$extImage = false;
if (isset($value->extid)) {
$extImage = PhocaGalleryImage::isExtImage($value->extid);
}
// Trying to fix but in Joomla! method $this->_relToAbs - it cannot work with JRoute links :-(
$itemL = str_replace(Uri::base(true), '', $item->link);
if (substr($itemL, 0, 1) == '/') {
$itemL = substr_replace($itemL, '', 0, 1);
}
$itemL = Uri::base().$itemL;
// Should really not happen
$itemLTmp = str_replace('http://', '', $itemL);
$pos = stripos($itemLTmp, '//');
if ($pos !== false) {
$itemLTmp = str_replace('//', '/', $itemLTmp);
$itemL = 'http://'.$itemLTmp;
}
// - - - - - - - - - - -
if ($extImage) {
$correctImageRes = PhocaGalleryPicasa::correctSizeWithRate($value->extw, $value->exth, $t['picasa_correct_width_m'], $t['picasa_correct_height_m']);
$imgLink = $value->extm;
//$i = '<div><a href="'.JRoute::_($link).'"><img src="'.$imgLink .'" border="0" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" /></a></div>';
$i = '<div><a href="'.$itemL.'"><img src="'.$imgLink .'" border="0" /></a></div>';
} else {
$imgLink = PhocaGalleryImageFront::displayCategoryImageOrNoImage($value->filename, 'medium');
$i = '<div><a href="'.$itemL.'"><img src="'. /*JUri::base(true) .*/ $imgLink.'" border="0" /></a></div>';
}
$item->description .= $i;
$item->category = $value->categorytitle;
/*if ($value->author != '') {
$item->author = $value->author;
}*/
$document->addItem( $item );
}
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1,42 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Router\Route;
defined('_JEXEC') or die('Restricted access');
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
// SVG Definitions
$d = array();
echo $layoutSVG->render($d);
if ($this->t['detailwindow'] == 7) {
echo '<div class="pg-detail-top-box-back-title">';
echo '<a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $this->info->catslug.'&Itemid='. $this->itemId).'"';
echo ' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">';
echo '<svg class="ph-si ph-si-detail-top-back"><use xlink:href="#ph-si-back"></use></svg>';
echo '</a></div>';
}
echo '<div id="phoca-exif" class="pg-info-view'.$this->params->get( 'pageclass_sfx' ).'">'
.'<h1 class="phocaexif">'.Text::_('COM_PHOCAGALLERY_EXIF_INFO').':</h1>'
.'<table>'
.$this->t['infooutput']
.'</table>'
.'</div>';
if ($this->t['detailwindow'] == 7) {
echo PhocaGalleryUtils::getExtInfo();
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,771 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
use Joomla\CMS\Factory;
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Date\Date;
jimport( 'joomla.application.component.view');
class PhocaGalleryViewInfo extends HtmlView
{
public $t;
protected $params;
function display($tpl = null) {
$app = Factory::getApplication();
// PLUGIN WINDOW - we get information from plugin
$get = array();
$get['info'] = $app->input->get( 'info', '', 'string' );
$this->itemId = $app->input->get('Itemid', 0, 'int');
$this->t['infooutput'] = '';
$document = $app->getDocument();
$this->params = $app->getParams();
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
// CSS
PhocaGalleryRenderFront::renderAllCSS();
// PARAMS - Open window parameters - modal popup box or standard popup window
$this->t['detailwindow'] =$this->params->get( 'detail_window', 0 );
// Plugin information
if (isset($get['info']) && $get['info'] != '') {
$this->t['detailwindow'] = $get['info'];
}
// Close and Reload links (for different window types)
$close = PhocaGalleryRenderFront::renderCloseReloadDetail($this->t['detailwindow']);
$detail_window_close = $close['detailwindowclose'];
$detail_window_reload = $close['detailwindowreload'];
// PARAMS - Display Description in Detail window - set the font color
$this->t['detailwindowbackgroundcolor']=$this->params->get( 'detail_window_background_color', '#ffffff' );
$description_lightbox_font_color = $this->params->get( 'description_lightbox_font_color', '#ffffff' );
$description_lightbox_bg_color = $this->params->get( 'description_lightbox_bg_color', '#000000' );
$description_lightbox_font_size = $this->params->get( 'description_lightbox_font_size', 12 );
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
// NO SCROLLBAR IN DETAIL WINDOW
/* $document->addCustomTag( "<style type=\"text/css\"> \n"
." html,body, .contentpane{overflow:hidden;background:".$this->t['detailwindowbackgroundcolor'].";} \n"
." center, table {background:".$this->t['detailwindowbackgroundcolor'].";} \n"
." #sbox-window {background-color:#fff;padding:5px} \n"
." </style> \n");
*/
// PARAMS - Get image height and width
$this->t['boxlargewidth'] =$this->params->get( 'front_modal_box_width', 680 );
$this->t['boxlargeheight'] =$this->params->get( 'front_modal_box_height', 560 );
$front_popup_window_width = $this->t['boxlargewidth'];//since version 2.2
$front_popup_window_height = $this->t['boxlargeheight'];//since version 2.2
if ($this->t['detailwindow'] == 1) {
$this->t['windowwidth'] = $front_popup_window_width;
$this->t['windowheight'] = $front_popup_window_height;
} else {//modal popup window
$this->t['windowwidth'] = $this->t['boxlargewidth'];
$this->t['windowheight'] = $this->t['boxlargeheight'];
}
$this->t['largemapwidth'] = (int)$this->t['windowwidth'] - 20;
$this->t['largemapheight'] = (int)$this->t['windowheight'] - 20;
$this->t['googlemapsapikey'] =$this->params->get( 'google_maps_api_key', '' );
$this->t['exifinformation'] =$this->params->get( 'exif_information', 'FILE.FileName,FILE.FileDateTime,FILE.FileSize,FILE.MimeType,COMPUTED.Height,COMPUTED.Width,COMPUTED.IsColor,COMPUTED.ApertureFNumber,IFD0.Make,IFD0.Model,IFD0.Orientation,IFD0.XResolution,IFD0.YResolution,IFD0.ResolutionUnit,IFD0.Software,IFD0.DateTime,IFD0.Exif_IFD_Pointer,IFD0.GPS_IFD_Pointer,EXIF.ExposureTime,EXIF.FNumber,EXIF.ExposureProgram,EXIF.ISOSpeedRatings,EXIF.ExifVersion,EXIF.DateTimeOriginal,EXIF.DateTimeDigitized,EXIF.ShutterSpeedValue,EXIF.ApertureValue,EXIF.ExposureBiasValue,EXIF.MaxApertureValue,EXIF.MeteringMode,EXIF.LightSource,EXIF.Flash,EXIF.FocalLength,EXIF.SubSecTimeOriginal,EXIF.SubSecTimeDigitized,EXIF.ColorSpace,EXIF.ExifImageWidth,EXIF.ExifImageLength,EXIF.SensingMethod,EXIF.CustomRendered,EXIF.ExposureMode,EXIF.WhiteBalance,EXIF.DigitalZoomRatio,EXIF.FocalLengthIn35mmFilm,EXIF.SceneCaptureType,EXIF.GainControl,EXIF.Contrast,EXIF.Saturation,EXIF.Sharpness,EXIF.SubjectDistanceRange,GPS.GPSLatitudeRef,GPS.GPSLatitude,GPS.GPSLongitudeRef,GPS.GPSLongitude,GPS.GPSAltitudeRef,GPS.GPSAltitude,GPS.GPSTimeStamp,GPS.GPSStatus,GPS.GPSMapDatum,GPS.GPSDateStamp' );
// MODEL
$model = $this->getModel();
$this->info = $model->getData();
// Back button
/*$this->t['backbutton'] = '';
if ($this->t['detailwindow'] == 7) {
phocagalleryimport('phocagallery.image.image');
$this->t['backbutton'] = '<div><a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $this->info->catslug.'&Itemid='. $app->input->get('Itemid', 0, 'int')).'"'
.' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">'
. PhocaGalleryRenderFront::renderIcon('icon-up-images', 'media/com_phocagallery/images/icon-up-images.png', Text::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY'), 'ph-icon-up-images ph-icon-button').'</a></div>';
}*/
// EXIF DATA
$outputExif = '';
$originalFile = '';
$extImage = PhocaGalleryImage::isExtImage($this->info->extid);
if ($extImage && isset($this->info->exto) && $this->info->exto != '') {
$originalFile = $this->info->exto;
} else {
if (isset($this->info->filename)) {
$originalFile = PhocaGalleryFile::getFileOriginal($this->info->filename);
}
}
if ($originalFile != '' && function_exists('exif_read_data')) {
$exif = @exif_read_data( $originalFile, 'IFD0');
if ($exif === false) {
$outputExif .= Text::_('COM_PHOCAGALLERY_NO_HEADER_DATA_FOUND');
}
$setExif = $this->t['exifinformation'];
$setExifArray = explode(",", $setExif, 200);
$exif = @exif_read_data($originalFile, 0, true);
/* $this->t['infooutput'] = '';
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
$this->t['infooutput'] .= strtoupper($key.'.'.$name).'='.$name.'<br />';
$this->t['infooutput'] .= $key.'.'.$name.';';
}
}*/
$this->t['infooutput'] = '';
$i = 0;
foreach ($setExifArray as $ks => $vs) {
if ($i%2==0) {
$class = 'class="first"';
} else {
$class = 'class="second"';
}
if ($vs != '') {
$vsValues = explode(".", $vs, 2);
if (isset($vsValues[0])) {
$section = $vsValues[0];
} else {
$section = '';
}
if (isset($vsValues[1])) {
$name = $vsValues[1];
} else {
$name = '';
}
if ($section != '' && $name != '') {
if (isset($exif[$section][$name])) {
switch ($name) {
case 'FileDateTime':
jimport( 'joomla.utilities.date');
$date = new Date($exif[$section][$name]);
$exifValue = $date->format('d/m/Y, H:m');
break;
case 'FileSize':
$exifValue = PhocaGalleryFile::getFileSizeReadable($exif[$section][$name]);
break;
case 'Height':
case 'Width':
case 'ExifImageWidth':
case 'ExifImageLength':
$exifValue = $exif[$section][$name] . ' px';
break;
case 'IsColor':
switch((int)$exif[$section][$name]) {
case 0:
$exifValue = Text::_('COM_PHOCAGALLERY_NO');
break;
default:
$exifValue = Text::_('COM_PHOCAGALLERY_YES');
break;
}
break;
case 'ResolutionUnit':
switch((int)$exif[$section][$name]) {
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_INCH');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_CM');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_MM');
break;
case 5:
$exifValue = Text::_('COM_PHOCAGALLERY_MICRO');
break;
case 0:
case 1:
default:
$exifValue = '?';
break;
}
break;
case 'ExposureProgram':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_MANUAL');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_NORMAL_PROGRAM');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_APERTURE_PRIORITY');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_SHUTTER_PRIORITY');
break;
case 5:
$exifValue = Text::_('COM_PHOCAGALLERY_CREATIVE_PROGRAM');
break;
case 6:
$exifValue = Text::_('COM_PHOCAGALLERY_ACTION_PROGRAM');
break;
case 7:
$exifValue = Text::_('COM_PHOCAGALLERY_PORTRAIT_MODE');
break;
case 8:
$exifValue = Text::_('COM_PHOCAGALLERY_LANDSCAPE_MODE');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NOT_DEFINED');
break;
}
break;
case 'MeteringMode':
switch((int)$exif[$section][$name]) {
case 0:
$exifValue = Text::_('COM_PHOCAGALLERY_UNKNOWN');
break;
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_AVERAGE');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_CENTERWEIGHTEDAVERAGE');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_SPOT');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_MULTISPOT');
break;
case 5:
$exifValue = Text::_('COM_PHOCAGALLERY_PATTERN');
break;
case 6:
$exifValue = Text::_('COM_PHOCAGALLERY_PARTIAL');
break;
case 255:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_OTHER');
break;
}
break;
case 'LightSource':
switch((int)$exif[$section][$name]) {
case 0:
$exifValue = Text::_('COM_PHOCAGALLERY_UNKNOWN');
break;
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_DAYLIGHT');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_FLUORESCENT');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_TUNGSTEN');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_FLASH');
break;
case 9:
$exifValue = Text::_('COM_PHOCAGALLERY_FINEWEATHER');
break;
case 10:
$exifValue = Text::_('COM_PHOCAGALLERY_CLOUDYWEATHER');
break;
case 11:
$exifValue = Text::_('COM_PHOCAGALLERY_SHADE');
break;
case 12:
$exifValue = Text::_('COM_PHOCAGALLERY_DAYLIGHTFLUORESCENT');
break;
case 13:
$exifValue = Text::_('COM_PHOCAGALLERY_DAYWHITEFLUORESCENT');
break;
case 14:
$exifValue = Text::_('COM_PHOCAGALLERY_COOLWHITEFLUORESCENT');
break;
case 15:
$exifValue = Text::_('COM_PHOCAGALLERY_WHITEFLUORESCENT');
break;
case 17:
$exifValue = Text::_('COM_PHOCAGALLERY_STANDARDLIGHTA');
break;
case 18:
$exifValue = Text::_('COM_PHOCAGALLERY_STANDARDLIGHTB');
break;
case 19:
$exifValue = Text::_('COM_PHOCAGALLERY_STANDARDLIGHTC');
break;
case 20:
$exifValue = Text::_('COM_PHOCAGALLERY_D55');
break;
case 21:
$exifValue = Text::_('COM_PHOCAGALLERY_D65');
break;
case 22:
$exifValue = Text::_('COM_PHOCAGALLERY_D75');
break;
case 23:
$exifValue = Text::_('COM_PHOCAGALLERY_D50');
break;
case 24:
$exifValue = Text::_('COM_PHOCAGALLERY_ISOSTUDIOTUNGSTEN');
break;
case 255:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_OTHERLIGHTSOURCE');
break;
}
break;
case 'SensingMethod':
switch((int)$exif[$section][$name]) {
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_ONE-CHIP_COLOR_AREA_SENSOR');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_TWO-CHIP_COLOR_AREA_SENSOR');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_THREE-CHIP_COLOR_AREA_SENSOR');
break;
case 5:
$exifValue = Text::_('COM_PHOCAGALLERY_COLOR_SEQUENTIAL_AREA_SENSOR');
break;
case 7:
$exifValue = Text::_('COM_PHOCAGALLERY_TRILINEAR_SENSOR');
break;
case 8:
$exifValue = Text::_('COM_PHOCAGALLERY_COLOR_SEQUENTIAL_LINEAR_SENSOR');
break;
case 1:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NOT_DEFINED');
break;
}
break;
case 'CustomRendered':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_CUSTOM_PROCESS');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NORMAL_PROCESS');
break;
}
break;
case 'ExposureMode':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_MANUAL_EXPOSURE');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_AUTO_BRACKET');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_AUTO_EXPOSURE');
break;
}
break;
case 'WhiteBalance':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_MANUAL_WHITE_BALANCE');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_AUTO_WHITE_BALANCE');
break;
}
break;
case 'SceneCaptureType':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_LANDSCAPE');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_PORTRAIT');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_NIGHT_SCENE');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_STANDARD');
break;
}
break;
case 'GainControl':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_LOW_GAIN_UP');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_HIGH_GAIN_UP');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_LOW_GAIN_UP');
break;
case 4:
$exifValue = Text::_('COM_PHOCAGALLERY_HIGH_GAIN_UP');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NONE');
break;
}
break;
case 'ColorSpace':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_SRGB');
break;
case 'FFFF.H':
$exifValue = Text::_('COM_PHOCAGALLERY_UNCALIBRATED');
break;
case 0:
default:
$exifValue = '-';
break;
}
break;
case 'Contrast':
case 'Sharpness':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_SOFT');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_HARD');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NORMAL');
break;
}
break;
case 'Saturation':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_LOW_SATURATION');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_HIGH_SATURATION');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_NORMAL');
break;
}
break;
case 'SubjectDistanceRange':
switch((int)$exif[$section][$name]) {
case 1:
$exifValue = Text::_('COM_PHOCAGALLERY_MACRO');
break;
case 2:
$exifValue = Text::_('COM_PHOCAGALLERY_CLOSE_VIEW');
break;
case 3:
$exifValue = Text::_('COM_PHOCAGALLERY_DISTANT_VIEW');
break;
case 0:
default:
$exifValue = Text::_('COM_PHOCAGALLERY_UNKNOWN');
break;
}
break;
case 'GPSLatitude':
case 'GPSLongitude':
$exifValue = '';
//$gps = self::getGps($exif[$section][$name]);
if (isset($exif[$section][$name][0])) {
list($l,$r) = explode("/",$exif[$section][$name][0]);
$d = ($l/$r);
$exifValue .= $d . '&deg; ';
}
if (isset($exif[$section][$name][1])) {
list($l,$r) = explode("/",$exif[$section][$name][1]);
$m = ($l/$r);
if ($l%$r>0) {
$sNoInt = ($l/$r);
$sInt = ($l/$r);
$s = ($sNoInt - (int)$sInt)*60;
$exifValue .= (int)$m . '\' ' . $s . '" ';
} else {
$exifValue .= $m . '\' ';
if (isset($exif[$section][$name][2])) {
list($l,$r) = explode("/",$exif[$section][$name][2]);
$s = ($l/$r);
$exifValue .= $s . '" ';
}
}
}
break;
case 'GPSTimeStamp':
$exifValue = '';
if (isset($exif[$section][$name][0])) {
list($l,$r) = explode("/",$exif[$section][$name][0]);
$h = ($l/$r);
$exifValue .= $h . ' h ';
}
if (isset($exif[$section][$name][1])) {
list($l,$r) = explode("/",$exif[$section][$name][1]);
$m = ($l/$r);
$exifValue .= $m . ' m ';
}
if (isset($exif[$section][$name][2])) {
list($l,$r) = explode("/",$exif[$section][$name][2]);
$s = ($l/$r);
$exifValue .= $s . ' s ';
}
break;
case 'ExifVersion':
if (is_numeric($exif[$section][$name])) {
$exifValue = (int)$exif[$section][$name]/100;
} else {
$exifValue = $exif[$section][$name];
}
break;
case 'FocalLength':
if (isset($exif[$section][$name]) && $exif[$section][$name] != '') {
$focalLength = explode ('/', $exif[$section][$name]);
if (isset($focalLength[0]) && (int)$focalLength[0] > 0
&& isset($focalLength[1]) && (int)$focalLength[1] > 0 ) {
$exifValue = (int)$focalLength[0] / (int)$focalLength[1];
$exifValue = $exifValue . ' mm';
}
}
break;
case 'ExposureTime':
if (isset($exif[$section][$name]) && $exif[$section][$name] != '') {
$exposureTime = explode ('/', $exif[$section][$name]);
if (isset($exposureTime[0]) && (int)$exposureTime[0] > 0
&& isset($exposureTime[1]) && (int)$exposureTime[1] > 1 ) {
if ((int)$exposureTime[1] > (int)$exposureTime[0]) {
$exifValue = (int)$exposureTime[1] / (int)$exposureTime[0];
$exifValue = '1/'. $exifValue . ' sec';
}
}
}
break;
/*case 'ShutterSpeedValue':
if (isset($exif[$section][$name]) && $exif[$section][$name] != '') {
$shutterSpeedValue = explode ('/', $exif[$section][$name]);
if (isset($shutterSpeedValue[0]) && (int)$shutterSpeedValue[0] > 0
&& isset($shutterSpeedValue[1]) && (int)$shutterSpeedValue[1] > 1 ) {
if ((int)$shutterSpeedValue[1] > (int)$shutterSpeedValue[0]) {
$exifValue = (int)$shutterSpeedValue[1] / (int)$shutterSpeedValue[0];
$exifValue = '1/'. $exifValue . ' sec';
}
}
}
break;*/
default:
$exifValue = $exif[$section][$name];
break;
}
$vs = str_replace('.', '_', $vs);
$this->t['infooutput'] .= '<tr '.$class.'>'
//.'<td>'. JText::_($vs) . '('.$section.' '.$name.')</td>'
.'<td>'. Text::_('COM_PHOCAGALLERY_'.strtoupper($vs)) . '</td>'
.'<td>'.$exifValue. '</td>'
.'</tr>';
}
}
}
$i++;
}
}
$this->_prepareDocument($this->info);
parent::display($tpl);
}
protected function _prepareDocument($item) {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
$this->params = $app->getParams();
$title = null;
$this->t['gallerymetakey'] =$this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] =$this->params->get( 'gallery_metadesc', '' );
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
} else if ($app->get('sitename_pagetitles', 0) == 2) {
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
if ($item->metadesc != '') {
$this->document->setDescription($item->metadesc);
} else if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
if ($item->metakey != '') {
$this->document->setMetadata('keywords', $item->metakey);
} else if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
/*if ($app->get('MetaAuthor') == '1') {
$this->document->setMetaData('author', $this->item->author);
}
/*$mdata = $this->item->metadata->toArray();
foreach ($mdata as $k => $v) {
if ($v) {
$this->document->setMetadata($k, $v);
}
}*/
// Breadcrumbs TO DO (Add the whole tree)
/*if (isset($this->category[0]->parentid)) {
if ($this->category[0]->parentid == 1) {
} else if ($this->category[0]->parentid > 0) {
$pathway->addItem($this->category[0]->parenttitle, Route::_(PhocaDocumentationHelperRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
}
}
if (!empty($this->category[0]->title)) {
$pathway->addItem($this->category[0]->title);
}*/
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view hidden="true" />
</metadata>

View File

@ -0,0 +1,81 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
phocagalleryimport('phocagallery.render.rendermap');
phocagalleryimport('phocagallery.text.text');
if ($this->t['backbutton'] != '' && $this->t['enable_multibox_iframe'] != 1) {
echo $this->t['backbutton'];
}
if (empty($this->map) || $this->map->longitude == '' || $this->map->latitude == '') {
echo '<p>' . Text::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
$text = '<div style="text-align:left"><table style="" border="0" cellspacing="5" cellpadding="5"><tr><td align="left" colspan="2"><b>'. addslashes($this->map->geotitle).'</b></td></tr>';
$text .='<tr>';
$text .='<td valign="top" align="left">'.HTMLHelper::_( 'image', $this->map->thumbnail, addslashes($this->map->geotitle)) . '</td>';
$text .='<td valign="top" align="left">'. PhocaGalleryText::strTrimAll(addslashes($this->map->description)).'</td>';
$text .='</tr></table></div>';
$map = new PhocaGalleryRenderMap();
echo '<noscript>'.Text::_('COM_PHOCAGALLERY_ERROR_MAP_ENABLE_JAVASCRIPT').'</noscript>';
$cmw = '';
if ((int)$this->t['largemapwidth'] > 0) {
$cmw = 'width:'.$this->t['largemapwidth'].'px;';
}
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;text-align: center">';
echo '<div id="phocaMap" style="margin:0 auto;padding:0;'. $cmw. 'height:'.$this->t['largemapheight'].'px">';
echo '</div></div>';
//echo $map->loadApi();
?><script type='text/javascript'>//<![CDATA[
<?php
echo $map->createMap('phocaMap', 'mapPhocaMap', 'phocaLatLng', 'phocaOptions','tstPhocaMap', 'tstIntPhocaMap', $text);
echo $map->cancelEventF();
echo $map->checkMapF();
echo $map->startMapF();
echo $map->setLatLng( $this->map->latitude, $this->map->longitude );
echo $map->startOptions();
echo $map->setZoomOpt($this->map->zoom).','."\n";
echo $map->setCenterOpt().','."\n";
echo $map->setTypeControlOpt().','."\n";
echo $map->setNavigationControlOpt().','."\n";
echo $map->setScaleControlOpt(1).','."\n";
echo $map->setScrollWheelOpt(1).','."\n";
echo $map->setDisableDoubleClickZoomOpt(0).','."\n";
echo $map->setMapTypeOpt()."\n";
echo $map->endOptions();
echo $map->setMap();
// Markers
$iconOutput = $map->setMarkerIcon(0);
echo $iconOutput['js'];
echo $map->setMarker(1,$this->map->geotitle,$this->map->description,$this->map->latitude, $this->map->longitude, $iconOutput['icon'], $text );
echo $map->setListener();
echo $map->endMapF();
echo $map->setInitializeF();
?>//]]></script><?php
echo $map->loadApi();
}
if ($this->t['detailwindow'] == 7) {
echo '<div>&nbsp;</div>';
echo PhocaGalleryUtils::getExtInfo();
}
?>

View File

@ -0,0 +1,68 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
phocagalleryimport('phocagallery.render.rendermaposm');
phocagalleryimport('phocagallery.text.text');
if ($this->t['backbutton'] != '' && $this->t['enable_multibox_iframe'] != 1) {
echo $this->t['backbutton'];
}
if (empty($this->map) || $this->map->longitude == '' || $this->map->latitude == '') {
echo '<p>' . Text::_('COM_PHOCAGALLERY_ERROR_MAP_NO_DATA') . '</p>';
} else {
$text = '<div style="text-align:left"><table style="" border="0" cellspacing="5" cellpadding="5"><tr><td align="left" colspan="2"><b>'. addslashes((string)$this->map->geotitle).'</b></td></tr>';
$text .='<tr>';
$text .='<td valign="top" align="left">'.HTMLHelper::_( 'image', $this->map->thumbnail, addslashes((string)$this->map->geotitle)) . '</td>';
$text .='<td valign="top" align="left">'. PhocaGalleryText::strTrimAll(addslashes((string)$this->map->description)).'</td>';
$text .='</tr></table></div>';
$id = uniqid();
$map = new PhocaGalleryRenderMaposm($id);
echo '<noscript>'.Text::_('COM_PHOCAGALLERY_ERROR_MAP_ENABLE_JAVASCRIPT').'</noscript>';
$cmw = '';
if ((int)$this->t['largemapwidth'] > 0) {
$cmw = 'width:'.$this->t['largemapwidth'].'px;';
}
$cmw = 'width: 100%;';
//$cmh = 'height:'.$this->t['largemapheight'].'px';
$cmh = 'height: 100vh;';
echo '<div align="center" style="margin:0;padding:0;margin-top:10px;text-align: center">';
echo '<div id="phocaGalleryMap'.$id.'" style="margin:0 auto;padding:0;'. $cmw. $cmh.'">';
echo '</div></div>';
$map->loadAPI();
$map->loadCoordinatesJS();
$map->createMap($this->map->latitude, $this->map->longitude, $this->map->zoom);
$map->setMapType();
$map->setMarker(1, $this->map->geotitle,$this->map->description,$this->map->latitude, $this->map->longitude);
$map->renderFullScreenControl();
//$map->renderCurrentPosition();
//$map->renderSearch('', 'topleft');
$map->renderMap();
}
if ($this->t['detailwindow'] == 7) {
echo '<div>&nbsp;</div>';
echo PhocaGalleryUtils::getExtInfo();
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,264 @@
<?php
/*
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License version 2 or later;
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
jimport( 'joomla.application.component.view');
class PhocaGalleryViewMap extends HtmlView
{
public $t;
protected $params;
function display($tpl = null) {
$app = Factory::getApplication();
$document = Factory::getDocument();
$this->params = $app->getParams();
// PLUGIN WINDOW - we get information from plugin
$get = array();
$get['map'] = $app->input->get( 'map', '', 'string' );
$this->itemId = $app->input->get('Itemid', 0, 'int');
// Multibox
$get['mapwidth'] = $app->input->get( 'mapwidth', '', 'string' );
$get['mapheight'] = $app->input->get( 'mapheight', '', 'string' );
$this->t['enable_multibox'] = $this->params->get( 'enable_multibox', 0);
$this->t['enable_multibox_iframe'] = 0;
if ($get['mapwidth'] != '') {
// Seems we are in iframe
$this->t['enable_multibox_iframe'] = 1;
}
$this->t['enablecustomcss'] = $this->params->get( 'enable_custom_css', 0);
$this->t['customcss'] = $this->params->get( 'custom_css', '');
$this->t['map_type'] = $this->params->get( 'map_type', 2 );
// CSS
PhocaGalleryRenderFront::renderAllCSS();
// PARAMS - Open window parameters - modal popup box or standard popup window
$this->t['detailwindow'] = $this->params->get( 'detail_window', 0 );
// Plugin information
if (isset($get['map']) && $get['map'] != '') {
$this->t['detailwindow'] = $get['map'];
}
// Close and Reload links (for different window types)
$close = PhocaGalleryRenderFront::renderCloseReloadDetail($this->t['detailwindow']);
$detail_window_close = $close['detailwindowclose'];
$detail_window_reload = $close['detailwindowreload'];
// PARAMS - Display Description in Detail window - set the font color
$this->t['detailwindow'] = $this->params->get( 'detail_window', 0 );
$this->t['detailwindowbackgroundcolor']= $this->params->get( 'detail_window_background_color', '#ffffff' );
$description_lightbox_font_color = $this->params->get( 'description_lightbox_font_color', '#ffffff' );
$description_lightbox_bg_color = $this->params->get( 'description_lightbox_bg_color', '#000000' );
$description_lightbox_font_size = $this->params->get( 'description_lightbox_font_size', 12 );
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
if ($this->t['gallerymetakey'] != '') {
$document->setMetaData('keywords', $this->t['gallerymetakey']);
}
if ($this->t['gallerymetadesc'] != '') {
$document->setMetaData('description', $this->t['gallerymetadesc']);
}
// NO SCROLLBAR IN DETAIL WINDOW
if ($this->t['detailwindow'] == 7) {
} else {
$document->addCustomTag( "<style type=\"text/css\"> \n"
." html,body, .contentpane{overflow:hidden;background:".$this->t['detailwindowbackgroundcolor'].";} \n"
." center, table {background:".$this->t['detailwindowbackgroundcolor'].";} \n"
." #sbox-window {background-color:#fff;padding:5px} \n"
." </style> \n");
}
// PARAMS - Get image height and width
$this->t['largemapwidth'] = (int)$this->params->get( 'front_modal_box_width', 680 ) - 40;
$this->t['largemapheight'] = (int)$this->params->get( 'front_modal_box_height', 560 ) - 20;
// Multibox
if (isset($get['mapwidth']) && $get['mapwidth'] != '') {
$this->t['largemapwidth'] = $get['mapwidth'];
}
if (isset($get['mapheight']) && $get['mapheight'] != '') {
$this->t['largemapheight'] = $get['mapheight'];
}
// $this->t['googlemapsapikey'] = $this->params->get( 'google_maps_api_key', '' );
// MODEL
$model = $this->getModel();
$map = $model->getData();
phocagalleryimport('phocagallery.image.imagefront');
if (!empty($map)) {
if (isset($map->filename) && $map->filename != '') {
$file_thumbnail = PhocaGalleryImageFront::displayCategoryImageOrNoImage($map->filename, 'small');
$map->thumbnail = $file_thumbnail;
} else {
$map->thumbnail = '';
}
if (isset($map->latitude) && $map->latitude != '' && $map->latitude != 0
&& isset($map->longitude) && $map->longitude != '' && $map->longitude != 0 ) {
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
}
}
// Second try to get category data
if ((empty($map)) || ($map->longitude == '' && $map->latitude == '' && $map->geotitle == '')) {
$map = $model->getDataCategory();
if (!empty($map)) {
if (isset($map->latitude) && $map->latitude != '' && $map->latitude != 0
&& isset($map->longitude) && $map->longitude != '' && $map->longitude != 0 ) {
$map->thumbnail = '';
if ($map->geotitle == '') {
$map->geotitle = $map->title;
}
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
}
} else {
$map->longitude = '';
$map->latitude = '';
$map->zoom = 2;
$map->geotitle = '';
$map->catslug = '';
}
}
// Back button
$this->t['backbutton'] = '';
if ($this->t['detailwindow'] == 7) {
phocagalleryimport('phocagallery.image.image');
$this->t['backbutton'] = '<div><a href="'.Route::_('index.php?option=com_phocagallery&view=category&id='. $map->catslug.'&Itemid='. $app->input->get('Itemid', 0, 'int')).'"'
.' title="'.Text::_( 'COM_PHOCAGALLERY_BACK_TO_CATEGORY' ).'">'
. PhocaGalleryRenderFront::renderIcon('icon-up-images', 'media/com_phocagallery/images/icon-up-images.png', Text::_('COM_PHOCAGALLERY_BACK_TO_CATEGORY'), 'ph-icon-up-images ph-icon-button').'</a></div>';
}
// ASIGN
$this->tmpl = $this->t;
$this->map = $map;
$this->_prepareDocument($map);
if($this->t['map_type'] == 2){
parent::display('osm');
} else {
parent::display($tpl);
}
}
protected function _prepareDocument($item) {
$app = Factory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
$this->params = $app->getParams();
$title = null;
HTMLHelper::_('jquery.framework', false);
$this->t['gallerymetakey'] = $this->params->get( 'gallery_metakey', '' );
$this->t['gallerymetadesc'] = $this->params->get( 'gallery_metadesc', '' );
$menu = $menus->getActive();
if ($menu) {
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
} else {
$this->params->def('page_heading', Text::_('JGLOBAL_ARTICLES'));
}
$title = $this->params->get('page_title', '');
if (empty($title)) {
$title = htmlspecialchars_decode($app->get('sitename'));
} else if ($app->get('sitename_pagetitles', 0) == 1) {
$title = Text::sprintf('JPAGETITLE', htmlspecialchars_decode($app->get('sitename')), $title);
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
} else if ($app->get('sitename_pagetitles', 0) == 2) {
if (isset($item->title) && $item->title != '') {
$title = $title .' - ' . $item->title;
}
$title = Text::sprintf('JPAGETITLE', $title, htmlspecialchars_decode($app->get('sitename')));
}
$this->document->setTitle($title);
/*
if ($item->metadesc != '') {
$this->document->setDescription($item->metadesc);
} else */ if ($this->t['gallerymetadesc'] != '') {
$this->document->setDescription($this->t['gallerymetadesc']);
} else if ($this->params->get('menu-meta_description', '')) {
$this->document->setDescription($this->params->get('menu-meta_description', ''));
}
/*
if ($item->metakey != '') {
$this->document->setMetadata('keywords', $item->metakey);
} else*/ if ($this->t['gallerymetakey'] != '') {
$this->document->setMetadata('keywords', $this->t['gallerymetakey']);
} else if ($this->params->get('menu-meta_keywords', '')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', ''));
}
if ($app->get('MetaTitle') == '1' && $this->params->get('menupage_title', '')) {
$this->document->setMetaData('title', $this->params->get('page_title', ''));
}
/*if ($app->get('MetaAuthor') == '1') {
$this->document->setMetaData('author', $this->item->author);
}
/*$mdata = $this->item->metadata->toArray();
foreach ($mdata as $k => $v) {
if ($v) {
$this->document->setMetadata($k, $v);
}
}*/
// Breadcrumbs TO DO (Add the whole tree)
/*if (isset($this->category[0]->parentid)) {
if ($this->category[0]->parentid == 1) {
} else if ($this->category[0]->parentid > 0) {
$pathway->addItem($this->category[0]->parenttitle, Route::_(PhocaDocumentationHelperRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
}
}
if (!empty($this->category[0]->title)) {
$pathway->addItem($this->category[0]->title);
}*/
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,122 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
//JHtml::_('behavior.tooltip');
$js = '
function insertPGLink() {
if (!Joomla.getOptions(\'xtd-phocagallery\')) {
return false;
}
var _Joomla$getOptions = Joomla.getOptions(\'xtd-phocagallery\'), editor = _Joomla$getOptions.editor;
var imagecategories = document.getElementById("imagecategories").value;
if (imagecategories != \'\') {
imagecategories = "|imagecategories="+imagecategories;
}
var imagecategoriessize = document.getElementById("imagecategoriessize").value;
if (imagecategoriessize != \'\') {
imagecategoriessize = "|imagecategoriessize="+imagecategoriessize;
}
var hideCategoriesOutput = \'\';
hidecategories = getSelectedData();
if (hidecategories != \'\') {
hideCategoriesOutput = "|hidecategories="+hidecategories;
}
var tag = "{phocagallery view=categories"+imagecategories+imagecategoriessize+hideCategoriesOutput+"}";
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
if (window.parent.Joomla.Modal) {
window.parent.Joomla.Modal.getCurrent().close();
}
return false;
}
function getSelectedData(array) {
var selected = new Array();
var dataSelect = document.forms["adminFormLink"].elements["hidecategories"];
if (dataSelect === undefined ) {
return \'\';
}
for(j = 0; j < dataSelect.options.length; j++){
if (dataSelect.options[j].selected) {
selected.push(dataSelect.options[j].value); }
}
if (array != \'true\') {
return selected.toString();
} else {
return selected;
}
}';
Factory::getDocument()->addScriptDeclaration($js);
?>
<div id="phocagallery-links">
<fieldset class="adminform options-menu options-form">
<legend><?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORIES' ); ?></legend>
<form name="adminFormLink" id="adminFormLink">
<div class="control-group">
<div class="control-label">
<label for="imagecategories">
<?php echo Text::_( 'COM_PHOCAGALLERY_DISPLAY_IMAGES' ); ?>
</label>
</div>
<div class="controls">
<select name="imagecategories" id="imagecategories" class="form-select">
<option value="0" ><?php echo Text::_( 'COM_PHOCAGALLERY_NO' ); ?></option>
<option value="1" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_YES' ); ?></option>
</select>
</div>
</div>
<div class="control-group">
<div class="control-label">
<label for="imagecategoriessize">
<?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_SIZE' ); ?>
</label>
</div>
<div class="controls">
<select name="imagecategoriessize" id="imagecategoriessize" class="form-select">
<option value="0"><?php echo Text::_( 'COM_PHOCAGALLERY_SMALL' ); ?></option>
<option value="1" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_MEDIUM' ); ?></option>
</select>
</div>
</div>
<div class="control-group">
<div class="control-label">
<label for="hidecategories">
<?php echo Text::_( 'COM_PHOCAGALLERY_HIDE_CATEGORIES' ); ?>
</label>
</div>
<div class="controls">
<?php echo $this->categoriesoutput;?>
</div>
</div>
<div class="btn-box-submit">
<button class="btn btn-primary plg-button-insert " onclick="insertPGLink();"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCAGALLERY_INSERT_CODE'); ?></button>
</div>
</form>
</fieldset>
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCAGALLERY_BACK') ?></a></div>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,85 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\HTML\HTMLHelper;
jimport( 'joomla.application.component.view' );
phocagalleryimport('phocagallery.render.renderadminviews');
class phocaGalleryViewphocaGalleryLinkCats extends HtmlView
{
protected $r;
protected $t;
protected $categoriesoutput;
function display($tpl = null) {
$app = Factory::getApplication();
$this->r = new PhocaGalleryRenderAdminViews();
$this->t = PhocaGalleryUtils::setVars('link');
//Frontend Changes
$tUri = '';
if (!$app->isClient('administrator')) {
$tUri = Uri::base();
phocagalleryimport('phocagallery.render.renderadmin');
}
$editor = $app->input->getCmd('editor', '');
if (!empty($editor)) {
$this->document->addScriptOptions('xtd-phocagallery', array('editor' => $editor));
}
HTMLHelper::_('jquery.framework', false);
HTMLHelper::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocagallery/css/phocagallery.css' );
$eName = $app->input->getCmd('editor', '');
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
$this->t['backlink'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinks&amp;tmpl=component&amp;editor='.$this->t['ename'];
// Category Tree
$db = Factory::getDBO();
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parentid'
. ' FROM #__phocagallery_categories AS a'
// . ' WHERE a.published = 1' You can hide not published and not authorized categories too
// . ' AND a.approved = 1'
. ' ORDER BY a.ordering';
$db->setQuery( $query );
$categories = $db->loadObjectList();
$tree = array();
$text = '';
$tree = PhocaGalleryCategoryhtml::CategoryTreeOption($categories, $tree, 0, $text, -1);
//-----------------------------------------------------------------------
// Multiple
$ctrl = 'hidecategories';
$attribs = ' ';
$attribs .= ' size="5"';
//$attribs .= 'class="'.$v.'"';
$attribs .= ' class="form-control"';
$attribs .= ' multiple="multiple"';
$ctrl .= '';
//$value = implode( '|', )
$this->categoriesoutput = HTMLHelper::_('select.genericlist', $tree, $ctrl, $attribs, 'value', 'text', 0, 'hidecategories' );
parent::display($tpl);
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,309 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
$user = Factory::getUser();
//Ordering allowed ?
$ordering = ($this->lists['order'] == 'a.ordering');
//JHtml::_('behavior.tooltip');
$js = '
function insertLink() {';
$items = array('imageshadow', 'fontcolor', 'bgcolor', 'bgcolorhover', 'imagebgcolor', 'bordercolor', 'bordercolorhover', 'detail','displayname', 'displaydetail', 'displaydownload', 'displaybuttons', 'displaydescription', 'descriptionheight' ,'namefontsize', 'namenumchar', 'enableswitch', 'overlib', 'piclens','float', 'boxspace', 'displayimgrating', 'pluginlink', 'type', 'minboxwidth' );
$itemsArrayOutput = '';
foreach ($items as $key => $value) {
$js .= 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
.'if ('.$value.' != \'\') {'. "\n"
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
.'}';
$itemsArrayOutput .= '+'.$value;
}
$js .= '
/* Category */
var categoryid = document.getElementById("filter_catid").value;
var categoryIdOutput = \'\';
if (categoryid != \'\') {
categoryIdOutput = "|categoryid="+categoryid;
}
/* Image */
var imageIdOutput = \'\';
len = document.getElementsByName("imageid").length;
for (i = 0; i <len; i++) {
if (document.getElementsByName(\'imageid\')[i].checked) {
imageid = document.getElementsByName(\'imageid\')[i].value;
if (imageid != \'\' && parseInt(imageid) > 0) {
imageIdOutput = "|imageid="+imageid;
} else {
imageIdOutput = \'\';
}
}
}
if (categoryIdOutput != \'\' && parseInt(categoryid) > 0) {
/*return false;*/
} else {
alert("'. Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ).'");
return false;
}
if (imageIdOutput != \'\' && parseInt(imageid) > 0) {
/*return false;*/
} else {
alert("'. Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_IMAGE', true ).'");
return false;
}
var tag = "{phocagallery view=category"+categoryIdOutput+imageIdOutput'. $itemsArrayOutput .'+"}";
window.parent.jInsertEditorText(tag, \''. $this->t['ename'].'\');
window.parent.SqueezeBox.close();
}';
Factory::getDocument()->addScriptDeclaration($js);
?>
<div id="phocagallery-links">
<fieldset class="adminform">
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
<table class="admintable" width="100%">
<tr>
<td class="key" align="right" width="20%">
<label for="title">
<?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?>
</label>
</td>
<td width="80%">
<input type="text" name="search" id="search" value="<?php echo PhocaGalleryText::filterValue($this->lists['search'], 'text');?>" class="text_area" onchange="document.adminForm.submit();" />
<button onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
<button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button>
</td>
</tr>
<tr>
<td class="key" align="right" nowrap="nowrap">
<label for="title" nowrap="nowrap">
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
</label>
</td>
<td><?php echo $this->lists['catid']; ?></td>
</tr>
</table>
<div id="editcell">
<table class="adminlist">
<thead>
<tr>
<th width="1"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
<th width="1"></th>
<th class="image" width="2" align="center"><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></th>
<th class="title" width="50%"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th width="20%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_FILENAME', 'a.filename', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th width="1%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$k = 0;
for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
$row = &$this->items[$i];
?>
<tr class="<?php echo "row$k"; ?>">
<td><?php echo $this->t['pagination']->getRowOffset( $i ); ?></td>
<td><input type="radio" name="imageid" value="<?php echo $row->id ?>" /></td>
<td align="center" valign="middle">
<div class="phocagallery-box-file">
<center>
<div class="phocagallery-box-file-first">
<div class="phocagallery-box-file-second">
<div class="phocagallery-box-file-third">
<center>
<?php
// PICASA of FB
if (isset($row->extid) && $row->extid !='') {
$resW = explode(',', $row->extw);
$resH = explode(',', $row->exth);
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50);
//echo JHtml::_( 'image', $row->exts.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
echo '<img src="'.$row->exts.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
} else if (isset ($row->fileoriginalexist) && $row->fileoriginalexist == 1) {
$imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small');
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
//echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
echo '<img src="'.Uri::root().$row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
} else {
//echo JHtml::_( 'image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif');
echo '<img src="'.Uri::root().'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif'.'" alt="" />';
}
?>
</center>
</div>
</div>
</div>
</center>
</div>
</td>
<?php echo '<td>'. $row->title.'</td>';
if (isset($row->extid) && $row->extid !='') {
if (isset($row->exttype) && $row->exttype == 1) {
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_FACEBOOK_STORED_FILE').'</td>';
} else {
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_PICASA_STORED_FILE').'</td>';
}
} else {
echo '<td>' .$row->filename.'</td>';
} ?>
<td align="center"><?php echo $row->id; ?></td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
<tfoot>
<tr>
<td colspan="6"><?php echo $this->t['pagination']->getListFooter(); ?></td>
</tr>
</tfoot>
</table>
</div>
<input type="hidden" name="controller" value="phocagallerylinkimg" />
<input type="hidden" name="type" value="<?php echo $this->t['type']; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
</form>
<form name="adminFormLink" id="adminFormLink">
<table class="admintable" width="100%">
<?php
/*
?>
<tr>
<td class="key" align="right" width="20%"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BACKGROUND_SHADOW' ); ?></label></td>
<td width="80%">
<select name="imageshadow" id="imageshadow">
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
<option value="none" ><?php echo Text::_('COM_PHOCAGALLERY_NONE'); ?></option>
<option value="shadow1" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW1' ); ?></option>
<option value="shadow2" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW2' ); ?></option>
<option value="shadow3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW3' ); ?></option>
</select>
</td>
</tr>
// Colors
$itemsColor = array ('fontcolor' => 'COM_PHOCAGALLERY_FIELD_FONT_COLOR_LABEL', 'bgcolor' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_LABEL', 'bgcolorhover' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_HOVER_LABEL', 'imagebgcolor' => 'COM_PHOCAGALLERY_FIELD_IMAGE_BACKGROUND_COLOR_LABEL', 'bordercolor' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_LABEL', 'bordercolorhover' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_HOVER_LABEL');
foreach ($itemsColor as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="20%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /><span style="margin-left:10px" onclick="openPicker(\''.$key.'\')" class="picker_buttons">'. Text::_('COM_PHOCAGALLERY_PICK_COLOR').'</span></td>'
.'</tr>';
}
<tr>
<td class="key" align="right" width="20%"><label for="detail"><?php echo Text::_( 'COM_PHOCAGALLERY_DETAIL_WINDOW' ); ?></label></td>
<td width="80%">
<select name="detail" id="detail" class="form-control">
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
<option value="1" ><?php echo Text::_( 'COM_PHOCAGALLERY_STANDARD_POPUP_WINDOW' ); ?></option>
<option value="0" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX' ); ?></option>
<option value="2" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX_IMAGE_ONLY' ); ?></option>
<option value="3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOWBOX' ); ?></option>
<option value="4" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE' ); ?></option>
<option value="5" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE_IMAGE_ONLY' ); ?></option>
<option value="6" ><?php echo Text::_( 'COM_PHOCAGALLERY_JAK_LIGHTBOX' ); ?></option>
<option value="8" ><?php echo Text::_( 'COM_PHOCAGALLERY_SLIMBOX' ); ?></option>
<?php /*<option value="7" >No Popup</option>*/ ?>
</select></td>
</tr>
<?php
echo '<tr>'
.'<td class="key" align="right" width="20%"><label for="pluginlink">'.Text::_('COM_PHOCAGALLERY_PLUGIN_LINK').'</label></td>'
.'<td nowrap><select name="pluginlink" id="pluginlink" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>';
echo '<tr>'
.'<td class="key" align="right" width="20%"><label for="type">'.Text::_('COM_PHOCAGALLERY_PLUGIN_TYPE').'</label></td>'
.'<td nowrap><select name="type" id="type" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_MOSAIC' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LARGE_IMAGE' ).'</option>';
// yes/no
/*
$itemsYesNo = array ('displayname' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_NAME_LABEL', 'displaydetail' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DETAIL_ICON_LABEL', 'displaydownload' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DOWNLOAD_ICON_LABEL', 'displaybuttons' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_BUTTONS_LABEL', 'displaydescription' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DESCRIPTION_DETAIL_LABEL', 'displayimgrating' => 'COM_PHOCAGALLERY_DISPLAY_IMAGE_RATING' );
foreach ($itemsYesNo as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="20%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
.'<td nowrap><select name="'.$key.'" id="'.$key.'" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>';
if ($key == 'displaydownload') {
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_SHOW_DIRECT_DOWNLOAD' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
} else {
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
}
echo '</select></td>'
.'</tr>';
}*/
?>
<tr>
<td>&nbsp;</td>
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
</tr>
</table>
</form>
</fieldset>
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
</div>

View File

@ -0,0 +1,300 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
$user = Factory::getUser();
//Ordering allowed ?
$ordering = ($this->lists['order'] == 'a.ordering');
$view = 'category';
if($this->t['type'] == 5) {
$view = 'category-masonry';
}
//JHtml::_('behavior.tooltip');
?>
<script type="text/javascript">
//<![CDATA[
function insertLink() {
if (!Joomla.getOptions('xtd-phocagallery')) {
return false;
}
var _Joomla$getOptions = Joomla.getOptions('xtd-phocagallery'), editor = _Joomla$getOptions.editor;
<?php
/*$items = array('imageshadow', 'fontcolor', 'bgcolor', 'bgcolorhover', 'imagebgcolor', 'bordercolor', 'bordercolorhover', 'detail','displayname', 'displaydetail', 'displaydownload', 'displaybuttons', 'displaydescription', 'descriptionheight' ,'namefontsize', 'namenumchar', 'enableswitch', 'overlib', 'piclens','float', 'boxspace', 'displayimgrating', 'pluginlink', 'type', 'imageordering', 'minboxwidth' );
$itemsArrayOutput = '';
foreach ($items as $key => $value) {
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
.'if ('.$value.' != \'\') {'. "\n"
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
.'}';
$itemsArrayOutput .= '+'.$value;
}*/
?>
/* LimitStart*/
var limitStartOutput = '';
var limitstart = document.getElementById("limitstartparam").value;
if (limitstart != '') {
limitStartOutput = "|limitstart="+limitstart;
}
/* LimitCount*/
var limitCountOutput = '';
var limitcount = document.getElementById("limitcountparam").value;
if (limitcount != '') {
limitCountOutput = "|limitcount="+limitcount;
}
/* max*/
var maxOutput = '';
var max = document.getElementById("maxparam").value;
if (max != '') {
maxOutput = "|max="+max;
}
/* ImageOrdering*/
var imageOrderingOutput = '';
var imageordering = document.getElementById("imageordering").value;
if (imageordering != '') {
imageOrderingOutput = "|imageordering="+imageordering;
}
/* Category */
var categoryid = document.getElementById("filter_catid").value;
var categoryIdOutput = '';
if (categoryid != '') {
categoryIdOutput = "|categoryid="+categoryid;
}
if (limitStartOutput != '') {
/*return false;*/
} else {
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_LIMIT_START', true ); ?>");
return false;
}
if (limitCountOutput != '') {
/*return false;*/
} else {
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_LIMIT_COUNT', true ); ?>");
return false;
}
if (categoryIdOutput != '' && parseInt(categoryid) > 0) {
/*return false;*/
} else {
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ); ?>");
return false;
}
var tag = "{phocagallery view=<?php echo $view ?>"+categoryIdOutput+limitStartOutput+limitCountOutput+maxOutput+imageOrderingOutput<?php /*echo $itemsArrayOutput*/ ?>+"}";
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
if (window.parent.Joomla.Modal) {
window.parent.Joomla.Modal.getCurrent().close();
}
return false;
<?php /*window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
window.parent.SqueezeBox.close(); */ ?>
}
//]]>
</script>
<div id="phocagallery-links">
<fieldset class="adminform options-menu options-form">
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGES'); ?></legend>
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
<div class="control-group">
<div class="control-label"><label for="title" ><?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?></label></div>
<div class="controls"><?php echo $this->lists['catid']; ?></div>
</div>
<div class="control-group">
<div class="control-label"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_LIMIT_START' ); ?></label></div>
<div class="controls"><?php echo $this->lists['limitstartparam'];?></div>
</div>
<div class="control-group">
<div class="control-label"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_LIMIT_COUNT' ); ?></label></div>
<div class="controls"><?php echo $this->lists['limitcountparam'];?></div>
</div>
<div class="control-group">
<div class="control-label"><label for="imagemax"><?php echo Text::_( 'COM_PHOCAGALLERY_MAX_NUMBER_IMAGES' ); ?></label></div>
<div class="controls"><input type="text" name="maxparam" id="maxparam" value="" class="form-control"></div>
</div>
<input type="hidden" name="controller" value="phocagallerylinkimg" />
<input type="hidden" name="type" value="<?php echo (int)$this->t['type']; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
</form>
<form name="adminFormLink" id="adminFormLink">
<div class="control-group">
<div class="control-label">
<label for="imageordering"><?php echo Text::_( 'COM_PHOCAGALLERY_FIELD_IMAGE_ORDERING_LABEL' ); ?></label>
</div>
<div class="controls"><select name="imageordering" id="imageordering" class="form-select">
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
<option value="1"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_ASC')?></option>
<option value="2"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_DESC')?></option>
<option value="3"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_ASC')?></option>
<option value="4"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_DESC')?></option>
<option value="5"><?php echo Text::_('COM_PHOCAGALLERY_DATE_ASC')?></option>
<option value="6"><?php echo Text::_('COM_PHOCAGALLERY_DATE_DESC')?></option>
<option value="7"><?php echo Text::_('COM_PHOCAGALLERY_ID_ASC')?></option>
<option value="8"><?php echo Text::_('COM_PHOCAGALLERY_ID_DESC')?></option>
<option value="9"><?php echo Text::_('COM_PHOCAGALLERY_RANDOM')?></option>
</select>
</div>
</div>
<?php /*
// Colors
$itemsColor = array ('fontcolor' => 'COM_PHOCAGALLERY_FIELD_FONT_COLOR_LABEL', 'bgcolor' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_LABEL', 'bgcolorhover' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_HOVER_LABEL', 'imagebgcolor' => 'COM_PHOCAGALLERY_FIELD_IMAGE_BACKGROUND_COLOR_LABEL', 'bordercolor' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_LABEL', 'bordercolorhover' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_HOVER_LABEL');
foreach ($itemsColor as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /><span style="margin-left:10px" onclick="openPicker(\''.$key.'\')" class="picker_buttons">'. Text::_('COM_PHOCAGALLERY_PICK_COLOR').'</span></td>'
.'</tr>';
}
?>
<tr>
<td class="key" align="right" width="30%"><label for="detail"><?php echo Text::_( 'COM_PHOCAGALLERY_DETAIL_WINDOW' ); ?></label></td>
<td width="70%">
<select name="detail" id="detail" class="form-control">
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
<option value="1" ><?php echo Text::_( 'COM_PHOCAGALLERY_STANDARD_POPUP_WINDOW' ); ?></option>
<option value="0" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX' ); ?></option>
<option value="2" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX_IMAGE_ONLY' ); ?></option>
<option value="3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOWBOX' ); ?></option>
<option value="4" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE' ); ?></option>
<option value="5" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE_IMAGE_ONLY' ); ?></option>
<option value="6" ><?php echo Text::_( 'COM_PHOCAGALLERY_JAK_LIGHTBOX' ); ?></option>
<option value="8" ><?php echo Text::_( 'COM_PHOCAGALLERY_SLIMBOX' ); ?></option>
<?php /*<option value="7" >No Popup</option>*//* ?>
</select></td>
</tr>
<?php
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="pluginlink">'.Text::_('COM_PHOCAGALLERY_PLUGIN_LINK').'</label></td>'
.'<td nowrap><select name="pluginlink" id="pluginlink" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>';
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="type">'.Text::_('COM_PHOCAGALLERY_PLUGIN_TYPE').'</label></td>'
.'<td nowrap><select name="type" id="type" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_MOSAIC' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LARGE_IMAGE' ).'</option>';
// yes/no
$itemsYesNo = array ('displayname' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_NAME_LABEL', 'displaydetail' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DETAIL_ICON_LABEL', 'displaydownload' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DOWNLOAD_ICON_LABEL', 'displaybuttons' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_BUTTONS_LABEL', 'displaydescription' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DESCRIPTION_DETAIL_LABEL', 'displayimgrating' => 'COM_PHOCAGALLERY_DISPLAY_IMAGE_RATING' );
foreach ($itemsYesNo as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
.'<td nowrap><select name="'.$key.'" id="'.$key.'" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>';
if ($key == 'displaydownload') {
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_SHOW_DIRECT_DOWNLOAD' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
} else {
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
}
echo '</select></td>'
.'</tr>';
}
// Number
$itemsNumber = array ('descriptionheight' => 'COM_PHOCAGALLERY_FIELD_DESCRIPTION_DETAIL_HEIGHT_LABEL','namefontsize' => 'COM_PHOCAGALLERY_FIELD_FONT_SIZE_NAME_LABEL', 'namenumchar' => 'COM_PHOCAGALLERY_FIELD_CHAR_LENGTH_NAME_LABEL', 'boxspace' => 'COM_PHOCAGALLERY_FIELD_CATEGORY_BOX_SPACE_LABEL','minboxwidth' => 'COM_PHOCAGALLERY_MIN_BOX_WIDTH');
foreach ($itemsNumber as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /></td>'
.'</tr>';
}
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="enableswitch">'.Text::_('COM_PHOCAGALLERY_SWITCH_IMAGE').'</label></td>'
.'<td nowrap><select name="enableswitch" id="enableswitch" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_ENABLE' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_DISABLE' ).'</option>';
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="overlib">'.Text::_('COM_PHOCAGALLERY_FIELD_OVERLIB_EFFECT_LABEL').'</label></td>'
.'<td nowrap><select name="overlib" id="overlib" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_NONE' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_ONLY_IMAGE' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_ONLY_DESCRIPTION' ).'</option>'
.'<option value="3" >'.Text::_( 'COM_PHOCAGALLERY_IMAGE_AND_DESCRIPTION' ).'</option>';
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="piclens">'.Text::_('COM_PHOCAGALLERY_ENABLE_COOLIRIS').'</label></td>'
.'<td nowrap><select name="piclens" id="piclens" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_NO' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_YES' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_FIELD_YES_START_COOLIRIS' ).'</option>';
?>
<tr>
<td class="key" align="right" width="30%"><label for="float"><?php echo Text::_( 'COM_PHOCAGALLERY_FLOAT_IMAGE' ); ?></label></td>
<td width="70%">
<select name="float" id="float">
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
<option value="left" ><?php echo Text::_( 'COM_PHOCAGALLERY_LEFT' ); ?></option>
<option value="right" ><?php echo Text::_( 'COM_PHOCAGALLERY_RIGHT' ); ?></option>
</select>
</td>
</tr>
*/
?>
<div class="btn-box-submit">
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCAGALLERY_INSERT_CODE'); ?></button>
</div>
</form>
</fieldset>
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCAGALLERY_BACK') ?></a></div>
</div>

View File

@ -0,0 +1,143 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
$user = Factory::getUser();
//Ordering allowed ?
$ordering = ($this->lists['order'] == 'a.ordering');
//JHtml::_('behavior.tooltip');
?>
<script type="text/javascript">
//<![CDATA[
function insertLink() {
<?php
$items = array('width', 'height', 'delay', 'image', 'pgslink', 'imageordering' );
$itemsArrayOutput = '';
foreach ($items as $key => $value) {
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
.'if ('.$value.' != \'\') {'. "\n"
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
.'}';
$itemsArrayOutput .= '+'.$value;
}
?>
/* Category */
var categoryid = document.getElementById("filter_catid").value;
var categoryIdOutput = '';
if (categoryid != '') {
categoryIdOutput = "id="+categoryid;
}
if (categoryIdOutput != '' && parseInt(categoryid) > 0) {
/*return false;*/
} else {
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ); ?>");
return false;
}
var tag = "{pgslideshow "+categoryIdOutput<?php echo $itemsArrayOutput ?>+"}";
window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
window.parent.SqueezeBox.close();
}
//]]>
</script>
<div id="phocagallery-links">
<fieldset class="adminform">
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
<table class="admintable" width="100%">
<tr>
<td class="key" align="right" nowrap="nowrap" width="30%" >
<label for="title" nowrap="nowrap" >
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
</label>
</td width="70%">
<td><?php echo $this->lists['catid']; ?></td>
</tr>
</table>
<input type="hidden" name="controller" value="phocagallerylinkimg" />
<input type="hidden" name="type" value="<?php echo (int)$this->t['type']; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
</form>
<form name="adminFormLink" id="adminFormLink">
<table class="admintable" width="100%">
<?php
// Number
$itemsNumber = array ('width' => array('COM_PHOCAGALLERY_SLIDESHOW_WIDTH', 640),'height' => array('COM_PHOCAGALLERY_SLIDESHOW_HEIGHT',480), 'delay' => array('COM_PHOCAGALLERY_SLIDESHOW_DELAY',3000));
foreach ($itemsNumber as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value[0]).'</label></td>'
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="'.$value[1].'" class="text_area" /></td>'
.'</tr>';
}
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="image">'.Text::_('COM_PHOCAGALLERY_IMAGE').'</label></td>'
.'<td nowrap><select name="image" id="image" class="form-control">'
.'<option value="L" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_LARGE' ).'</option>'
.'<option value="M" >'.Text::_( 'COM_PHOCAGALLERY_MEDIUM' ).'</option>'
.'<option value="S" >'.Text::_( 'COM_PHOCAGALLERY_SMALL' ).'</option>'
.'<option value="O" >'.Text::_( 'COM_PHOCAGALLERY_ORIGINAL_IMAGE' ).'</option>'
.'</select></td></tr>';
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="pgslink">'.Text::_('COM_PHOCAGALLERY_SLIDESHOW_LINK').'</label></td>'
.'<td nowrap><select name="pgslink" id="pgslink" class="form-control">'
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>'
.'</select></td></tr>';
?>
<tr>
<td class="key" align="right" width="30%"><label for="imageordering"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_ORDERING' ); ?></label></td>
<td><select name="imageordering" id="imageordering" class="form-control">
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
<option value="1"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_ASC')?></option>
<option value="2"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_DESC')?></option>
<option value="3"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_ASC')?></option>
<option value="4"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_DESC')?></option>
<option value="5"><?php echo Text::_('COM_PHOCAGALLERY_DATE_ASC')?></option>
<option value="6"><?php echo Text::_('COM_PHOCAGALLERY_DATE_DESC')?></option>
<option value="7"><?php echo Text::_('COM_PHOCAGALLERY_ID_ASC')?></option>
<option value="8"><?php echo Text::_('COM_PHOCAGALLERY_ID_DESC')?></option>
<option value="9"><?php echo Text::_('COM_PHOCAGALLERY_RANDOM')?></option>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
</tr>
</table>
</form>
</fieldset>
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
</div>

View File

@ -0,0 +1,228 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
$user = Factory::getUser();
//Ordering allowed ?
$ordering = ($this->lists['order'] == 'a.ordering');
//JHtml::_('behavior.tooltip');
?>
<script type="text/javascript">
//<![CDATA[
function insertLink() {
<?php
$items = array('switchheight', 'switchwidth', 'switchfixedsize' );
$itemsArrayOutput = '';
foreach ($items as $key => $value) {
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
.'if ('.$value.' != \'\') {'. "\n"
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
.'}';
$itemsArrayOutput .= '+'.$value;
}
?>
/* Image */
var imageIdOutput = '';
len = document.getElementsByName("imageid").length;
for (i = 0; i <len; i++) {
if (document.getElementsByName('imageid')[i].checked) {
imageid = document.getElementsByName('imageid')[i].value;
if (imageid != '' && parseInt(imageid) > 0) {
imageIdOutput = "|basicimageid="+imageid;
} else {
imageIdOutput = '';
}
}
}
if (imageIdOutput != '' && parseInt(imageid) > 0) {
/*return false;*/
} else {
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_IMAGE', true ); ?>");
return false;
}
var tag = "{phocagallery view=switchimage"+imageIdOutput<?php echo $itemsArrayOutput ?>+"}";
window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
window.parent.SqueezeBox.close();
}
//]]>
</script>
<div id="phocagallery-links">
<fieldset class="adminform">
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
<table class="admintable" width="100%">
<tr>
<td class="key" align="right" width="30%">
<label for="title">
<?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?>
</label>
</td>
<td width="70%">
<input type="text" name="search" id="search" value="<?php echo $this->lists['search'];?>" class="text_area" onchange="document.adminForm.submit();" />
<button onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
<button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button>
</td>
</tr>
<tr>
<td class="key" align="right" nowrap="nowrap">
<label for="title" nowrap="nowrap">
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
</label>
</td>
<td><?php echo $this->lists['catid']; ?></td>
</tr>
</table>
<div id="editcell">
<table class="adminlist">
<thead>
<tr>
<th width="5px"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
<th width="5px"></th>
<th class="image" width="60" align="center"><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></th>
<th class="title" width="40%"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th width="30%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_FILENAME', 'a.filename', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th width="1%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$k = 0;
for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
$row = &$this->items[$i];
?>
<tr class="<?php echo "row$k"; ?>">
<td><?php echo $this->t['pagination']->getRowOffset( $i ); ?></td>
<td><input type="radio" name="imageid" value="<?php echo $row->id ?>" /></td>
<td align="center" valign="middle">
<div class="phocagallery-box-file">
<center>
<div class="phocagallery-box-file-first">
<div class="phocagallery-box-file-second">
<div class="phocagallery-box-file-third">
<center>
<?php
// PICASA
if (isset($row->extid) && $row->extid !='') {
$resW = explode(',', $row->extw);
$resH = explode(',', $row->exth);
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50);
//echo JHtml::_( 'image', $row->exts.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
echo '<img src="'.$row->exts.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
} else if (isset ($row->fileoriginalexist) && $row->fileoriginalexist == 1) {
$imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small');
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
//echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
echo '<img src="'.Uri::root().$row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
} else {
echo HTMLHelper::_( 'image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', '');
}
?>
</center>
</div>
</div>
</div>
</center>
</div>
</td>
<?php echo '<td>'. $row->title.'</td>';
if (isset($row->extid) && $row->extid !='') {
if (isset($row->exttype) && $row->exttype == 1) {
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_FACEBOOK_STORED_FILE').'</td>';
} else {
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_PICASA_STORED_FILE').'</td>';
}
} else {
echo '<td>' .$row->filename.'</td>';
} ?>
<td align="center"><?php echo $row->id; ?></td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
<tfoot>
<tr>
<td colspan="6"><?php echo $this->t['pagination']->getListFooter(); ?></td>
</tr>
</tfoot>
</table>
</div>
<input type="hidden" name="controller" value="phocagallerylinkimg" />
<input type="hidden" name="type" value="<?php echo $this->t['type']; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
</form>
<form name="adminFormLink" id="adminFormLink">
<table class="admintable" width="100%">
<?php
// Number
$itemsNumber = array ('switchheight' => array('COM_PHOCAGALLERY_FIELD_SWITCH_IMAGE_HEIGHT_LABEL', 480),'switchwidth' => array('COM_PHOCAGALLERY_FIELD_SWITCH_IMAGE_WIDTH_LABEL', 640));
foreach ($itemsNumber as $key => $value) {
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value[0]).'</label></td>'
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="'.$value[1].'" class="text_area" /></td>'
.'</tr>';
}
echo '<tr>'
.'<td class="key" align="right" width="30%"><label for="switchfixedsize">'.Text::_('COM_PHOCAGALLERY_FIELD_SWITCH_FIXED_SIZE_LABEL').'</label></td>'
.'<td nowrap><select name="pgslink" id="switchfixedsize" class="form-control">'
.'<option value="0" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_NO' ).'</option>'
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_YES' ).'</option>'
.'</select></td></tr>';
?>
<tr>
<td>&nbsp;</td>
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
</tr>
</table>
</form>
</fieldset>
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,191 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
//jimport( 'joomla.application.component.view' );
use Joomla\String\StringHelper;
phocagalleryimport('phocagallery.render.renderadminviews');
class phocaGalleryViewphocaGalleryLinkImg extends HtmlView
{
var $_context = 'com_phocagallery.phocagallerylinkimg';
protected $r;
protected $t;
protected $button;
protected $user;
protected $items;
protected $request_url;
protected $lists;
function display($tpl = null) {
$app = Factory::getApplication();
$this->r = new PhocaGalleryRenderAdminViews();
$this->t = PhocaGalleryUtils::setVars('linkimg');
$uri = Uri::getInstance();
//JHtml::_('behavior.tooltip');
//JHtml::_('behavior.formvalidation');
//JHtml::_('behavior.keepalive');
//JHtml::_('formbehavior.chosen', 'select');
$editor = $app->input->getCmd('editor', '');
if (!empty($editor)) {
$this->document->addScriptOptions('xtd-phocagallery', array('editor' => $editor));
}
//Frontend Changes
$tUri = '';
$jsLink = Uri::base(true);
if (!$app->isClient('administrator')) {
$tUri = Uri::base();
phocagalleryimport('phocagallery.render.renderadmin');
phocagalleryimport('phocagallery.file.filethumbnail');
$jsLink = Uri::base(true).'/administrator';
}
$document = Factory::getDocument();
$db = Factory::getDBO();
//JHtml::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
//JHtml::stylesheet( 'media/com_phocagallery/js/jcp/picker.css' );
//$document->addScript(JUri::root(true) .'/media/com_phocagallery/js/jcp/picker.js');
HTMLHelper::_('jquery.framework', false);
HTMLHelper::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocagallery/css/phocagallery.css' );
$eName = $app->input->get('editor', '', 'cmd');
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
$this->t['type'] = $app->input->get( 'type', 1, 'int' );
$this->t['backlink'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinks&amp;tmpl=component&amp;editor='.$this->t['ename'];
$params = ComponentHelper::getParams('com_phocagallery') ;
//Filter
$filter_published = $app->getUserStateFromRequest( $this->_context.'.filter_published', 'filter_published', '', 'word' );
$filter_catid = $app->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
$filter_order = $app->getUserStateFromRequest( $this->_context.'.filter_order', 'filter_order', 'a.ordering', 'cmd' );
$filter_order_Dir = $app->getUserStateFromRequest( $this->_context.'.filter_order_Dir', 'filter_order_Dir', '', 'word' );
$search = $app->getUserStateFromRequest( $this->_context.'.search', 'search', '', 'string' );
$search = StringHelper::strtolower( $search );
// Get data from the model
$this->items = $this->get( 'Data');
$total = $this->get( 'Total');
$this->t['pagination'] = $this->get( 'Pagination' );
// build list of categories
$javascript = 'class="form-control" size="1" onchange="Joomla.submitform( );"';
// get list of categories for dropdown filter
$filter = '';
// build list of categories
$javascript = 'class="form-select" size="1" onchange="Joomla.submitform( );"';
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parentid'
. ' FROM #__phocagallery_categories AS a'
. ' WHERE a.published = 1'
. ' AND a.approved = 1'
. ' ORDER BY a.ordering';
$db->setQuery( $query );
$phocagallerys = $db->loadObjectList();
$tree = array();
$text = '';
$tree = PhocaGalleryCategoryhtml::CategoryTreeOption($phocagallerys, $tree, 0, $text, -1);
array_unshift($tree, HTMLHelper::_('select.option', '0', '- '.Text::_('COM_PHOCAGALLERY_SELECT_CATEGORY').' -', 'value', 'text'));
$this->lists['catid'] = HTMLHelper::_( 'select.genericlist', $tree, 'filter_catid', $javascript , 'value', 'text', $filter_catid );
//-----------------------------------------------------------------------
// state filter
$this->lists['state'] = HTMLHelper::_('grid.state', $filter_published );
// table ordering
$this->lists['order_Dir'] = $filter_order_Dir;
$this->lists['order'] = $filter_order;
// search filter
$this->lists['search'] = $search;
$this->user = Factory::getUser();
$this->request_url = $uri->toString();
/*$this->assignRef('tmpl', $t);
$this->assignRef('button', $this->button);
$this->assignRef('user', $this->user);
$this->assignRef('items', $this->items);
$this->assignRef('request_url', $this->request_url);*/
switch($this->t['type']) {
case 2:
case 5:
$i = 0;
$itemsCount = $itemsStart = array();
foreach($this->items as $key => $value) {
$itemsCount[$i] = new StdClass();
$itemsCount[$i]->value = $key;
$itemsCount[$i]->text = $key;
$itemsStart[$i] = new StdClass();
$itemsStart[$i]->value = $key;
$itemsStart[$i]->text = $key;
$i++;
}
// Don't display it if no category is selected
if($i > 0) {
$itemsCount[$i] = new StdClass();
$itemsCount[$i]->value = (int)$key + 1;
$itemsCount[$i]->text = (int)$key + 1;
}
$categoryId = $app->input->get( 'filter_catid', 0, '', 'int' );
$categoryIdList = $app->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
if ((int)$categoryId == 0 && $categoryIdList == 0) {
$itemsCount = $itemsStart = array();
}
$this->lists['limitstartparam'] = HTMLHelper::_( 'select.genericlist', $itemsStart, 'limitstartparam', 'class="form-select"' , 'value', 'text', '' );
$this->lists['limitcountparam'] = HTMLHelper::_( 'select.genericlist', $itemsCount, 'limitcountparam', 'class="form-select"' , 'value', 'text', '' );
parent::display('images');
break;
case 3:
parent::display('switchimage');
break;
case 4:
parent::display('slideshow');
break;
case 1:
default:
parent::display($tpl);
break;
}
}
}
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,32 @@
<?php
/*
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Gallery
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Text;
echo '<div id="phocagallery-links">'
.'<fieldset class="adminform">'
.'<legend>'.Text::_( 'COM_PHOCAGALLERY_SELECT_TYPE' ).'</legend>'
.'<ul>'
.'<li class="ph-icon-16-edb-categories"><a href="'.$this->t['categories'].'">'.Text::_('COM_PHOCAGALLERY_CATEGORIES').'</a></li>'
//.'<li class="icon-16-edb-category"><a href="'.$this->t['COM_PHOCAGALLERY_CATEGORY'].'">'.JText::_('COM_PHOCAGALLERY_CATEGORY').'</a></li>'
.'<li class="ph-icon-16-edb-images"><a href="'.$this->t['images'].'">'.Text::_('COM_PHOCAGALLERY_IMAGES').'</a></li>'
.'<li class="ph-icon-16-edb-images"><a href="'.$this->t['imagesmasonry'].'">'.Text::_('COM_PHOCAGALLERY_IMAGES_MASONRY').'</a></li>'
/*.'<li class="ph-icon-16-edb-image"><a href="'.$this->t['image'].'">'.Text::_('COM_PHOCAGALLERY_IMAGE').'</a></li>'
'<li class="ph-icon-16-edb-switchimage"><a href="'.$this->t['switchimage'].'">'.Text::_('COM_PHOCAGALLERY_SWITCH_IMAGE').'</a></li>'
.'<li class="ph-icon-16-edb-slideshow"><a href="'.$this->t['slideshow'].'">'.Text::_('COM_PHOCAGALLERY_SLIDESHOW').'</a></li>'
*/
.'</ul>'
.'</div>'
.'</fieldset>'
.'</div>';
?>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,56 @@
<?php
/* @package Joomla
* @copyright Copyright (C) Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @extension Phoca Extension
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
defined('_JEXEC') or die();
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\HTML\HTMLHelper;
jimport( 'joomla.application.component.view' );
phocagalleryimport('phocagallery.render.renderadminviews');
class phocaGalleryViewphocaGalleryLinks extends HtmlView
{
protected $r;
protected $t;
function display($tpl = null) {
$this->r = new PhocaGalleryRenderAdminViews();
$this->t = PhocaGalleryUtils::setVars('link');
$app = Factory::getApplication();
//Frontend Changes
$tUri = '';
if (!$app->isClient('administrator')) {
$tUri = Uri::base();
}
$editor = $app->input->getCmd('editor', '');
if (!empty($editor)) {
$this->document->addScriptOptions('xtd-phocagallery', array('editor' => $editor));
}
$eName = Factory::getApplication()->input->get('editor');
$eName = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
HTMLHelper::_('jquery.framework', false);
HTMLHelper::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocagallery/css/phocagallery.css' );
$this->t['categories'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkcats&amp;tmpl=component&amp;editor='.$eName;
//$this->t['COM_PHOCAGALLERY_CATEGORY'] = 'index.php?option=com_phocagallery&amp;view=phocagallerylinkcat&amp;tmpl=component&amp;editor='.$eName;
$this->t['images'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=2&amp;tmpl=component&amp;editor='.$eName;
$this->t['image'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=1&amp;tmpl=component&amp;editor='.$eName;
$this->t['imagesmasonry'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=5&amp;tmpl=component&amp;editor='.$eName;
//$this->t['switchimage'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=3&amp;tmpl=component&amp;editor='.$eName;
//$this->t['slideshow'] = $tUri.'index.php?option=com_phocagallery&amp;view=phocagallerylinkimg&amp;type=4&amp;tmpl=component&amp;editor='.$eName;
parent::display($tpl);
}
}
?>

Some files were not shown because too many files have changed in this diff Show More