primo commit
This commit is contained in:
1
components/com_phocagallery/views/user/index.html
Normal file
1
components/com_phocagallery/views/user/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
8
components/com_phocagallery/views/user/metadata.xml
Normal file
8
components/com_phocagallery/views/user/metadata.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view title="_COM_PHOCAGALLERY_USER_CONTROL_PANEL_GROUP">
|
||||
<message>
|
||||
<![CDATA[_COM_PHOCAGALLERY_USER_CONTROL_PANEL_GROUP_DESC]]>
|
||||
</message>
|
||||
</view>
|
||||
</metadata>
|
||||
123
components/com_phocagallery/views/user/tmpl/default.php
Normal file
123
components/com_phocagallery/views/user/tmpl/default.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?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\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
HTMLHelper::_('jquery.framework', false);
|
||||
|
||||
$layoutSVG = new FileLayout('svg_definitions', null, array('component' => 'com_phocagallery'));
|
||||
|
||||
// SVG Definitions
|
||||
$d = array();
|
||||
echo $layoutSVG->render($d);
|
||||
|
||||
|
||||
$document = Factory::getDocument();
|
||||
// jQuery(\'input[type=file]\').click(function(){
|
||||
$document->addScriptDeclaration(
|
||||
'jQuery(document).ready(function(){
|
||||
jQuery(\'.phfileuploadcheckcat\').click(function(){
|
||||
if( !jQuery(\'#filter_catid_image\').val() || jQuery(\'#filter_catid_image\').val() == 0) {
|
||||
alert(\''.Text::_('COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true).'\'); return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
})});'
|
||||
);
|
||||
|
||||
echo '<div id="phocagallery-ucp" class="pg-ucp-view'.$this->params->get( 'pageclass_sfx' ).'">'. "\n";
|
||||
|
||||
$heading = '';
|
||||
if ($this->params->get( 'page_title' ) != '') {
|
||||
$heading .= $this->params->get( 'page_title' );
|
||||
}
|
||||
|
||||
if ($this->t['showpageheading'] != 0) {
|
||||
if ( $heading != '') {
|
||||
echo '<h1>'
|
||||
.$this->escape($heading)
|
||||
.'</h1>';
|
||||
}
|
||||
}
|
||||
$tab = 0;
|
||||
switch ($this->t['tab']) {
|
||||
case 'up':
|
||||
$tab = 1;
|
||||
break;
|
||||
|
||||
case 'cc':
|
||||
default:
|
||||
$tab = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
echo '<div> </div>';
|
||||
|
||||
if ($this->t['displaytabs'] > 0) {
|
||||
//echo '<div id="phocagallery-pane">';
|
||||
|
||||
$tabItems = array();
|
||||
phocagalleryimport('phocagallery.render.rendertabs');
|
||||
$tabs = new PhocaGalleryRenderTabs();
|
||||
echo $tabs->startTabs();
|
||||
|
||||
$tabItems[0] = array('id' => 'user', 'title' => Text::_('COM_PHOCAGALLERY_USER'), 'image' => 'user', 'icon' => 'user');
|
||||
$tabItems[1] = array('id' => 'category', 'title' => $this->t['categorycreateoredithead'], 'image' => 'folder-small', 'icon' => 'category');
|
||||
$tabItems[2] = array('id' => 'subcategories', 'title' => Text::_('COM_PHOCAGALLERY_SUBCATEGORIES'), 'image' => 'subcategories', 'icon' => 'category');
|
||||
$tabItems[3] = array('id' => 'images', 'title' => Text::_('COM_PHOCAGALLERY_IMAGES'), 'image' => 'images', 'icon' => 'image');
|
||||
|
||||
$tabs->setActiveTab(isset($tabItems[$this->t['tab']]['id']) ? $tabItems[$this->t['tab']]['id'] : 0);
|
||||
echo $tabs->renderTabsHeader($tabItems);
|
||||
|
||||
echo $tabs->startTab('user');
|
||||
echo $this->loadTemplate('user');
|
||||
echo $tabs->endTab();
|
||||
|
||||
echo $tabs->startTab('category');
|
||||
echo $this->loadTemplate('category');
|
||||
echo $tabs->endTab();
|
||||
|
||||
echo $tabs->startTab('subcategories');
|
||||
echo $this->loadTemplate('subcategories');
|
||||
echo $tabs->endTab();
|
||||
|
||||
echo $tabs->startTab('images');
|
||||
echo $this->loadTemplate('images');
|
||||
echo $tabs->endTab();
|
||||
|
||||
echo $tabs->endTabs();
|
||||
|
||||
/*
|
||||
echo HTMLHelper::_('tabs.start', 'config-tabs-com_phocagallery-user', array('useCookie'=>1, 'startOffset'=> $this->t['tab']));
|
||||
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('user', $this->t['pi'].'icon-user.png', '') . ' '.Text::_('COM_PHOCAGALLERY_USER'), 'user' );
|
||||
echo $this->loadTemplate('user');
|
||||
|
||||
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('category', $this->t['pi'].'icon-folder-small.png', '') . ' '.$this->t['categorycreateoredithead'], 'category' );
|
||||
echo $this->loadTemplate('category');
|
||||
|
||||
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('subcategory', $this->t['pi'].'icon-subcategories.png', ''). ' '.Text::_('COM_PHOCAGALLERY_SUBCATEGORIES'), 'subcategories' );
|
||||
echo $this->loadTemplate('subcategories');
|
||||
|
||||
echo HTMLHelper::_('tabs.panel', PhocaGalleryRenderFront::renderIcon('image', $this->t['pi'].'icon-images.png', ''). ' '.Text::_('COM_PHOCAGALLERY_IMAGES'), 'images' );
|
||||
echo $this->loadTemplate('images');
|
||||
|
||||
echo JHtml::_('tabs.end');*/
|
||||
//echo '</div>';
|
||||
}
|
||||
echo '<div> </div>';
|
||||
echo PhocaGalleryUtils::getExtInfo();
|
||||
echo '</div>';
|
||||
?>
|
||||
26
components/com_phocagallery/views/user/tmpl/default.xml
Normal file
26
components/com_phocagallery/views/user/tmpl/default.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_PHOCAGALLERY_USER_CONTROL_PANEL_LAYOUT">
|
||||
<message>
|
||||
<![CDATA[COM_PHOCAGALLERY_USER_CONTROL_PANEL_LAYOUT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<state>
|
||||
<name>COM_PHOCAGALLERY_USER_CONTROL_PANEL_LAYOUT</name>
|
||||
<description>COM_PHOCAGALLERY_USER_CONTROL_PANEL_LAYOUT_DESC</description>
|
||||
<params>
|
||||
|
||||
<param 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>
|
||||
</param>
|
||||
|
||||
<param 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>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</state>
|
||||
</metadata>
|
||||
@ -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\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
echo '<div id="phocagallery-category-creating">'.$this->t['iepx'];
|
||||
|
||||
if ($this->t['categorypublished'] == 0) {
|
||||
echo '<p>'.Text::_('COM_PHOCAGALLERY_YOUR_CATEGORY_IS_UNPUBLISHED').'</p>';
|
||||
} else {
|
||||
|
||||
if ($this->t['categorytitle'] != '') {
|
||||
?><h4><?php echo Text::_('COM_PHOCAGALLERY_MAIN_CATEGORY'); ?></h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_CATEGORY');?>:</strong></td>
|
||||
<td><?php echo $this->t['categorytitle'] ;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_DESCRIPTION');?>:</strong></td>
|
||||
<td><?php echo $this->t['categorydescription'] ;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_APPROVED');?>:</strong></td>
|
||||
<td><?php
|
||||
|
||||
|
||||
if ($this->t['categoryapproved'] == 1) {
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-enabled"><title>'.Text::_('COM_PHOCAGALLERY_APPROVED').'</title><use xlink:href="#ph-si-enabled"></use></svg>';
|
||||
} else {
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_NOT_APPROVED').'</title><use xlink:href="#ph-si-disabled"></use></svg>';
|
||||
}
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
</table><?php
|
||||
}
|
||||
?><h4><?php echo $this->t['categorycreateoredit']; ?></h4>
|
||||
<form action="<?php echo htmlspecialchars($this->t['action']);?>" name="phocagallerycreatecatform" id="phocagallery-create-cat-form" method="post" >
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_CATEGORY');?>:</strong></td>
|
||||
<td><input type="text" id="categoryname" name="categoryname" maxlength="255" class="form-control comment-input" value="<?php echo $this->t['categorytitle'] ;?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_( 'COM_PHOCAGALLERY_DESCRIPTION' ); ?>:</strong></td>
|
||||
<td><textarea id="phocagallery-create-cat-description" name="phocagallerycreatecatdescription" onkeyup="countCharsCreateCat();" cols="30" rows="10" class="form-control comment-input"><?php echo $this->t['categorydescription'] ;?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><?php echo Text::_('COM_PHOCAGALLERY_CHARACTERS_WRITTEN');?> <input name="phocagallerycreatecatcountin" value="0" readonly="readonly" class="form-control comment-input2" /> <?php echo Text::_('COM_PHOCAGALLERY_AND_LEFT_FOR_DESCRIPTION');?> <input name="phocagallerycreatecatcountleft" value="<?php echo $this->t['maxcreatecatchar'];?>" readonly="readonly" class="form-control comment-input2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="return(checkCreateCatForm());" id="phocagallerycreatecatsubmit" ><?php echo $this->t['categorycreateoredit']; ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
<input type="hidden" name="task" value="createcategory"/>
|
||||
<input type="hidden" name="controller" value="user"/>
|
||||
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['createcategory'];?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
</form><?php
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
301
components/com_phocagallery/views/user/tmpl/default_images.php
Normal file
301
components/com_phocagallery/views/user/tmpl/default_images.php
Normal file
@ -0,0 +1,301 @@
|
||||
<?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\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
|
||||
echo '<div id="phocagallery-upload">'.$this->t['iepx'];
|
||||
|
||||
if ($this->t['displayupload'] == 1) {
|
||||
if ($this->t['categorypublished'] == 0) {
|
||||
echo '<p>'.Text::_('COM_PHOCAGALLERY_YOUR_MAIN_CATEGORY_IS_UNPUBLISHED').'</p>';
|
||||
} else if ($this->t['task'] == 'editimg' && $this->t['imageedit']) {
|
||||
|
||||
?><h4><?php echo Text::_('COM_PHOCAGALLERY_EDIT'); ?></h4>
|
||||
<form action="<?php echo htmlspecialchars($this->t['action']);?>" name="phocagalleryuploadform" id="phocagallery-upload-form" method="post" >
|
||||
<table>
|
||||
<tr>
|
||||
<td><?php echo Text::_('COM_PHOCAGALLERY_TITLE');?>:</td>
|
||||
<td><input type="text" id="imagename" name="imagename" maxlength="255" class="comment-input" value="<?php echo $this->t['imageedit']->title ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo Text::_( 'COM_PHOCAGALLERY_DESCRIPTION' ); ?>:</td>
|
||||
<td><textarea id="phocagallery-upload-description" name="phocagalleryuploaddescription" onkeyup="countCharsUpload();" cols="30" rows="10" class="form-control comment-input"><?php echo $this->t['imageedit']->description; ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </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['maxcreatecatchar'];?>" readonly="readonly" class="comment-input2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><input type="button" onclick="window.location='<?php echo Route::_($this->t['pp'].$this->t['psi']);?>'" id="phocagalleryimagecancel" value="<?php echo Text::_('COM_PHOCAGALLERY_CANCEL'); ?>"/> <input type="submit" onclick="return(checkCreateImageForm());" id="phocagalleryimagesubmit" value="<?php echo Text::_('COM_PHOCAGALLERY_EDIT'); ?>"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
<input type="hidden" name="task" value="editimage"/>
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['images'];?>" />
|
||||
<input type="hidden" name="limitstartsubcat" value="<?php echo $this->t['subcategorypagination']->limitstart;?>" />
|
||||
<input type="hidden" name="limitstartimage" value="<?php echo $this->t['imagepagination']->limitstart;?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $this->t['imageedit']->id ?>"/>
|
||||
<input type="hidden" name="parentcategoryid" value="<?php echo $this->t['parentcategoryid'] ?>"/>
|
||||
<input type="hidden" name="filter_order_image" value="<?php echo $this->listsimage['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_image" value="" />
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
|
||||
?><h4><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGES' ); ?></h4>
|
||||
<div style="float:left" class="filter-search btn-group pull-left" >
|
||||
<form action="<?php echo htmlspecialchars($this->t['action']);?>" method="post" name="phocagalleryimageform" id="phocagalleryimageform">
|
||||
|
||||
|
||||
<?php /* <td align="left" width="100%"><?php echo JText::_( 'COM_PHOCAGALLERY_FILTER' ); ?>:
|
||||
<input type="text" name="phocagalleryimagesearch" id="phocagalleryimagesearch" value="<?php echo $this->listsimage['search'];?>" onchange="document.phocagalleryimageform.submit();" />
|
||||
<button onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
|
||||
<button onclick="document.getElementById('phocagalleryimagesearch').value='';document.phocagalleryimageform.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button></td>
|
||||
<td nowrap="nowrap"><?php echo $this->listsimage['catid']; echo $this->listsimage['state'];?></td> */ ?>
|
||||
|
||||
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?></label>
|
||||
<input type="text" name="phocagalleryimagesearch" id="phocagalleryimagesearch" placeholder="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>" value="<?php echo $this->listsimage['search'];?>" title="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>" /></div>
|
||||
|
||||
<div class="btn-group pull-left hidden-phone">
|
||||
<button class="btn btn-primary tip hasTooltip" type="submit" onclick="this.form.submit();" title="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>"><?php echo '<svg class="ph-si ph-si-search"><title>'.Text::_('COM_PHOCAGALLERY_SEARCH').'</title><use xlink:href="#ph-si-search"></use></svg>' ?></button>
|
||||
<button class="btn btn-secondary tip hasTooltip" type="button" onclick="document.getElementById('phocagalleryimagesearch').value='';document.getElementById(\'phocagalleryimageform\').submit();" title="<?php echo Text::_( 'COM_PHOCAGALLERY_CLEAR' ); ?>"><?php echo Text::_( 'COM_PHOCAGALLERY_CLEAR' ); ?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="ph-adminlist-select-row"><?php echo $this->listsimage['catid'] ?> <?php echo $this->listsimage['state']; ?></div>
|
||||
|
||||
<table class="ph-adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
|
||||
<th class="image" width="3%" align="center"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE' ); ?></th>
|
||||
<th class="title" width="15%"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->listsimage['order_Dir'], $this->listsimage['order'], 'image', 'asc', '', 'phocagalleryimageform', '_image'); ?></th>
|
||||
<th width="3%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_PUBLISHED', 'a.published', $this->listsimage['order_Dir'], $this->listsimage['order'], 'image', 'asc', '', 'phocagalleryimageform' , '_image'); ?></th>
|
||||
<th width="3%" nowrap="nowrap"><?php echo Text::_('COM_PHOCAGALLERY_DELETE'); ?></th>
|
||||
<th width="3%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_APPROVED', 'a.approved', $this->listsimage['order_Dir'], $this->listsimage['order'], 'image', 'asc', '', 'phocagalleryimageform', '_image' ); ?></th>
|
||||
<th width="80" nowrap="nowrap" align="center">
|
||||
|
||||
<?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_ORDER', 'a.ordering', $this->listsimage['order_Dir'], $this->listsimage['order'],'image', 'asc', '', 'phocagalleryimageform', '_image' );
|
||||
//$image = '<img src="'.JUri::base(true).'/'.$this->t['pi'].'icon-filesave.png'.'" width="16" height="16" border="0" alt="'.JText::_( 'COM_PHOCAGALLERY_SAVE_ORDER' ).'" />';
|
||||
|
||||
//$image = PhocaGalleryRenderFront::renderIcon('save', $this->t['pi'].'icon-filesave.png', JText::_('COM_PHOCAGALLERY_SAVE_ORDER'));
|
||||
$image = '<svg class="ph-si ph-si-save"><title>'.Text::_('COM_PHOCAGALLERY_SAVE_ORDER').'</title><use xlink:href="#ph-si-save"></use></svg>';
|
||||
|
||||
$task = 'saveordersubcat';
|
||||
$href = '<a href="javascript:saveorderimage()" title="'.Text::_( 'COM_PHOCAGALLERY_SAVE_ORDER' ).'"> '.$image.'</a>';
|
||||
echo $href;
|
||||
?></th>
|
||||
<th width="3%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_CATEGORY' , 'a.catid', $this->listsimage['order_Dir'], $this->listsimage['order'], 'image', 'asc', '', 'phocagalleryimageform', '_image' ); ?></th>
|
||||
|
||||
<th width="1%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_ID', 'a.id', $this->listsimage['order_Dir'], $this->listsimage['order'] , 'image', 'asc', '', 'phocagalleryimageform', '_image'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody><?php
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
$n = count( $this->t['imageitems'] );
|
||||
$rows = &$this->t['imageitems'];
|
||||
|
||||
if (is_array($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
$linkEdit = Route::_( $this->t['pp'].'&task=editimg&id='. $row->slug.$this->t['psi'] );
|
||||
|
||||
?><tr class="<?php echo "row$k"; ?>">
|
||||
<td>
|
||||
<input type="hidden" id="cb<?php echo $k ?>" name="cid[]" value="<?php echo $row->id ?>" />
|
||||
<?php
|
||||
echo $this->t['imagepagination']->getRowOffset( $i );?>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<?php
|
||||
$row->linkthumbnailpath = PhocaGalleryImageFront::displayCategoryImageOrNoImage($row->filename, 'small');
|
||||
$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="" />';
|
||||
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td><a href="<?php echo $linkEdit; ?>" title="<?php echo Text::_( 'COM_PHOCAGALLERY_EDIT_IMAGE' ); ?>"><?php echo $row->title; ?></a></td>
|
||||
<?php
|
||||
|
||||
// Publish Unpublish
|
||||
echo '<td align="center">';
|
||||
if ($row->published == 1) {
|
||||
echo ' <a title="'.Text::_('COM_PHOCAGALLERY_UNPUBLISH').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=unpublishimage'. $this->t['psi']).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_UNPUBLISH'))
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'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>'
|
||||
.'</a>';
|
||||
}
|
||||
if ($row->published == 0) {
|
||||
echo ' <a title="'.Text::_('COM_PHOCAGALLERY_PUBLISH').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=publishimage'.$this->t['psi']).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_PUBLISH'))
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'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>'
|
||||
.'</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Remove
|
||||
echo '<td align="center">';
|
||||
|
||||
// USER RIGHT - Delete (Publish/Unpublish) - - - - - - - - - - -
|
||||
// 2, 2 means that user access will be ignored in function getUserRight for display Delete button
|
||||
// because we cannot check the access and delete in one time
|
||||
$rightDisplayDelete = 0;
|
||||
$user = Factory::getUser();
|
||||
$model = $this->getModel('user');
|
||||
$isOwnerCategory = $model->isOwnerCategoryImage((int)$user->id, (int)$row->id);
|
||||
|
||||
$catAccess = PhocaGalleryAccess::getCategoryAccess((int)$isOwnerCategory);
|
||||
if (!empty($catAccess)) {
|
||||
$rightDisplayDelete = PhocaGalleryAccess::getUserRight('deleteuserid', $catAccess->deleteuserid, 2, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
|
||||
}
|
||||
// - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
if ($rightDisplayDelete) {
|
||||
echo ' <a onclick="return confirm(\''.Text::_('COM_PHOCAGALLERY_WARNING_DELETE_ITEMS').'\')" title="'.Text::_('COM_PHOCAGALLERY_DELETE').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=removeimage'.$this->t['psi'] ).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-trash.png', JText::_('COM_PHOCAGALLERY_DELETE'))
|
||||
//echo PhocaGalleryRenderFront::renderIcon('trash', $this->t['pi'].'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>'
|
||||
.'</a>';
|
||||
} else {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-trash-g.png', JText::_('COM_PHOCAGALLERY_DELETE'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('trash', $this->t['pi'].'icon-trash-g.png', JText::_('COM_PHOCAGALLERY_DELETE'),'ph-icon-disabled');
|
||||
echo '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_DELETE').'</title><use xlink:href="#ph-si-disabled"></use></svg>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Approved
|
||||
echo '<td align="center">';
|
||||
if ($row->approved == 1) {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-enabled"><title>'.Text::_('COM_PHOCAGALLERY_APPROVED').'</title><use xlink:href="#ph-si-enabled"></use></svg>';
|
||||
} else {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_NOT_APPROVED').'</title><use xlink:href="#ph-si-disabled"></use></svg>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
$linkUp = Route::_($this->t['pp'].'&id='.$row->slug.'&task=orderupimage'.$this->t['psi']);
|
||||
$linkDown = Route::_($this->t['pp'].'&id='.$row->slug.'&task=orderdownimage'.$this->t['psi']);
|
||||
|
||||
echo '<td class="order" align="right">'
|
||||
.'<span>'. $this->t['imagepagination']->orderUpIcon( $i, ($row->catid == @$this->t['imageitems'][$i-1]->catid), $linkUp, 'COM_PHOCAGALLERY_MOVE_UP', $this->t['imageordering']).'</span> '
|
||||
.'<span>'. $this->t['imagepagination']->orderDownIcon( $i, $n, ($row->catid == @$this->t['imageitems'][$i+1]->catid), $linkDown, 'COM_PHOCAGALLERY_MOVE_UP', $this->t['imageordering'] ).'</span> ';
|
||||
|
||||
$disabled = $this->t['imageordering'] ? '' : 'disabled="disabled"';
|
||||
echo '<input type="text" name="order[]" size="5" value="'. $row->ordering.'" '. $disabled.' class="form-control inputbox input-mini" style="text-align: center" />';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td align="center">'. $row->category .'</td>';
|
||||
echo '<td align="center">'. $row->id .'</td>'
|
||||
.'</tr>';
|
||||
|
||||
$k = 1 - $k;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="9" class="footer"><?php
|
||||
|
||||
$this->t['imagepagination']->setTab($this->t['currenttab']['images']);
|
||||
if (count($this->t['imageitems'])) {
|
||||
echo '<div class="pagination pg-center">';
|
||||
echo '<div class="pg-inline">'
|
||||
.Text::_('COM_PHOCAGALLERY_DISPLAY_NUM') .' '
|
||||
.$this->t['imagepagination']->getLimitBox()
|
||||
.'</div>';
|
||||
echo '<div style="margin:0 10px 0 10px;display:inline;" class="sectiontablefooter'.$this->params->get( 'pageclass_sfx' ).'" >'
|
||||
.$this->t['imagepagination']->getPagesLinks()
|
||||
.'</div>'
|
||||
.'<div style="margin:0 10px 0 10px;display:inline;" class="pagecounter">'
|
||||
.$this->t['imagepagination']->getPagesCounter()
|
||||
.'</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['images'];?>" />
|
||||
<input type="hidden" name="limitstartsubcat" value="<?php echo $this->t['subcategorypagination']->limitstart;?>" />
|
||||
<input type="hidden" name="limitstartimage" value="<?php echo $this->t['imagepagination']->limitstart;?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="catid" value="<?php echo $this->t['catidimage'] ?>"/>
|
||||
<input type="hidden" name="filter_order_image" value="<?php echo $this->listsimage['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_image" value="" />
|
||||
|
||||
</form>
|
||||
<p> </p>
|
||||
<?php
|
||||
|
||||
|
||||
if ((int)$this->t['displayupload'] == 1) {
|
||||
echo '<h4>'. Text::_('COM_PHOCAGALLERY_SINGLE_FILE_UPLOAD').'</h4>';
|
||||
echo $this->loadTemplate('upload');
|
||||
}
|
||||
|
||||
if ((int)$this->t['ytbupload'] > 0) {
|
||||
echo '<h4>'. Text::_('COM_PHOCAGALLERY_YTB_UPLOAD').'</h4>';
|
||||
echo $this->loadTemplate('ytbupload');
|
||||
}
|
||||
|
||||
if((int)$this->t['enablemultiple'] == 1) {
|
||||
echo '<h4>'. Text::_('COM_PHOCAGALLERY_MULTPLE_FILE_UPLOAD').'</h4>';
|
||||
echo $this->loadTemplate('multipleupload');
|
||||
}
|
||||
|
||||
/*if($this->t['enablejava'] == 1) {
|
||||
echo '<h4>'. Text::_('COM_PHOCAGALLERY_JAVA_UPLOAD').'</h4>';
|
||||
echo $this->loadTemplate('javaupload');
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
echo '<div>'.Text::_('COM_PHOCAGALLERY_NO_CATEGORY_TO_UPLOAD_IMAGES').'</div>';
|
||||
echo '<div>'.Text::_('COM_PHOCAGALLERY_NO_CATEGORY_TO_UPLOAD_IMAGES_ADMIN').'</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
@ -0,0 +1,29 @@
|
||||
<?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 style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
|
||||
|
||||
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' ).': '.$this->t['uploadmaxsizeread'].','
|
||||
.' '.JText::_('COM_PHOCAGALLERY_MAX_RESOLUTION').': '. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
|
||||
echo ' </h4>';
|
||||
if ($this->t['catidimage'] == 0 || $this->t['catidimage'] == '') {
|
||||
echo '<div class="alert alert-error">'.JText::_('COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY_TO_BE_ABLE_TO_UPLOAD_IMAGES').'</div>';
|
||||
}
|
||||
echo $this->t['ju_output'];
|
||||
$this->t['upload_form_id'] = 'phocaGalleryUploadFormJU';
|
||||
echo $this->loadTemplate('uploadform');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
@ -0,0 +1,39 @@
|
||||
<?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 '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
|
||||
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' ).' [ ';
|
||||
|
||||
if ($this->t['uploadmaxsizeread'] != '0 B') {
|
||||
echo Text::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).': '.$this->t['uploadmaxsizeread'].','
|
||||
.' ';
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo Text::_('COM_PHOCAGALLERY_MAX_RESOLUTION').': '. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
|
||||
echo ' </h4>';
|
||||
|
||||
if ($this->t['catidimage'] == 0 || $this->t['catidimage'] == '') {
|
||||
echo '<div class="alert alert-error alert-danger">'.Text::_('COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY_TO_BE_ABLE_TO_UPLOAD_IMAGES').'</div>';
|
||||
}
|
||||
echo $this->t['mu_output'];
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
?>
|
||||
@ -0,0 +1,273 @@
|
||||
<?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\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
echo '<div id="phocagallery-subcategory-creating">'.$this->t['iepx'];
|
||||
|
||||
if ($this->t['displaysubcategory'] == 1) {
|
||||
if ($this->t['categorypublished'] == 0) {
|
||||
echo '<p>'.Text::_('COM_PHOCAGALLERY_YOUR_MAIN_CATEGORY_IS_UNPUBLISHED').'</p>';
|
||||
} else if ($this->t['task'] == 'editsubcat' && $this->t['categorysubcatedit']) {
|
||||
|
||||
?><h4><?php echo Text::_('COM_PHOCAGALLERY_EDIT'); ?></h4>
|
||||
<form action="<?php echo htmlspecialchars($this->t['action']);?>" name="phocagallerycreatesubcatform" id="phocagallery-create-subcat-form" method="post" >
|
||||
<table>
|
||||
<tr>
|
||||
<td><?php echo Text::_('COM_PHOCAGALLERY_SUBCATEGORY');?>:</td>
|
||||
<td><input type="text" id="subcategoryname" name="subcategoryname" maxlength="255" class="form-control comment-input" value="<?php echo $this->t['categorysubcatedit']->title ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo Text::_( 'COM_PHOCAGALLERY_DESCRIPTION' ); ?>:</td>
|
||||
<td><textarea id="phocagallery-create-subcat-description" name="phocagallerycreatesubcatdescription" onkeyup="countCharsCreateSubCat();" cols="30" rows="10" class="comment-input"><?php echo $this->t['categorysubcatedit']->description; ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </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['maxcreatecatchar'];?>" readonly="readonly" class="form-control comment-input2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="window.location='<?php echo Route::_($this->t['pp'].$this->t['ps']);?>'" id="phocagallerycreatesubcatcancel"><?php echo Text::_('COM_PHOCAGALLERY_CANCEL'); ?></button> <button class="btn" type="submit" onclick="return(checkCreateSubCatForm());" id="phocagallerycreatesubcatsubmit"><?php echo Text::_('COM_PHOCAGALLERY_EDIT'); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
<input type="hidden" name="task" value="editsubcategory"/>
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['createsubcategory'];?>" />
|
||||
<input type="hidden" name="limitstartsubcat" value="<?php echo $this->t['subcategorypagination']->limitstart;?>" />
|
||||
<input type="hidden" name="limitstartimage" value="<?php echo $this->t['imagepagination']->limitstart;?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $this->t['categorysubcatedit']->id ?>"/>
|
||||
<input type="hidden" name="parentcategoryid" value="<?php echo $this->t['parentcategoryid'] ?>"/>
|
||||
<input type="hidden" name="filter_order_subcat" value="<?php echo $this->listssubcat['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_subcat" value="" />
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
?><h4><?php echo Text::_( 'COM_PHOCAGALLERY_SUBCATEGORIES' ); ?></h4>
|
||||
<div style="float:left" class="filter-search btn-group pull-left" >
|
||||
<form action="<?php echo htmlspecialchars($this->t['action']);?>" method="post" name="phocagallerysubcatform" id="phocagallerysubcatform">
|
||||
|
||||
<?php /*
|
||||
echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?>:
|
||||
<input type="text" name="phocagallerysubcatsearch" id="phocagallerysubcatsearch" value="<?php echo $this->listssubcat['search'];?>" onchange="document.phocagallerysubcatform.submit();" class="filter-select hidden-phone" />
|
||||
<button class="btn" onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
|
||||
<button class="btn" onclick="document.getElementById('phocagallerysubcatsearch').value='';document.phocagallerysubcatform.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button>
|
||||
*/ ?>
|
||||
|
||||
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?></label>
|
||||
<input type="text" name="phocagallerysubcatsearch" id="phocagallerysubcatsearch" class="form-control" placeholder="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>" value="<?php echo $this->listssubcat['search'];?>" title="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>" /></div>
|
||||
|
||||
<div class="btn-group pull-left hidden-phone">
|
||||
<button class="btn btn-primary tip hasTooltip" type="submit" onclick="this.form.submit();" title="<?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?>"><?php echo '<svg class="ph-si ph-si-search"><title>'.Text::_('COM_PHOCAGALLERY_SEARCH').'</title><use xlink:href="#ph-si-search"></use></svg>' ?></button>
|
||||
<button class="btn btn-secondary tip hasTooltip" type="button" onclick="document.getElementById('phocagallerysubcatsearch').value='';document.phocagallerysubcatform.submit();" title="<?php echo Text::_( 'COM_PHOCAGALLERY_CLEAR' ); ?>"><?php echo Text::_( 'COM_PHOCAGALLERY_CLEAR' ); ?></button></div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ph-adminlist-select-row"><?php echo $this->listssubcat['catid'] ?> <?php echo $this->listssubcat['state']; ?></div>
|
||||
|
||||
<table class="ph-adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
|
||||
<th class="title" width="40%"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->listssubcat['order_Dir'], $this->listssubcat['order'], 'subcategory', 'asc', '', 'phocagallerysubcatform', '_subcat'); ?></th>
|
||||
<th width="5%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_PUBLISHED', 'a.published', $this->listssubcat['order_Dir'], $this->listssubcat['order'], 'subcategory', 'asc', '', 'phocagallerysubcatform', '_subcat' ); ?></th>
|
||||
<th width="5%" nowrap="nowrap"><?php echo Text::_('COM_PHOCAGALLERY_DELETE'); ?></th>
|
||||
<th width="5%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_APPROVED', 'a.approved', $this->listssubcat['order_Dir'], $this->listssubcat['order'], 'subcategory', 'asc', '', 'phocagallerysubcatform', '_subcat' ); ?></th>
|
||||
<th width="50" nowrap="nowrap" align="center">
|
||||
|
||||
<?php echo PhocaGalleryGrid::sort('COM_PHOCAGALLERY_ORDER', 'a.ordering', $this->listssubcat['order_Dir'], $this->listssubcat['order'], 'subcategory', 'asc', '', 'phocagallerysubcatform', '_subcat' );
|
||||
//$image = '<img src="'.JUri::base(true).'/'. $this->t['pi'].'icon-filesave.png'.'" width="16" height="16" border="0" alt="'.JText::_( 'COM_PHOCAGALLERY_SAVE_ORDER' ).'" />';
|
||||
//$image = PhocaGalleryRenderFront::renderIcon('save', $this->t['pi'].'icon-filesave.png', JText::_('COM_PHOCAGALLERY_SAVE_ORDER'));
|
||||
$image = '<svg class="ph-si ph-si-save"><title>'.Text::_('COM_PHOCAGALLERY_SAVE_ORDER').'</title><use xlink:href="#ph-si-save"></use></svg>';
|
||||
$task = 'saveordersubcat';
|
||||
$href = '<a href="javascript:saveordersubcat()" title="'.Text::_( 'COM_PHOCAGALLERY_SAVE_ORDER' ).'">'.$image.'</a>';
|
||||
echo $href;
|
||||
?></th>
|
||||
<th width="1%" nowrap="nowrap"><?php echo PhocaGalleryGrid::sort( 'COM_PHOCAGALLERY_ID', 'a.id', $this->listssubcat['order_Dir'], $this->listssubcat['order'] , 'subcategory', 'asc', '', 'phocagallerysubcatform', '_subcat'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody><?php
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
$n = count( $this->t['subcategoryitems'] );
|
||||
$rows = &$this->t['subcategoryitems'];
|
||||
|
||||
if (is_array($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
$linkEdit = Route::_( $this->t['pp'].'&task=editsubcat&id='. $row->slug.$this->t['ps'] );
|
||||
|
||||
?><tr class="<?php echo "row$k"; ?>">
|
||||
<td>
|
||||
<input type="hidden" id="cb<?php echo $k ?>" name="cid[]" value="<?php echo $row->id ?>" />
|
||||
<?php
|
||||
echo $this->t['subcategorypagination']->getRowOffset( $i );?>
|
||||
</td>
|
||||
<td><a href="<?php echo $linkEdit; ?>" title="<?php echo Text::_( 'COM_PHOCAGALLERY_EDIT_CATEGORY' ); ?>"><?php echo $row->title; ?></a></td>
|
||||
<?php
|
||||
|
||||
// Publish Unpublish
|
||||
echo '<td align="center">';
|
||||
if ($row->published == 1) {
|
||||
echo ' <a title="'.Text::_('COM_PHOCAGALLERY_UNPUBLISH').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=unpublishsubcat'. $this->t['ps']).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_UNPUBLISH'))
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'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>'
|
||||
|
||||
.'</a>';
|
||||
}
|
||||
if ($row->published == 0) {
|
||||
echo ' <a title="'.Text::_('COM_PHOCAGALLERY_PUBLISH').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=publishsubcat'.$this->t['ps']).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_PUBLISH'))
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'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>'
|
||||
.'</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Remove
|
||||
echo '<td align="center">';
|
||||
echo ' <a onclick="return confirm(\''.Text::_('COM_PHOCAGALLERY_WARNING_DELETE_ITEMS').'\')" title="'.Text::_('COM_PHOCAGALLERY_DELETE').'" href="'. Route::_($this->t['pp'].'&id='.$row->slug.'&task=removesubcat'.$this->t['ps'] ).'">';
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-trash.png', JText::_('COM_PHOCAGALLERY_UNPUBLISH')).'</a>';
|
||||
//echo PhocaGalleryRenderFront::renderIcon('trash', $this->t['pi'].'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>'
|
||||
.'</a>';
|
||||
echo '</td>';
|
||||
|
||||
// Approved
|
||||
echo '<td align="center">';
|
||||
if ($row->approved == 1) {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-enabled"><title>'.Text::_('COM_PHOCAGALLERY_APPROVED').'</title><use xlink:href="#ph-si-enabled"></use></svg>';
|
||||
} else {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_NOT_APPROVED').'</title><use xlink:href="#ph-si-disabled"></use></svg>';
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
$linkUp = Route::_($this->t['pp'].'&id='.$row->slug.'&task=orderupsubcat'.$this->t['ps']);
|
||||
$linkDown = Route::_($this->t['pp'].'&id='.$row->slug.'&task=orderdownsubcat'.$this->t['ps']);
|
||||
|
||||
echo '<td class="order" align="right">'
|
||||
.'<span>'. $this->t['subcategorypagination']->orderUpIcon( $i, $row->orderup == 1, $linkUp, Text::_('COM_PHOCAGALLERY_MOVE_UP'), $this->t['subcategoryordering']).'</span> '
|
||||
.'<span>'. $this->t['subcategorypagination']->orderDownIcon( $i, $n, $row->orderdown == 1, $linkDown, Text::_('COM_PHOCAGALLERY_MOVE_DOWN'), $this->t['subcategoryordering'] ).'</span> ';
|
||||
|
||||
$disabled = $this->t['subcategoryordering'] ? '' : 'disabled="disabled"';
|
||||
echo '<input type="text" name="order[]" size="5" value="'. $row->ordering.'" '. $disabled.' class="form-control inputbox input-mini" style="text-align: center" />';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td align="center">'. $row->id .'</td>'
|
||||
.'</tr>';
|
||||
|
||||
$k = 1 - $k;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
?></tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" class="footer"><?php
|
||||
|
||||
$this->t['subcategorypagination']->setTab($this->t['currenttab']['createsubcategory']);
|
||||
if (count($this->t['subcategoryitems'])) {
|
||||
echo '<div class="pg-center">';
|
||||
echo '<div class="pg-inline">'
|
||||
.Text::_('COM_PHOCAGALLERY_DISPLAY_NUM') .' '
|
||||
.$this->t['subcategorypagination']->getLimitBox()
|
||||
.'</div>';
|
||||
echo '<div style="margin:0 10px 0 10px;display:inline;" class="sectiontablefooter'.$this->params->get( 'pageclass_sfx' ).'" >'
|
||||
.$this->t['subcategorypagination']->getPagesLinks()
|
||||
.'</div>'
|
||||
.'<div style="margin:0 10px 0 10px;display:inline;" class="pagecounter">'
|
||||
.$this->t['subcategorypagination']->getPagesCounter()
|
||||
.'</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['createsubcategory'];?>" />
|
||||
<input type="hidden" name="limitstartsubcat" value="<?php echo $this->t['subcategorypagination']->limitstart;?>" />
|
||||
<input type="hidden" name="limitstartimage" value="<?php echo $this->t['imagepagination']->limitstart;?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="parentcategoryid" value="<?php echo $this->t['parentcategoryid'] ?>"/>
|
||||
<input type="hidden" name="filter_order_subcat" value="<?php echo $this->listssubcat['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_subcat" value="" />
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<h4><?php echo Text::_('COM_PHOCAGALLERY_CREATE'); ?></h4>
|
||||
<form action="<?php echo 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> </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['maxcreatecatchar'];?>" readonly="readonly" class="form-control comment-input2" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="return(checkCreateSubCatForm());" id="phocagallerycreatesubcatsubmit"><?php echo Text::_('COM_PHOCAGALLERY_CREATE_SUBCATEGORY'); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' );
|
||||
|
||||
?>
|
||||
<input type="hidden" name="task" value="createsubcategory"/>
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<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="parentcategoryid" value="<?php echo $this->t['parentcategoryid'] ?>"/>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<p>'.Text::_('COM_PHOCAGALLERY_MAIN_CATEGORY_IS_NOT_CREATED').'</p>';
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
@ -0,0 +1,34 @@
|
||||
<?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-upload">';
|
||||
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
|
||||
echo '<form onsubmit="return OnUploadSubmitPG(\'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' ).' [ ';
|
||||
if ($this->t['uploadmaxsizeread'] != '0 B') {
|
||||
|
||||
echo Text::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).': '.$this->t['uploadmaxsizeread'].','
|
||||
.' ';
|
||||
}
|
||||
echo Text::_('COM_PHOCAGALLERY_MAX_RESOLUTION').': '. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
|
||||
echo ' </h4>';
|
||||
if ($this->t['catidimage'] == 0 || $this->t['catidimage'] == '') {
|
||||
echo '<div class="alert alert-error alert-danger">'.Text::_('COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY_TO_BE_ABLE_TO_UPLOAD_IMAGES').'</div>';
|
||||
}
|
||||
echo $this->t['su_output'];
|
||||
$this->t['upload_form_id'] = 'phocaGalleryUploadFormU';
|
||||
echo $this->loadTemplate('uploadform');
|
||||
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
@ -0,0 +1,60 @@
|
||||
<?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;
|
||||
?><table>
|
||||
<tr>
|
||||
<td><?php echo Text::_('COM_PHOCAGALLERY_FILENAME');?>:</td>
|
||||
<td>
|
||||
|
||||
<input type="file" id="file-upload" class="form-control phfileuploadcheckcat" name="Filedata" />
|
||||
<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> </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['maxuploadchar'];?>" readonly="readonly" class="form-control comment-input2" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="viewback" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['images'];?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="filter_order_image" value="<?php echo $this->listsimage['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_image" value="" />
|
||||
<input type="hidden" name="catid" value="<?php echo $this->t['catidimage'] ?>"/>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if ($this->t['upload_form_id'] == 'phocaGalleryUploadFormU') {
|
||||
//echo '<div id="loading-label" style="text-align:center">'
|
||||
//. JHtml::_('image', 'media/com_phocagallery/images/icon-switch.gif', '')
|
||||
//. ' '.JText::_('COM_PHOCAGALLERY_LOADING').'</div>';
|
||||
echo '<div id="loading-label-user" 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>';
|
||||
}
|
||||
?>
|
||||
99
components/com_phocagallery/views/user/tmpl/default_user.php
Normal file
99
components/com_phocagallery/views/user/tmpl/default_user.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?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\Session\Session;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
echo '<div id="phocagallery-user">'.$this->t['iepx'];
|
||||
?><h4><?php echo Text::_( 'COM_PHOCAGALLERY_USER' ); ?></h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_USER');?>:</strong></td>
|
||||
<td><?php echo $this->t['user']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_USERNAME');?>:</strong></td>
|
||||
<td><?php echo $this->t['username']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_MAIN_CATEGORY');?>:</strong></td>
|
||||
<td><?php echo $this->t['usermaincategory']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_NUMBER_OF_SUBCATEGORIES');?>:</strong></td>
|
||||
<td><?php echo $this->t['usersubcategory'] . ' ('.Text::_('COM_PHOCAGALLERY_MAX').': '.$this->t['usersubcatcount'].', '.Text::_('COM_PHOCAGALLERY_SPACE_LEFT').': '.$this->t['usersubcategoryleft'].')'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_NUMBER_OF_IMAGES');?>:</strong></td>
|
||||
<td><?php echo $this->t['userimages']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_USED_SPACE');?>:</strong></td>
|
||||
<td><?php echo $this->t['userimagesspace']. ' ('.Text::_('COM_PHOCAGALLERY_MAX').': '.$this->t['userimagesmaxspace'].', '.Text::_('COM_PHOCAGALLERY_SPACE_LEFT').': '.$this->t['userimagesspaceleft'].')'; ?></td>
|
||||
</tr>
|
||||
</table><?php
|
||||
|
||||
if ($this->t['enableuploadavatar'] == 1) {
|
||||
?><p> </p>
|
||||
<h4><?php
|
||||
echo Text::_( 'COM_PHOCAGALLERY_UPLOAD_AVATAR' ).' [ '. Text::_( 'COM_PHOCAGALLERY_MAX_SIZE' ).': '.$this->t['uploadmaxsizeread'].','
|
||||
.' '.Text::_('COM_PHOCAGALLERY_MAX_RESOLUTION').': '. $this->t['uploadmaxreswidth'].' x '.$this->t['uploadmaxresheight'].' px ]';
|
||||
?></h4>
|
||||
|
||||
<form onsubmit="return OnUploadSubmitUserPG();" action="<?php echo htmlspecialchars($this->t['actionamp']) . $this->session->getName().'='.$this->session->getId(); ?>&<?php echo Session::getFormToken();?>=1&viewback=user" id="uploadForm" method="post" enctype="multipart/form-data">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_AVATAR');?>:</strong></td>
|
||||
<td><?php echo $this->t['useravatarimg']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_APPROVED');?>:</strong></td>
|
||||
<td><?php
|
||||
if ($this->t['useravatarapproved'] == 1) {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('publish', $this->t['pi'].'icon-publish.png', JText::_('COM_PHOCAGALLERY_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-enabled"><title>'.Text::_('COM_PHOCAGALLERY_APPROVED').'</title><use xlink:href="#ph-si-enabled"></use></svg>';
|
||||
} else {
|
||||
//echo JHtml::_('image', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
//echo PhocaGalleryRenderFront::renderIcon('unpublish', $this->t['pi'].'icon-unpublish.png', JText::_('COM_PHOCAGALLERY_NOT_APPROVED'));
|
||||
echo '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_NOT_APPROVED').'</title><use xlink:href="#ph-si-disabled"></use></svg>';
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?php echo Text::_('COM_PHOCAGALLERY_FILENAME');?>:</strong></td>
|
||||
<td>
|
||||
<input type="file" id="file-upload" name="Filedata" />
|
||||
<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>
|
||||
</table>
|
||||
|
||||
<ul class="upload-queue" id="upload-queue">
|
||||
<li style="display: none" ></li>
|
||||
</ul>
|
||||
|
||||
<?php echo HTMLHelper::_( 'form.token' ); ?>
|
||||
<input type="hidden" name="task" value="uploadavatar"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['user'];?>" />
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="viewback" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
</form>
|
||||
<?php /*<div id="loading-label-user" style="text-align:center"><?php echo JHtml::_('image', $this->t['pi'].'icon-switch.gif', '') . ' '. JText::_('COM_PHOCAGALLERY_LOADING'); ?></div>*/
|
||||
echo '<div id="loading-label-user" 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 '</div>';
|
||||
?>
|
||||
@ -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');
|
||||
use Joomla\CMS\Language\Text;
|
||||
echo '<div id="phocagallery-ytbupload">';
|
||||
echo '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
|
||||
echo '<form onsubmit="return OnUploadSubmitPG(\'loading-label-ytb\');" action="'. $this->t['syu_url'] .'" id="phocaGalleryUploadFormYU" method="post">';
|
||||
//if ($this->t['ftp']) { echo PhocaGalleryFileUpload::renderFTPaccess();}
|
||||
//echo '<h4>';
|
||||
//echo JText::_('COM_PHOCAGALLERY_YTB_UPLOAD');
|
||||
//echo ' </h4>';
|
||||
if ($this->t['catidimage'] == 0 || $this->t['catidimage'] == '') {
|
||||
echo '<div class="alert alert-error alert-danger">'.Text::_('COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY_TO_BE_ABLE_TO_IMPORT_YOUTUBE_VIDEO').'</div>';
|
||||
}
|
||||
echo $this->t['syu_output'];
|
||||
|
||||
$this->t['upload_form_id'] = 'phocaGalleryUploadFormYU';
|
||||
?>
|
||||
|
||||
<div><?php echo Text::_( 'COM_PHOCAGALLERY_YTB_LINK' ); ?>:</div>
|
||||
<div>
|
||||
<input type="text" id="phocagallery-ytbupload-link" class="form-control" name="phocagalleryytbuploadlink" value="" maxlength="255" size="48" /></br>
|
||||
<input type="submit" class="btn btn-primary" id="file-upload-submit" value="<?php echo Text::_('COM_PHOCAGALLERY_START_UPLOAD'); ?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="user" />
|
||||
<input type="hidden" name="viewback" value="user" />
|
||||
<input type="hidden" name="view" value="user"/>
|
||||
<input type="hidden" name="tab" value="<?php echo $this->t['currenttab']['images'];?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->itemId ?>"/>
|
||||
<input type="hidden" name="filter_order_image" value="<?php echo $this->listsimage['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir_image" value="" />
|
||||
<input type="hidden" name="catid" value="<?php echo $this->t['catidimage'] ?>"/>
|
||||
|
||||
<?php
|
||||
if ($this->t['upload_form_id'] == 'phocaGalleryUploadFormYU') {
|
||||
//echo '<div id="loading-label-ytb" style="text-align:center">'
|
||||
//. JHtml::_('image', 'media/com_phocagallery/images/icon-switch.gif', '')
|
||||
//. ' '.JText::_('COM_PHOCAGALLERY_LOADING').'</div>';
|
||||
echo '<div id="loading-label-user" 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 '</form>';
|
||||
echo '</div>';
|
||||
1
components/com_phocagallery/views/user/tmpl/index.html
Normal file
1
components/com_phocagallery/views/user/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
626
components/com_phocagallery/views/user/view.html.php
Normal file
626
components/com_phocagallery/views/user/view.html.php
Normal file
@ -0,0 +1,626 @@
|
||||
<?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\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Client\ClientHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Session\Session;
|
||||
jimport( 'joomla.client.helper' );
|
||||
jimport( 'joomla.application.component.view' );
|
||||
jimport( 'joomla.html.pane' );
|
||||
phocagalleryimport('phocagallery.file.fileupload');
|
||||
phocagalleryimport( 'phocagallery.file.fileuploadmultiple' );
|
||||
phocagalleryimport( 'phocagallery.file.fileuploadsingle' );
|
||||
phocagalleryimport( 'phocagallery.file.fileuploadjava' );
|
||||
phocagalleryimport('phocagallery.avatar.avatar');
|
||||
phocagalleryimport('phocagallery.render.renderadmin');
|
||||
phocagalleryimport('phocagallery.html.category');
|
||||
//phocagalleryimport('phocagallery.pagination.paginationuser');
|
||||
use Joomla\String\StringHelper;
|
||||
|
||||
class PhocaGalleryViewUser extends HtmlView
|
||||
{
|
||||
protected $_context_subcat = 'com_phocagallery.phocagalleryusersubcat';
|
||||
protected $_context_image = 'com_phocagallery.phocagalleryuserimage';
|
||||
protected $t;
|
||||
|
||||
function display($tpl = null) {
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
$app = Factory::getApplication();
|
||||
$document = Factory::getDocument();
|
||||
$menus = $app->getMenu();
|
||||
$menu = $menus->getActive();
|
||||
$this->params = $app->getParams();
|
||||
$user = Factory::getUser();
|
||||
$path = PhocaGalleryPath::getPath();
|
||||
$this->itemId = $app->input->get('Itemid', 0, 'int');
|
||||
|
||||
$neededAccessLevels = PhocaGalleryAccess::getNeededAccessLevels();
|
||||
$access = PhocaGalleryAccess::isAccess($user->getAuthorisedViewLevels(), $neededAccessLevels);
|
||||
|
||||
|
||||
|
||||
$this->t['pi'] = 'media/com_phocagallery/images/';
|
||||
$this->t['pp'] = 'index.php?option=com_phocagallery&view=user&controller=user';
|
||||
$this->t['pl'] = 'index.php?option=com_users&view=login&return='.base64_encode($this->t['pp'].'&Itemid='. $this->itemId);
|
||||
// LIBRARY
|
||||
$library = PhocaGalleryLibrary::getLibrary();
|
||||
//$libraries['pg-css-ie'] = $library->getLibrary('pg-css-ie');
|
||||
|
||||
// Only registered users
|
||||
if (!$access) {
|
||||
$app->enqueueMessage(Text::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'), 'error');
|
||||
$app->redirect(Route::_($this->t['pl'], false));
|
||||
exit;
|
||||
}
|
||||
|
||||
$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']);
|
||||
}
|
||||
|
||||
PhocaGalleryRenderFront::renderAllCSS();
|
||||
|
||||
// Custom order
|
||||
// administrator\components\com_phocagallery\libraries\phocagallery\html\grid.php replaces
|
||||
// libraries\cms\html\grid.php (libraries\joomla\grid\grid.php) and the javascript:
|
||||
// media\system\js\core-uncompressed.js (core.js)
|
||||
PhocaGalleryGrid::renderSortJs();
|
||||
|
||||
|
||||
|
||||
// = = = = = = = = = = =
|
||||
// PANE
|
||||
// = = = = = = = = = = =
|
||||
// - - - - - - - - - -
|
||||
// ALL TABS
|
||||
// - - - - - - - - - -
|
||||
// UCP is disabled (security reasons)
|
||||
|
||||
if ((int)$this->params->get( 'enable_user_cp', 0 ) == 0) {
|
||||
$app->enqueueMessage(Text::_('COM_PHOCAGALLERY_UCP_DISABLED'), 'error');
|
||||
$app->redirect(Uri::base(true));
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->t['tab'] = $app->input->get('tab', 0, 'string');
|
||||
|
||||
$this->t['maxuploadchar'] = $this->params->get( 'max_upload_char', 1000 );
|
||||
$this->t['maxcreatecatchar'] = $this->params->get( 'max_create_cat_char', 1000 );
|
||||
$this->t['showpageheading'] = $this->params->get( 'show_page_heading', 1 );
|
||||
$this->t['javaboxwidth'] = $this->params->get( 'java_box_width', 480 );
|
||||
$this->t['javaboxheight'] = $this->params->get( 'java_box_height', 480 );
|
||||
$this->t['enableuploadavatar'] = $this->params->get( 'enable_upload_avatar', 1 );
|
||||
$this->t['uploadmaxsize'] = $this->params->get( 'upload_maxsize', 3145728 );
|
||||
$this->t['uploadmaxsizeread'] = PhocaGalleryFile::getFileSizeReadable($this->t['uploadmaxsize']);
|
||||
$this->t['uploadmaxreswidth'] = $this->params->get( 'upload_maxres_width', 3072 );
|
||||
$this->t['uploadmaxresheight'] = $this->params->get( 'upload_maxres_height', 2304 );
|
||||
$this->t['multipleuploadchunk'] = $this->params->get( 'multiple_upload_chunk', 0 );
|
||||
$this->t['displaytitleupload'] = $this->params->get( 'display_title_upload', 0 );
|
||||
$this->t['displaydescupload'] = $this->params->get( 'display_description_upload', 0 );
|
||||
$this->t['enablejava'] = $this->params->get( 'enable_java', -1);
|
||||
$this->t['enablemultiple'] = $this->params->get( 'enable_multiple', 0 );
|
||||
$this->t['ytbupload'] = $this->params->get( 'youtube_upload', 0 );
|
||||
$this->t['multipleuploadmethod'] = $this->params->get( 'multiple_upload_method', 4 );
|
||||
$this->t['multipleresizewidth'] = $this->params->get( 'multiple_resize_width', -1 );
|
||||
$this->t['multipleresizeheight'] = $this->params->get( 'multiple_resize_height', -1 );
|
||||
$this->t['usersubcatcount'] = $this->params->get( 'user_subcat_count', 5 );
|
||||
$this->t['userimagesmaxspace'] = $this->params->get( 'user_images_max_size', 20971520 );
|
||||
|
||||
$this->t['iepx'] = '<div style="font-size:1px;height:1px;margin:0px;padding:0px;"> </div>';
|
||||
|
||||
//Subcateogry
|
||||
$this->t['parentid'] = $app->input->get('parentcategoryid', 0, 'int');
|
||||
|
||||
//$document->addScript(JUri::base(true).'/media/com_phocagallery/js/comments.js');
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::renderOnUploadJS());
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::renderDescriptionCreateCatJS((int)$this->t['maxcreatecatchar']));
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::userTabOrdering());// SubCategory + Image
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::renderDescriptionCreateSubCatJS((int)$this->t['maxcreatecatchar']));
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::saveOrderUserJS());
|
||||
|
||||
$model = $this->getModel('user');
|
||||
$ownerMainCategory = $model->getOwnerMainCategory($user->id);
|
||||
|
||||
|
||||
$this->t['usertab'] = 1;
|
||||
$this->t['createcategory'] = 1;
|
||||
$this->t['createsubcategory'] = 1;
|
||||
$this->t['images'] = 1;
|
||||
$this->t['displayupload'] = 1;
|
||||
|
||||
|
||||
// Tabs
|
||||
$displayTabs = 0;
|
||||
|
||||
if ((int)$this->t['usertab'] == 0) {
|
||||
$currentTab['user'] = -1;
|
||||
} else {
|
||||
$currentTab['user'] = $displayTabs;
|
||||
$displayTabs++;
|
||||
}
|
||||
|
||||
if ((int)$this->t['createcategory'] == 0) {
|
||||
$currentTab['createcategory'] = -1;
|
||||
} else {
|
||||
$currentTab['createcategory'] = $displayTabs;
|
||||
$displayTabs++;
|
||||
}
|
||||
|
||||
if ((int)$this->t['createsubcategory'] == 0) {
|
||||
$currentTab['createsubcategory'] = -1;
|
||||
} else {
|
||||
$currentTab['createsubcategory'] = $displayTabs;
|
||||
$displayTabs++;
|
||||
}
|
||||
|
||||
|
||||
if ((int)$this->t['displayupload'] == 0) {
|
||||
$currentTab['images'] = -1;
|
||||
}else {
|
||||
$currentTab['images'] = $displayTabs;
|
||||
$displayTabs++;
|
||||
}
|
||||
|
||||
$this->t['displaytabs'] = $displayTabs;
|
||||
$this->t['currenttab'] = $currentTab;
|
||||
|
||||
|
||||
// ACTION
|
||||
$this->t['action'] = $uri->toString();
|
||||
$this->t['ftp'] = !ClientHelper::hasCredentials('ftp');
|
||||
$sess = Factory::getSession();
|
||||
$this->session = $sess;
|
||||
|
||||
|
||||
// SEF problem
|
||||
$isThereQM = false;
|
||||
$isThereQM = preg_match("/\?/i", $this->t['action']);
|
||||
if ($isThereQM) {
|
||||
$amp = '&';// will be translated to htmlspecialchars
|
||||
} else {
|
||||
$amp = '?';
|
||||
}
|
||||
|
||||
$this->t['actionamp'] = $this->t['action'] . $amp;
|
||||
$this->t['istheretab'] = false;
|
||||
$this->t['istheretab'] = preg_match("/tab=/i", $this->t['action']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// EDIT - subcategory, image
|
||||
$this->t['task'] = $app->input->get( 'task', '', 'string');
|
||||
$id = $app->input->get( 'id', '', 'string');
|
||||
$idAlias = $id;
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// USER (AVATAR)
|
||||
// - - - - - - - - - - -
|
||||
|
||||
$this->t['user'] = $user->name;
|
||||
$this->t['username'] = $user->username;
|
||||
$this->t['useravatarimg'] = HTMLHelper::_('image', $this->t['pi'].'phoca_thumb_m_no_image.png', '');
|
||||
$this->t['useravatarapproved'] = 0;
|
||||
$userAvatar = $model->getUserAvatar($user->id);
|
||||
|
||||
if ($userAvatar) {
|
||||
$pathAvatarAbs = $path->avatar_abs .'thumbs/phoca_thumb_m_'. $userAvatar->avatar;
|
||||
$pathAvatarRel = $path->avatar_rel . 'thumbs/phoca_thumb_m_'. $userAvatar->avatar;
|
||||
if (File::exists($pathAvatarAbs)){
|
||||
$this->t['useravatarimg'] = '<img src="'.Uri::base(true) . '/' . $pathAvatarRel.'?imagesid='.md5(uniqid(time())).'" alt="" />';
|
||||
$this->t['useravatarapproved'] = $userAvatar->approved;
|
||||
}
|
||||
}
|
||||
|
||||
if ($ownerMainCategory) {
|
||||
$this->t['usermaincategory'] = $ownerMainCategory->title;
|
||||
} else {
|
||||
$this->t['usermaincategory'] = '<svg class="ph-si ph-si-disabled"><title>'.Text::_('COM_PHOCAGALLERY_NOT_CREATED').'</title><use xlink:href="#ph-si-disabled"></use></svg>'
|
||||
.' ('.Text::_('COM_PHOCAGALLERY_NOT_CREATED').')';
|
||||
}
|
||||
$this->t['usersubcategory'] = $model->getCountUserSubCat($user->id);
|
||||
$this->t['usersubcategoryleft'] = (int)$this->t['usersubcatcount'] - (int)$this->t['usersubcategory'];
|
||||
if ((int)$this->t['usersubcategoryleft'] < 0) {$this->t['usersubcategoryleft'] = 0;}
|
||||
$this->t['userimages'] = $model->getCountUserImage($user->id);
|
||||
$this->t['userimagesspace'] = $model->getSumUserImage($user->id);
|
||||
$this->t['userimagesspaceleft'] = (int)$this->t['userimagesmaxspace'] - (int)$this->t['userimagesspace'];
|
||||
if ((int)$this->t['userimagesspaceleft'] < 0) {$this->t['userimagesspaceleft'] = 0;}
|
||||
$this->t['userimagesspace'] = PhocaGalleryFile::getFileSizeReadable($this->t['userimagesspace']);
|
||||
$this->t['userimagesspaceleft'] = PhocaGalleryFile::getFileSizeReadable($this->t['userimagesspaceleft']);
|
||||
$this->t['userimagesmaxspace'] = PhocaGalleryFile::getFileSizeReadable($this->t['userimagesmaxspace']);
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// MAIN CATEGORY
|
||||
// - - - - - - - - - - -
|
||||
$ownerMainCategory = $model->getOwnerMainCategory($user->id);
|
||||
if (!empty($ownerMainCategory->id)) {
|
||||
if ((int)$ownerMainCategory->published == 1) {
|
||||
$this->t['categorycreateoredithead'] = Text::_('COM_PHOCAGALLERY_MAIN_CATEGORY');
|
||||
$this->t['categorycreateoredit'] = Text::_('COM_PHOCAGALLERY_EDIT');
|
||||
$this->t['categorytitle'] = $ownerMainCategory->title;
|
||||
$this->t['categoryapproved'] = $ownerMainCategory->approved;
|
||||
$this->t['categorydescription'] = $ownerMainCategory->description;
|
||||
$this->t['categorypublished'] = 1;
|
||||
} else {
|
||||
$this->t['categorypublished'] = 0;
|
||||
}
|
||||
} else {
|
||||
$this->t['categorycreateoredithead'] = Text::_('COM_PHOCAGALLERY_MAIN_CATEGORY');
|
||||
$this->t['categorycreateoredit'] = Text::_('COM_PHOCAGALLERY_CREATE');
|
||||
$this->t['categorytitle'] = '';
|
||||
$this->t['categorydescription'] = '';
|
||||
$this->t['categoryapproved'] = '';
|
||||
$this->t['categorypublished'] = -1;
|
||||
}
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// SUBCATEGORY
|
||||
// - - - - - - - - - - -
|
||||
|
||||
$lists_subcat = array();
|
||||
if (!empty($ownerMainCategory->id)) {
|
||||
|
||||
// EDIT
|
||||
$this->t['categorysubcatedit'] = $model->getCategory((int)$id, $user->id);
|
||||
$this->t['displaysubcategory'] = 1;
|
||||
|
||||
// Get All Data - Subcategories
|
||||
$this->t['subcategoryitems'] = $model->getDataSubcat($user->id);
|
||||
$this->t['subcategorytotal'] = count($this->t['subcategoryitems']);
|
||||
$model->setTotalSubCat($this->t['subcategorytotal']);
|
||||
$this->t['subcategorypagination'] = $model->getPaginationSubCat($user->id);
|
||||
$this->t['subcategoryitems'] = array_slice($this->t['subcategoryitems'],(int)$this->t['subcategorypagination']->limitstart, (int)$this->t['subcategorypagination']->limit);
|
||||
|
||||
$filter_published_subcat = $app->getUserStateFromRequest( $this->_context_subcat.'.filter_published', 'filter_published_subcat', '', 'word' );
|
||||
$filter_catid_subcat = $app->getUserStateFromRequest( $this->_context_subcat.'.filter_catid', 'filter_catid_subcat', 0, 'int' );
|
||||
|
||||
$filter_order_subcat = $app->getUserStateFromRequest( $this->_context_subcat.'.filter_order', 'filter_order_subcat', 'a.ordering', 'cmd' );
|
||||
$filter_order_Dir_subcat= $app->getUserStateFromRequest( $this->_context_subcat.'.filter_order_Dir', 'filter_order_Dir_subcat', '', 'word' );
|
||||
$search_subcat = $app->getUserStateFromRequest( $this->_context_subcat.'.search', 'phocagallerysubcatsearch', '', 'string' );
|
||||
if (strpos($search_subcat, '"') !== false) {
|
||||
$search_subcat = str_replace(array('=', '<'), '', $search_subcat);
|
||||
}
|
||||
$search_subcat = StringHelper::strtolower( $search_subcat );
|
||||
|
||||
$categories = $model->getCategoryList($user->id);
|
||||
|
||||
|
||||
if (!empty($categories)) {
|
||||
$javascript = 'class="form-select" onchange="document.phocagallerysubcatform.submit();"';
|
||||
$tree = array();
|
||||
$text = '';
|
||||
$tree = PhocaGalleryCategoryhtml::CategoryTreeOption($categories, $tree,0, $text, -1);
|
||||
|
||||
array_unshift($tree, HTMLHelper::_('select.option', '0', '- '.Text::_('COM_PHOCAGALLERY_SELECT_CATEGORY').' -', 'value', 'text'));
|
||||
$lists_subcat['catid'] = HTMLHelper::_( 'select.genericlist', $tree, 'filter_catid_subcat', $javascript , 'value', 'text', $filter_catid_subcat );
|
||||
}
|
||||
|
||||
$this->t['parentcategoryid'] = $filter_catid_subcat;
|
||||
|
||||
// state filter
|
||||
//$lists['state'] = JHtml::_('grid.state', $filter_published );
|
||||
$state_subcat[] = HTMLHelper::_('select.option', '', '- '. Text::_( 'COM_PHOCAGALLERY_SELECT_STATE' ) .' -' );
|
||||
$state_subcat[] = HTMLHelper::_('select.option', 'P', Text::_( 'COM_PHOCAGALLERY_PUBLISHED' ) );
|
||||
$state_subcat[] = HTMLHelper::_('select.option', 'U', Text::_( 'COM_PHOCAGALLERY_UNPUBLISHED') );
|
||||
$lists_subcat['state'] = HTMLHelper::_('select.genericlist', $state_subcat, 'filter_published_subcat', 'class="form-select" size="1" onchange="document.phocagallerysubcatform.submit();"', 'value', 'text', $filter_published_subcat );
|
||||
|
||||
// table ordering
|
||||
$lists_subcat['order_Dir'] = $filter_order_Dir_subcat;
|
||||
$lists_subcat['order'] = $filter_order_subcat;
|
||||
|
||||
$this->t['subcategoryordering'] = ($lists_subcat['order'] == 'a.ordering');//Ordering allowed ?
|
||||
|
||||
// search filter
|
||||
$lists_subcat['search'] = $search_subcat;
|
||||
} else {
|
||||
$this->t['displaysubcategory'] = 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// IMAGES
|
||||
// - - - - - - - - - - -
|
||||
$lists_image = array();
|
||||
if (!empty($ownerMainCategory->id)) {
|
||||
$catAccess = PhocaGalleryAccess::getCategoryAccess((int)$ownerMainCategory->id);
|
||||
|
||||
// EDIT
|
||||
$this->t['imageedit'] = $model->getImage((int)$id, $user->id);
|
||||
|
||||
$this->t['imageitems'] = $model->getDataImage($user->id);
|
||||
$this->t['imagetotal'] = $model->getTotalImage($user->id);
|
||||
$this->t['imagepagination'] = $model->getPaginationImage($user->id);
|
||||
|
||||
$filter_published_image = $app->getUserStateFromRequest( $this->_context_image.'.filter_published', 'filter_published_image', '', 'word' );
|
||||
$filter_catid_image = $app->getUserStateFromRequest( $this->_context_image.'.filter_catid', 'filter_catid_image', 0, 'int' );
|
||||
$filter_order_image = $app->getUserStateFromRequest( $this->_context_image.'.filter_order', 'filter_order_image', 'a.ordering', 'cmd' );
|
||||
$filter_order_Dir_image= $app->getUserStateFromRequest( $this->_context_image.'.filter_order_Dir', 'filter_order_Dir_image', '', 'word' );
|
||||
$search_image = $app->getUserStateFromRequest( $this->_context_image.'.search', 'phocagalleryimagesearch', '', 'string' );
|
||||
if (strpos($search_image, '"') !== false) {
|
||||
$search_image = str_replace(array('=', '<'), '', $search_image);
|
||||
}
|
||||
$search_image = StringHelper::strtolower( $search_image );
|
||||
|
||||
$categoriesImage = $model->getCategoryList($user->id);
|
||||
if (!empty($categoriesImage)) {
|
||||
//$javascript = 'class="form-control" size="1" onchange="document.phocagalleryimageform.submit();"';
|
||||
$javascript = 'class="form-select" size="1" onchange="document.getElementById(\'phocagalleryimageform\').submit();"';
|
||||
$tree = array();
|
||||
$text = '';
|
||||
$tree = PhocaGalleryCategoryhtml::CategoryTreeOption($categoriesImage, $tree,0, $text, -1);
|
||||
|
||||
array_unshift($tree, HTMLHelper::_('select.option', '0', '- '.Text::_('COM_PHOCAGALLERY_SELECT_CATEGORY').' -', 'value', 'text'));
|
||||
$lists_image['catid'] = HTMLHelper::_( 'select.genericlist', $tree, 'filter_catid_image', $javascript , 'value', 'text', $filter_catid_image );
|
||||
}
|
||||
|
||||
// state filter
|
||||
$state_image[] = HTMLHelper::_('select.option', '', '- '. Text::_( 'COM_PHOCAGALLERY_SELECT_STATE' ) .' -' );
|
||||
$state_image[] = HTMLHelper::_('select.option', 'P', Text::_( 'COM_PHOCAGALLERY_FIELD_PUBLISHED_LABEL' ) );
|
||||
$state_image[] = HTMLHelper::_('select.option', 'U', Text::_( 'COM_PHOCAGALLERY_FIELD_UNPUBLISHED_LABEL') );
|
||||
$lists_image['state'] = HTMLHelper::_('select.genericlist', $state_image, 'filter_published_image', 'class="form-select" size="1" onchange="document.getElementById(\'phocagalleryimageform\').submit();"', 'value', 'text', $filter_published_image );
|
||||
|
||||
// table ordering
|
||||
$lists_image['order_Dir'] = $filter_order_Dir_image;
|
||||
$lists_image['order'] = $filter_order_image;
|
||||
|
||||
$this->t['imageordering'] = ($lists_image['order'] == 'a.ordering');//Ordering allowed ?
|
||||
|
||||
// search filter
|
||||
$lists_image['search'] = $search_image;
|
||||
$this->t['catidimage'] = $filter_catid_image;
|
||||
|
||||
// Upload
|
||||
$this->t['displayupload'] = 0;
|
||||
// USER RIGHT - UPLOAD - - - - - - - - - - -
|
||||
// 2, 2 means that user access will be ignored in function getUserRight for display Delete button
|
||||
$rightDisplayUpload = 0;// default is to null (all users cannot upload)
|
||||
if (!empty($catAccess)) {
|
||||
$rightDisplayUpload = PhocaGalleryAccess::getUserRight('uploaduserid', $catAccess->uploaduserid, 2, $user->getAuthorisedViewLevels(), $user->get('id', 0), 0);
|
||||
}
|
||||
if ($rightDisplayUpload == 1) {
|
||||
$this->t['displayupload'] = 1;
|
||||
$document->addCustomTag(PhocaGalleryRenderFront::renderDescriptionUploadJS((int)$this->t['maxuploadchar']));
|
||||
}
|
||||
// - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// USER RIGHT - ACCESS - - - - - - - - - - -
|
||||
$rightDisplay = 1;//default is set to 1 (all users can see the category)
|
||||
if (!empty($catAccess)) {
|
||||
|
||||
$rightDisplay = PhocaGalleryAccess::getUserRight ('accessuserid', $catAccess->accessuserid, $catAccess->access, $user->getAuthorisedViewLevels(), $user->get('id', 0), 1);
|
||||
}
|
||||
if ($rightDisplay == 0) {
|
||||
$app->enqueueMessage(Text::_('COM_PHOCAGALLERY_NOT_AUTHORISED_ACTION'), 'error');
|
||||
$app->redirect(Route::_($this->t['pl'], false));
|
||||
exit;
|
||||
}
|
||||
// - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// = = = = = = = = = =
|
||||
// U P L O A D
|
||||
// = = = = = = = = = =
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Upload
|
||||
// - - - - - - - - - - -
|
||||
if ((int)$this->t['displayupload'] == 1) {
|
||||
$sU = new PhocaGalleryFileUploadSingle();
|
||||
$sU->returnUrl = Route::_($this->t['action'] . $amp .'task=upload&'. $this->session->getName().'='.$this->session->getId()
|
||||
.'&'. Session::getFormToken().'=1&viewback=category&tab='.$this->t['currenttab']['images']);
|
||||
$sU->tab = $this->t['currenttab']['images'];
|
||||
$this->t['su_output'] = $sU->getSingleUploadHTML(1);
|
||||
$this->t['su_url'] = Route::_($this->t['action'] . $amp .'task=upload&'. $this->session->getName().'='.$this->session->getId()
|
||||
.'&'. Session::getFormToken().'=1&viewback=category&tab='.$this->t['currenttab']['images']);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Youtube Upload (single upload form can be used)
|
||||
// - - - - - - - - - - -
|
||||
if ((int)$this->t['ytbupload'] > 0) {
|
||||
$sYU = new PhocaGalleryFileUploadSingle();
|
||||
$sYU->returnUrl = Route::_($this->t['action'] . $amp .'task=ytbupload&'. $this->session->getName().'='.$this->session->getId()
|
||||
.'&'. Session::getFormToken().'=1&viewback=category&tab='.$this->t['currenttab']['images']);
|
||||
$sYU->tab = $this->t['currenttab']['images'];
|
||||
$this->t['syu_output'] = $sYU->getSingleUploadHTML(1);
|
||||
$this->t['syu_url'] = Route::_($this->t['action'] . $amp .'task=ytbupload&'. $this->session->getName().'='.$this->session->getId()
|
||||
.'&'. Session::getFormToken().'=1&viewback=category&tab='.$this->t['currenttab']['images']);
|
||||
}
|
||||
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Multiple Upload
|
||||
// - - - - - - - - - - -
|
||||
// Get infos from multiple upload
|
||||
$muFailed = $app->input->get( 'mufailed', '0', 'int' );
|
||||
$muUploaded = $app->input->get( 'muuploaded', '0', 'int' );
|
||||
$this->t['mu_response_msg'] = $muUploadedMsg = '';
|
||||
|
||||
if ($muUploaded > 0) {
|
||||
$muUploadedMsg = Text::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG'). ': ' . $muUploaded;
|
||||
}
|
||||
if ($muFailed > 0) {
|
||||
$muFailedMsg = Text::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG'). ': ' . $muFailed;
|
||||
}
|
||||
if ($muFailed > 0 && $muUploaded > 0) {
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-info">'
|
||||
.Text::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG'). ': ' . $muUploaded .'<br />'
|
||||
.Text::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG'). ': ' . $muFailed.'</div>';
|
||||
} else if ($muFailed > 0 && $muUploaded == 0) {
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-error alert-danger">'
|
||||
.Text::_('COM_PHOCAGALLERY_COUNT_NOT_UPLOADED_IMG'). ': ' . $muFailed.'</div>';
|
||||
} else if ($muFailed == 0 && $muUploaded > 0){
|
||||
$this->t['mu_response_msg'] = '<div class="alert alert-success">'
|
||||
.Text::_('COM_PHOCAGALLERY_COUNT_UPLOADED_IMG'). ': ' . $muUploaded.'</div>';
|
||||
} else {
|
||||
$this->t['mu_response_msg'] = '';
|
||||
}
|
||||
|
||||
if((int)$this->t['enablemultiple'] == 1 && (int)$this->t['displayupload'] == 1) {
|
||||
|
||||
PhocaGalleryFileUploadMultiple::renderMultipleUploadLibraries();
|
||||
$mU = new PhocaGalleryFileUploadMultiple();
|
||||
$mU->frontEnd = 2;
|
||||
$mU->method = $this->t['multipleuploadmethod'];
|
||||
$mU->url = Route::_($this->t['action'] . $amp .'controller=user&task=multipleupload&'
|
||||
. $this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab='.$this->t['currenttab']['images']
|
||||
. '&catid='.$this->t['catidimage']);
|
||||
$mU->reload = Route::_($this->t['action'] . $amp
|
||||
. $this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab='.$this->t['currenttab']['images']);
|
||||
$mU->maxFileSize = PhocaGalleryFileUploadMultiple::getMultipleUploadSizeFormat($this->t['uploadmaxsize']);
|
||||
$mU->chunkSize = '1mb';
|
||||
$mU->imageHeight = $this->t['multipleresizeheight'];
|
||||
$mU->imageWidth = $this->t['multipleresizewidth'];
|
||||
$mU->imageQuality = 100;
|
||||
$mU->renderMultipleUploadJS(0, $this->t['multipleuploadchunk']);
|
||||
$this->t['mu_output']= $mU->getMultipleUploadHTML();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - -
|
||||
// Java Upload
|
||||
// - - - - - - - - - - -
|
||||
if((int)$this->t['enablejava'] == 1 && (int)$this->t['displayupload'] == 1) {
|
||||
$jU = new PhocaGalleryFileUploadJava();
|
||||
$jU->width = $this->t['javaboxwidth'];
|
||||
$jU->height = $this->t['javaboxheight'];
|
||||
$jU->resizewidth = $this->t['multipleresizewidth'];
|
||||
$jU->resizeheight = $this->t['multipleresizeheight'];
|
||||
$jU->uploadmaxsize = $this->t['uploadmaxsize'];
|
||||
$jU->returnUrl = Route::_($this->t['action'] . $amp
|
||||
. $this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab='.$this->t['currenttab']['images']);
|
||||
$jU->url = Route::_($this->t['action'] . $amp .'controller=user&task=javaupload&'
|
||||
. $this->session->getName().'='.$this->session->getId().'&'
|
||||
. Session::getFormToken().'=1&tab='.$this->t['currenttab']['images']
|
||||
. '&catid='.$this->t['catidimage']);
|
||||
$jU->source = Uri::root(true).'/media/com_phocagallery/js/jupload/wjhk.jupload.jar';
|
||||
$this->t['ju_output'] = $jU->getJavaUploadHTML();
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->t['displayupload'] = 0;
|
||||
}
|
||||
|
||||
if (!empty($ownerMainCategory->id)) {
|
||||
$this->t['ps'] = '&tab='. $this->t['currenttab']['createsubcategory']
|
||||
. '&limitstartsubcat='.$this->t['subcategorypagination']->limitstart
|
||||
. '&limitstartimage='.$this->t['imagepagination']->limitstart;
|
||||
} else {
|
||||
$this->t['ps'] = '&tab='. $this->t['currenttab']['createsubcategory'];
|
||||
}
|
||||
|
||||
if (!empty($ownerMainCategory->id)) {
|
||||
$this->t['psi'] = '&tab='. $this->t['currenttab']['images']
|
||||
. '&limitstartsubcat='.$this->t['subcategorypagination']->limitstart
|
||||
. '&limitstartimage='.$this->t['imagepagination']->limitstart;
|
||||
} else {
|
||||
$this->t['psi'] = '&tab='. $this->t['currenttab']['images'];
|
||||
}
|
||||
|
||||
// ASIGN
|
||||
$this->listssubcat = $lists_subcat;
|
||||
$this->listsimage = $lists_image;
|
||||
//$this->assignRef( 'tmpl', $this->t);
|
||||
//$this->assignRef( 'params', $this->params);
|
||||
$sess = Factory::getSession();
|
||||
$this->session = $sess;
|
||||
$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);
|
||||
} 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', ''));
|
||||
}
|
||||
|
||||
/*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);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user