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,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