primo commit

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

View File

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

View File

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

View File

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

View File

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