primo commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,309 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
$user = Factory::getUser();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($this->lists['order'] == 'a.ordering');
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
|
||||
|
||||
$js = '
|
||||
function insertLink() {';
|
||||
|
||||
|
||||
$items = array('imageshadow', 'fontcolor', 'bgcolor', 'bgcolorhover', 'imagebgcolor', 'bordercolor', 'bordercolorhover', 'detail','displayname', 'displaydetail', 'displaydownload', 'displaybuttons', 'displaydescription', 'descriptionheight' ,'namefontsize', 'namenumchar', 'enableswitch', 'overlib', 'piclens','float', 'boxspace', 'displayimgrating', 'pluginlink', 'type', 'minboxwidth' );
|
||||
$itemsArrayOutput = '';
|
||||
foreach ($items as $key => $value) {
|
||||
|
||||
$js .= 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
|
||||
.'if ('.$value.' != \'\') {'. "\n"
|
||||
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
|
||||
.'}';
|
||||
$itemsArrayOutput .= '+'.$value;
|
||||
}
|
||||
|
||||
$js .= '
|
||||
/* Category */
|
||||
var categoryid = document.getElementById("filter_catid").value;
|
||||
var categoryIdOutput = \'\';
|
||||
if (categoryid != \'\') {
|
||||
categoryIdOutput = "|categoryid="+categoryid;
|
||||
}
|
||||
|
||||
/* Image */
|
||||
var imageIdOutput = \'\';
|
||||
len = document.getElementsByName("imageid").length;
|
||||
for (i = 0; i <len; i++) {
|
||||
if (document.getElementsByName(\'imageid\')[i].checked) {
|
||||
imageid = document.getElementsByName(\'imageid\')[i].value;
|
||||
if (imageid != \'\' && parseInt(imageid) > 0) {
|
||||
imageIdOutput = "|imageid="+imageid;
|
||||
} else {
|
||||
imageIdOutput = \'\';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (categoryIdOutput != \'\' && parseInt(categoryid) > 0) {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("'. Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ).'");
|
||||
return false;
|
||||
}
|
||||
if (imageIdOutput != \'\' && parseInt(imageid) > 0) {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("'. Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_IMAGE', true ).'");
|
||||
return false;
|
||||
}
|
||||
var tag = "{phocagallery view=category"+categoryIdOutput+imageIdOutput'. $itemsArrayOutput .'+"}";
|
||||
window.parent.jInsertEditorText(tag, \''. $this->t['ename'].'\');
|
||||
window.parent.SqueezeBox.close();
|
||||
}';
|
||||
|
||||
Factory::getDocument()->addScriptDeclaration($js);
|
||||
?>
|
||||
<div id="phocagallery-links">
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
|
||||
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<table class="admintable" width="100%">
|
||||
<tr>
|
||||
<td class="key" align="right" width="20%">
|
||||
<label for="title">
|
||||
<?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?>
|
||||
</label>
|
||||
</td>
|
||||
<td width="80%">
|
||||
<input type="text" name="search" id="search" value="<?php echo PhocaGalleryText::filterValue($this->lists['search'], 'text');?>" class="text_area" onchange="document.adminForm.submit();" />
|
||||
<button onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
|
||||
<button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key" align="right" nowrap="nowrap">
|
||||
<label for="title" nowrap="nowrap">
|
||||
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
|
||||
</label>
|
||||
</td>
|
||||
<td><?php echo $this->lists['catid']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="editcell">
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
|
||||
<th width="1"></th>
|
||||
<th class="image" width="2" align="center"><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></th>
|
||||
<th class="title" width="50%"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
<th width="20%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_FILENAME', 'a.filename', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
|
||||
|
||||
<th width="1%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
|
||||
$row = &$this->items[$i];
|
||||
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo $this->t['pagination']->getRowOffset( $i ); ?></td>
|
||||
<td><input type="radio" name="imageid" value="<?php echo $row->id ?>" /></td>
|
||||
<td align="center" valign="middle">
|
||||
<div class="phocagallery-box-file">
|
||||
<center>
|
||||
<div class="phocagallery-box-file-first">
|
||||
<div class="phocagallery-box-file-second">
|
||||
<div class="phocagallery-box-file-third">
|
||||
<center>
|
||||
<?php
|
||||
// PICASA of FB
|
||||
|
||||
if (isset($row->extid) && $row->extid !='') {
|
||||
|
||||
$resW = explode(',', $row->extw);
|
||||
$resH = explode(',', $row->exth);
|
||||
|
||||
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50);
|
||||
//echo JHtml::_( 'image', $row->exts.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
|
||||
echo '<img src="'.$row->exts.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
|
||||
|
||||
} else if (isset ($row->fileoriginalexist) && $row->fileoriginalexist == 1) {
|
||||
|
||||
$imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small');
|
||||
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
|
||||
//echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
|
||||
echo '<img src="'.Uri::root().$row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
|
||||
} else {
|
||||
//echo JHtml::_( 'image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif');
|
||||
echo '<img src="'.Uri::root().'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif'.'" alt="" />';
|
||||
}
|
||||
?>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php echo '<td>'. $row->title.'</td>';
|
||||
if (isset($row->extid) && $row->extid !='') {
|
||||
if (isset($row->exttype) && $row->exttype == 1) {
|
||||
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_FACEBOOK_STORED_FILE').'</td>';
|
||||
} else {
|
||||
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_PICASA_STORED_FILE').'</td>';
|
||||
}
|
||||
} else {
|
||||
echo '<td>' .$row->filename.'</td>';
|
||||
} ?>
|
||||
<td align="center"><?php echo $row->id; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$k = 1 - $k;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6"><?php echo $this->t['pagination']->getListFooter(); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="phocagallerylinkimg" />
|
||||
<input type="hidden" name="type" value="<?php echo $this->t['type']; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
|
||||
</form>
|
||||
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<table class="admintable" width="100%">
|
||||
|
||||
<?php
|
||||
/*
|
||||
?>
|
||||
<tr>
|
||||
<td class="key" align="right" width="20%"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_BACKGROUND_SHADOW' ); ?></label></td>
|
||||
<td width="80%">
|
||||
<select name="imageshadow" id="imageshadow">
|
||||
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
|
||||
<option value="none" ><?php echo Text::_('COM_PHOCAGALLERY_NONE'); ?></option>
|
||||
<option value="shadow1" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW1' ); ?></option>
|
||||
<option value="shadow2" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW2' ); ?></option>
|
||||
<option value="shadow3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOW3' ); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
// Colors
|
||||
$itemsColor = array ('fontcolor' => 'COM_PHOCAGALLERY_FIELD_FONT_COLOR_LABEL', 'bgcolor' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_LABEL', 'bgcolorhover' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_HOVER_LABEL', 'imagebgcolor' => 'COM_PHOCAGALLERY_FIELD_IMAGE_BACKGROUND_COLOR_LABEL', 'bordercolor' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_LABEL', 'bordercolorhover' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_HOVER_LABEL');
|
||||
foreach ($itemsColor as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="20%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
|
||||
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /><span style="margin-left:10px" onclick="openPicker(\''.$key.'\')" class="picker_buttons">'. Text::_('COM_PHOCAGALLERY_PICK_COLOR').'</span></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="key" align="right" width="20%"><label for="detail"><?php echo Text::_( 'COM_PHOCAGALLERY_DETAIL_WINDOW' ); ?></label></td>
|
||||
<td width="80%">
|
||||
<select name="detail" id="detail" class="form-control">
|
||||
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
|
||||
<option value="1" ><?php echo Text::_( 'COM_PHOCAGALLERY_STANDARD_POPUP_WINDOW' ); ?></option>
|
||||
<option value="0" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX' ); ?></option>
|
||||
<option value="2" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX_IMAGE_ONLY' ); ?></option>
|
||||
<option value="3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOWBOX' ); ?></option>
|
||||
<option value="4" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE' ); ?></option>
|
||||
<option value="5" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE_IMAGE_ONLY' ); ?></option>
|
||||
<option value="6" ><?php echo Text::_( 'COM_PHOCAGALLERY_JAK_LIGHTBOX' ); ?></option>
|
||||
<option value="8" ><?php echo Text::_( 'COM_PHOCAGALLERY_SLIMBOX' ); ?></option>
|
||||
<?php /*<option value="7" >No Popup</option>*/ ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="20%"><label for="pluginlink">'.Text::_('COM_PHOCAGALLERY_PLUGIN_LINK').'</label></td>'
|
||||
.'<td nowrap><select name="pluginlink" id="pluginlink" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>';
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="20%"><label for="type">'.Text::_('COM_PHOCAGALLERY_PLUGIN_TYPE').'</label></td>'
|
||||
.'<td nowrap><select name="type" id="type" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_MOSAIC' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LARGE_IMAGE' ).'</option>';
|
||||
|
||||
// yes/no
|
||||
/*
|
||||
$itemsYesNo = array ('displayname' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_NAME_LABEL', 'displaydetail' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DETAIL_ICON_LABEL', 'displaydownload' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DOWNLOAD_ICON_LABEL', 'displaybuttons' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_BUTTONS_LABEL', 'displaydescription' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DESCRIPTION_DETAIL_LABEL', 'displayimgrating' => 'COM_PHOCAGALLERY_DISPLAY_IMAGE_RATING' );
|
||||
foreach ($itemsYesNo as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="20%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
|
||||
.'<td nowrap><select name="'.$key.'" id="'.$key.'" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>';
|
||||
|
||||
if ($key == 'displaydownload') {
|
||||
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_SHOW_DIRECT_DOWNLOAD' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
|
||||
} else {
|
||||
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
|
||||
}
|
||||
echo '</select></td>'
|
||||
.'</tr>';
|
||||
}*/
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
|
||||
</div>
|
||||
@ -0,0 +1,300 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
$user = Factory::getUser();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($this->lists['order'] == 'a.ordering');
|
||||
|
||||
$view = 'category';
|
||||
if($this->t['type'] == 5) {
|
||||
$view = 'category-masonry';
|
||||
}
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function insertLink() {
|
||||
|
||||
if (!Joomla.getOptions('xtd-phocagallery')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _Joomla$getOptions = Joomla.getOptions('xtd-phocagallery'), editor = _Joomla$getOptions.editor;
|
||||
|
||||
<?php
|
||||
/*$items = array('imageshadow', 'fontcolor', 'bgcolor', 'bgcolorhover', 'imagebgcolor', 'bordercolor', 'bordercolorhover', 'detail','displayname', 'displaydetail', 'displaydownload', 'displaybuttons', 'displaydescription', 'descriptionheight' ,'namefontsize', 'namenumchar', 'enableswitch', 'overlib', 'piclens','float', 'boxspace', 'displayimgrating', 'pluginlink', 'type', 'imageordering', 'minboxwidth' );
|
||||
$itemsArrayOutput = '';
|
||||
foreach ($items as $key => $value) {
|
||||
|
||||
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
|
||||
.'if ('.$value.' != \'\') {'. "\n"
|
||||
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
|
||||
.'}';
|
||||
$itemsArrayOutput .= '+'.$value;
|
||||
}*/
|
||||
?>
|
||||
|
||||
/* LimitStart*/
|
||||
var limitStartOutput = '';
|
||||
var limitstart = document.getElementById("limitstartparam").value;
|
||||
if (limitstart != '') {
|
||||
limitStartOutput = "|limitstart="+limitstart;
|
||||
}
|
||||
/* LimitCount*/
|
||||
var limitCountOutput = '';
|
||||
var limitcount = document.getElementById("limitcountparam").value;
|
||||
if (limitcount != '') {
|
||||
limitCountOutput = "|limitcount="+limitcount;
|
||||
}
|
||||
|
||||
/* max*/
|
||||
var maxOutput = '';
|
||||
var max = document.getElementById("maxparam").value;
|
||||
if (max != '') {
|
||||
maxOutput = "|max="+max;
|
||||
}
|
||||
|
||||
/* ImageOrdering*/
|
||||
var imageOrderingOutput = '';
|
||||
var imageordering = document.getElementById("imageordering").value;
|
||||
if (imageordering != '') {
|
||||
imageOrderingOutput = "|imageordering="+imageordering;
|
||||
}
|
||||
|
||||
/* Category */
|
||||
var categoryid = document.getElementById("filter_catid").value;
|
||||
var categoryIdOutput = '';
|
||||
if (categoryid != '') {
|
||||
categoryIdOutput = "|categoryid="+categoryid;
|
||||
}
|
||||
|
||||
if (limitStartOutput != '') {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_LIMIT_START', true ); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (limitCountOutput != '') {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_LIMIT_COUNT', true ); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (categoryIdOutput != '' && parseInt(categoryid) > 0) {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var tag = "{phocagallery view=<?php echo $view ?>"+categoryIdOutput+limitStartOutput+limitCountOutput+maxOutput+imageOrderingOutput<?php /*echo $itemsArrayOutput*/ ?>+"}";
|
||||
|
||||
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
|
||||
|
||||
if (window.parent.Joomla.Modal) {
|
||||
window.parent.Joomla.Modal.getCurrent().close();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
<?php /*window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
|
||||
window.parent.SqueezeBox.close(); */ ?>
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div id="phocagallery-links">
|
||||
<fieldset class="adminform options-menu options-form">
|
||||
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGES'); ?></legend>
|
||||
|
||||
|
||||
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><label for="title" ><?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?></label></div>
|
||||
<div class="controls"><?php echo $this->lists['catid']; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_LIMIT_START' ); ?></label></div>
|
||||
<div class="controls"><?php echo $this->lists['limitstartparam'];?></div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><label for="imagecategories"><?php echo Text::_( 'COM_PHOCAGALLERY_LIMIT_COUNT' ); ?></label></div>
|
||||
<div class="controls"><?php echo $this->lists['limitcountparam'];?></div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><label for="imagemax"><?php echo Text::_( 'COM_PHOCAGALLERY_MAX_NUMBER_IMAGES' ); ?></label></div>
|
||||
<div class="controls"><input type="text" name="maxparam" id="maxparam" value="" class="form-control"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="phocagallerylinkimg" />
|
||||
<input type="hidden" name="type" value="<?php echo (int)$this->t['type']; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="imageordering"><?php echo Text::_( 'COM_PHOCAGALLERY_FIELD_IMAGE_ORDERING_LABEL' ); ?></label>
|
||||
</div>
|
||||
<div class="controls"><select name="imageordering" id="imageordering" class="form-select">
|
||||
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
|
||||
<option value="1"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_ASC')?></option>
|
||||
<option value="2"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_DESC')?></option>
|
||||
<option value="3"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_ASC')?></option>
|
||||
<option value="4"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_DESC')?></option>
|
||||
<option value="5"><?php echo Text::_('COM_PHOCAGALLERY_DATE_ASC')?></option>
|
||||
<option value="6"><?php echo Text::_('COM_PHOCAGALLERY_DATE_DESC')?></option>
|
||||
<option value="7"><?php echo Text::_('COM_PHOCAGALLERY_ID_ASC')?></option>
|
||||
<option value="8"><?php echo Text::_('COM_PHOCAGALLERY_ID_DESC')?></option>
|
||||
<option value="9"><?php echo Text::_('COM_PHOCAGALLERY_RANDOM')?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php /*
|
||||
// Colors
|
||||
$itemsColor = array ('fontcolor' => 'COM_PHOCAGALLERY_FIELD_FONT_COLOR_LABEL', 'bgcolor' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_LABEL', 'bgcolorhover' => 'COM_PHOCAGALLERY_FIELD_BACKGROUND_COLOR_HOVER_LABEL', 'imagebgcolor' => 'COM_PHOCAGALLERY_FIELD_IMAGE_BACKGROUND_COLOR_LABEL', 'bordercolor' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_LABEL', 'bordercolorhover' => 'COM_PHOCAGALLERY_FIELD_BORDER_COLOR_HOVER_LABEL');
|
||||
|
||||
foreach ($itemsColor as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
|
||||
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /><span style="margin-left:10px" onclick="openPicker(\''.$key.'\')" class="picker_buttons">'. Text::_('COM_PHOCAGALLERY_PICK_COLOR').'</span></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="key" align="right" width="30%"><label for="detail"><?php echo Text::_( 'COM_PHOCAGALLERY_DETAIL_WINDOW' ); ?></label></td>
|
||||
<td width="70%">
|
||||
<select name="detail" id="detail" class="form-control">
|
||||
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
|
||||
<option value="1" ><?php echo Text::_( 'COM_PHOCAGALLERY_STANDARD_POPUP_WINDOW' ); ?></option>
|
||||
<option value="0" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX' ); ?></option>
|
||||
<option value="2" ><?php echo Text::_( 'COM_PHOCAGALLERY_MODAL_POPUP_BOX_IMAGE_ONLY' ); ?></option>
|
||||
<option value="3" ><?php echo Text::_( 'COM_PHOCAGALLERY_SHADOWBOX' ); ?></option>
|
||||
<option value="4" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE' ); ?></option>
|
||||
<option value="5" ><?php echo Text::_( 'COM_PHOCAGALLERY_HIGHSLIDE_IMAGE_ONLY' ); ?></option>
|
||||
<option value="6" ><?php echo Text::_( 'COM_PHOCAGALLERY_JAK_LIGHTBOX' ); ?></option>
|
||||
<option value="8" ><?php echo Text::_( 'COM_PHOCAGALLERY_SLIMBOX' ); ?></option>
|
||||
<?php /*<option value="7" >No Popup</option>*//* ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="pluginlink">'.Text::_('COM_PHOCAGALLERY_PLUGIN_LINK').'</label></td>'
|
||||
.'<td nowrap><select name="pluginlink" id="pluginlink" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>';
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="type">'.Text::_('COM_PHOCAGALLERY_PLUGIN_TYPE').'</label></td>'
|
||||
.'<td nowrap><select name="type" id="type" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_DETAIL_IMAGE' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_MOSAIC' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LARGE_IMAGE' ).'</option>';
|
||||
|
||||
// yes/no
|
||||
$itemsYesNo = array ('displayname' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_NAME_LABEL', 'displaydetail' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DETAIL_ICON_LABEL', 'displaydownload' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DOWNLOAD_ICON_LABEL', 'displaybuttons' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_BUTTONS_LABEL', 'displaydescription' => 'COM_PHOCAGALLERY_FIELD_DISPLAY_DESCRIPTION_DETAIL_LABEL', 'displayimgrating' => 'COM_PHOCAGALLERY_DISPLAY_IMAGE_RATING' );
|
||||
foreach ($itemsYesNo as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
|
||||
.'<td nowrap><select name="'.$key.'" id="'.$key.'" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>';
|
||||
|
||||
if ($key == 'displaydownload') {
|
||||
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_SHOW_DIRECT_DOWNLOAD' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
|
||||
} else {
|
||||
echo '<option value="1" >'. Text::_( 'COM_PHOCAGALLERY_SHOW' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_HIDE' ).'</option>';
|
||||
}
|
||||
echo '</select></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
|
||||
|
||||
// Number
|
||||
$itemsNumber = array ('descriptionheight' => 'COM_PHOCAGALLERY_FIELD_DESCRIPTION_DETAIL_HEIGHT_LABEL','namefontsize' => 'COM_PHOCAGALLERY_FIELD_FONT_SIZE_NAME_LABEL', 'namenumchar' => 'COM_PHOCAGALLERY_FIELD_CHAR_LENGTH_NAME_LABEL', 'boxspace' => 'COM_PHOCAGALLERY_FIELD_CATEGORY_BOX_SPACE_LABEL','minboxwidth' => 'COM_PHOCAGALLERY_MIN_BOX_WIDTH');
|
||||
foreach ($itemsNumber as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value).'</label></td>'
|
||||
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="" class="text_area" /></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="enableswitch">'.Text::_('COM_PHOCAGALLERY_SWITCH_IMAGE').'</label></td>'
|
||||
.'<td nowrap><select name="enableswitch" id="enableswitch" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_ENABLE' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_DISABLE' ).'</option>';
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="overlib">'.Text::_('COM_PHOCAGALLERY_FIELD_OVERLIB_EFFECT_LABEL').'</label></td>'
|
||||
.'<td nowrap><select name="overlib" id="overlib" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_NONE' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_ONLY_IMAGE' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_ONLY_DESCRIPTION' ).'</option>'
|
||||
.'<option value="3" >'.Text::_( 'COM_PHOCAGALLERY_IMAGE_AND_DESCRIPTION' ).'</option>';
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="piclens">'.Text::_('COM_PHOCAGALLERY_ENABLE_COOLIRIS').'</label></td>'
|
||||
.'<td nowrap><select name="piclens" id="piclens" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="0" >'.Text::_( 'COM_PHOCAGALLERY_NO' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_YES' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_FIELD_YES_START_COOLIRIS' ).'</option>';
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="key" align="right" width="30%"><label for="float"><?php echo Text::_( 'COM_PHOCAGALLERY_FLOAT_IMAGE' ); ?></label></td>
|
||||
<td width="70%">
|
||||
<select name="float" id="float">
|
||||
<option value="" selected="selected"><?php echo Text::_( 'COM_PHOCAGALLERY_DEFAULT' )?></option>
|
||||
<option value="left" ><?php echo Text::_( 'COM_PHOCAGALLERY_LEFT' ); ?></option>
|
||||
<option value="right" ><?php echo Text::_( 'COM_PHOCAGALLERY_RIGHT' ); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
*/
|
||||
?>
|
||||
<div class="btn-box-submit">
|
||||
<button class="btn btn-primary plg-button-insert " onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_('COM_PHOCAGALLERY_INSERT_CODE'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div class="btn-box-back"><a class="btn btn-light" href="<?php echo $this->t['backlink']; ?>"><span class="icon-arrow-left"></span> <?php echo Text::_('COM_PHOCAGALLERY_BACK') ?></a></div>
|
||||
</div>
|
||||
@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
$user = Factory::getUser();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($this->lists['order'] == 'a.ordering');
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function insertLink() {
|
||||
|
||||
<?php
|
||||
$items = array('width', 'height', 'delay', 'image', 'pgslink', 'imageordering' );
|
||||
$itemsArrayOutput = '';
|
||||
foreach ($items as $key => $value) {
|
||||
|
||||
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
|
||||
.'if ('.$value.' != \'\') {'. "\n"
|
||||
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
|
||||
.'}';
|
||||
$itemsArrayOutput .= '+'.$value;
|
||||
}
|
||||
?>
|
||||
|
||||
/* Category */
|
||||
var categoryid = document.getElementById("filter_catid").value;
|
||||
var categoryIdOutput = '';
|
||||
if (categoryid != '') {
|
||||
categoryIdOutput = "id="+categoryid;
|
||||
}
|
||||
|
||||
|
||||
if (categoryIdOutput != '' && parseInt(categoryid) > 0) {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_CATEGORY', true ); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var tag = "{pgslideshow "+categoryIdOutput<?php echo $itemsArrayOutput ?>+"}";
|
||||
window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
|
||||
window.parent.SqueezeBox.close();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div id="phocagallery-links">
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
|
||||
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<table class="admintable" width="100%">
|
||||
|
||||
<tr>
|
||||
<td class="key" align="right" nowrap="nowrap" width="30%" >
|
||||
<label for="title" nowrap="nowrap" >
|
||||
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
|
||||
</label>
|
||||
</td width="70%">
|
||||
<td><?php echo $this->lists['catid']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="phocagallerylinkimg" />
|
||||
<input type="hidden" name="type" value="<?php echo (int)$this->t['type']; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<table class="admintable" width="100%">
|
||||
<?php
|
||||
// Number
|
||||
$itemsNumber = array ('width' => array('COM_PHOCAGALLERY_SLIDESHOW_WIDTH', 640),'height' => array('COM_PHOCAGALLERY_SLIDESHOW_HEIGHT',480), 'delay' => array('COM_PHOCAGALLERY_SLIDESHOW_DELAY',3000));
|
||||
foreach ($itemsNumber as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value[0]).'</label></td>'
|
||||
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="'.$value[1].'" class="text_area" /></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="image">'.Text::_('COM_PHOCAGALLERY_IMAGE').'</label></td>'
|
||||
.'<td nowrap><select name="image" id="image" class="form-control">'
|
||||
.'<option value="L" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_LARGE' ).'</option>'
|
||||
.'<option value="M" >'.Text::_( 'COM_PHOCAGALLERY_MEDIUM' ).'</option>'
|
||||
.'<option value="S" >'.Text::_( 'COM_PHOCAGALLERY_SMALL' ).'</option>'
|
||||
.'<option value="O" >'.Text::_( 'COM_PHOCAGALLERY_ORIGINAL_IMAGE' ).'</option>'
|
||||
.'</select></td></tr>';
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="pgslink">'.Text::_('COM_PHOCAGALLERY_SLIDESHOW_LINK').'</label></td>'
|
||||
.'<td nowrap><select name="pgslink" id="pgslink" class="form-control">'
|
||||
.'<option value="" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_DEFAULT' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORY' ).'</option>'
|
||||
.'<option value="2" >'.Text::_( 'COM_PHOCAGALLERY_LINK_TO_CATEGORIES' ).'</option>'
|
||||
.'</select></td></tr>';
|
||||
?>
|
||||
<tr>
|
||||
<td class="key" align="right" width="30%"><label for="imageordering"><?php echo Text::_( 'COM_PHOCAGALLERY_IMAGE_ORDERING' ); ?></label></td>
|
||||
<td><select name="imageordering" id="imageordering" class="form-control">
|
||||
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
|
||||
<option value="" selected="selected"><?php echo Text::_('COM_PHOCAGALLERY_DEFAULT')?></option>
|
||||
<option value="1"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_ASC')?></option>
|
||||
<option value="2"><?php echo Text::_('COM_PHOCAGALLERY_ORDERING_DESC')?></option>
|
||||
<option value="3"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_ASC')?></option>
|
||||
<option value="4"><?php echo Text::_('COM_PHOCAGALLERY_TITLE_DESC')?></option>
|
||||
<option value="5"><?php echo Text::_('COM_PHOCAGALLERY_DATE_ASC')?></option>
|
||||
<option value="6"><?php echo Text::_('COM_PHOCAGALLERY_DATE_DESC')?></option>
|
||||
<option value="7"><?php echo Text::_('COM_PHOCAGALLERY_ID_ASC')?></option>
|
||||
<option value="8"><?php echo Text::_('COM_PHOCAGALLERY_ID_DESC')?></option>
|
||||
<option value="9"><?php echo Text::_('COM_PHOCAGALLERY_RANDOM')?></option>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
|
||||
</div>
|
||||
@ -0,0 +1,228 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Gallery
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
$user = Factory::getUser();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($this->lists['order'] == 'a.ordering');
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function insertLink() {
|
||||
|
||||
<?php
|
||||
$items = array('switchheight', 'switchwidth', 'switchfixedsize' );
|
||||
$itemsArrayOutput = '';
|
||||
foreach ($items as $key => $value) {
|
||||
|
||||
echo 'var '.$value.' = document.getElementById("'.$value.'").value;'."\n"
|
||||
.'if ('.$value.' != \'\') {'. "\n"
|
||||
.''.$value.' = "|'.$value.'="+'.$value.';'."\n"
|
||||
.'}';
|
||||
$itemsArrayOutput .= '+'.$value;
|
||||
}
|
||||
?>
|
||||
|
||||
/* Image */
|
||||
var imageIdOutput = '';
|
||||
len = document.getElementsByName("imageid").length;
|
||||
for (i = 0; i <len; i++) {
|
||||
if (document.getElementsByName('imageid')[i].checked) {
|
||||
imageid = document.getElementsByName('imageid')[i].value;
|
||||
if (imageid != '' && parseInt(imageid) > 0) {
|
||||
imageIdOutput = "|basicimageid="+imageid;
|
||||
} else {
|
||||
imageIdOutput = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (imageIdOutput != '' && parseInt(imageid) > 0) {
|
||||
/*return false;*/
|
||||
} else {
|
||||
alert("<?php echo Text::_( 'COM_PHOCAGALLERY_PLEASE_SELECT_IMAGE', true ); ?>");
|
||||
return false;
|
||||
}
|
||||
var tag = "{phocagallery view=switchimage"+imageIdOutput<?php echo $itemsArrayOutput ?>+"}";
|
||||
window.parent.jInsertEditorText(tag, '<?php echo $this->t['ename']; ?>');
|
||||
window.parent.SqueezeBox.close();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div id="phocagallery-links">
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></legend>
|
||||
<form action="<?php echo $this->request_url; ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<table class="admintable" width="100%">
|
||||
<tr>
|
||||
<td class="key" align="right" width="30%">
|
||||
<label for="title">
|
||||
<?php echo Text::_( 'COM_PHOCAGALLERY_FILTER' ); ?>
|
||||
</label>
|
||||
</td>
|
||||
<td width="70%">
|
||||
<input type="text" name="search" id="search" value="<?php echo $this->lists['search'];?>" class="text_area" onchange="document.adminForm.submit();" />
|
||||
<button onclick="this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_SEARCH' ); ?></button>
|
||||
<button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo Text::_( 'COM_PHOCAGALLERY_RESET' ); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key" align="right" nowrap="nowrap">
|
||||
<label for="title" nowrap="nowrap">
|
||||
<?php echo Text::_( 'COM_PHOCAGALLERY_CATEGORY' ); ?>
|
||||
</label>
|
||||
</td>
|
||||
<td><?php echo $this->lists['catid']; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="editcell">
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5px"><?php echo Text::_( 'COM_PHOCAGALLERY_NUM' ); ?></th>
|
||||
<th width="5px"></th>
|
||||
<th class="image" width="60" align="center"><?php echo Text::_('COM_PHOCAGALLERY_IMAGE'); ?></th>
|
||||
<th class="title" width="40%"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
<th width="30%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_FILENAME', 'a.filename', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
|
||||
|
||||
<th width="1%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'COM_PHOCAGALLERY_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order'] ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
|
||||
$row = &$this->items[$i];
|
||||
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo $this->t['pagination']->getRowOffset( $i ); ?></td>
|
||||
<td><input type="radio" name="imageid" value="<?php echo $row->id ?>" /></td>
|
||||
<td align="center" valign="middle">
|
||||
<div class="phocagallery-box-file">
|
||||
<center>
|
||||
<div class="phocagallery-box-file-first">
|
||||
<div class="phocagallery-box-file-second">
|
||||
<div class="phocagallery-box-file-third">
|
||||
<center>
|
||||
<?php
|
||||
// PICASA
|
||||
if (isset($row->extid) && $row->extid !='') {
|
||||
|
||||
$resW = explode(',', $row->extw);
|
||||
$resH = explode(',', $row->exth);
|
||||
|
||||
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($resW[2], $resH[2], 50, 50);
|
||||
//echo JHtml::_( 'image', $row->exts.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
|
||||
echo '<img src="'.$row->exts.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
|
||||
|
||||
} else if (isset ($row->fileoriginalexist) && $row->fileoriginalexist == 1) {
|
||||
|
||||
$imageRes = PhocaGalleryImage::getRealImageSize($row->filename, 'small');
|
||||
$correctImageRes = PhocaGalleryImage::correctSizeWithRate($imageRes['w'], $imageRes['h'], 50, 50);
|
||||
//echo JHtml::_( 'image', $row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())), '', array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height']));
|
||||
echo '<img src="'.Uri::root().$row->linkthumbnailpath.'?imagesid='.md5(uniqid(time())).'" width="'.$correctImageRes['width'].'" height="'.$correctImageRes['height'].'" alt="" />';
|
||||
} else {
|
||||
echo HTMLHelper::_( 'image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif', '');
|
||||
}
|
||||
?>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php echo '<td>'. $row->title.'</td>';
|
||||
if (isset($row->extid) && $row->extid !='') {
|
||||
if (isset($row->exttype) && $row->exttype == 1) {
|
||||
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_FACEBOOK_STORED_FILE').'</td>';
|
||||
} else {
|
||||
echo '<td align="center">'.Text::_('COM_PHOCAGALLERY_PICASA_STORED_FILE').'</td>';
|
||||
}
|
||||
} else {
|
||||
echo '<td>' .$row->filename.'</td>';
|
||||
} ?>
|
||||
<td align="center"><?php echo $row->id; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$k = 1 - $k;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6"><?php echo $this->t['pagination']->getListFooter(); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="controller" value="phocagallerylinkimg" />
|
||||
<input type="hidden" name="type" value="<?php echo $this->t['type']; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="e_name" value="<?php echo $this->t['ename']?>" />
|
||||
</form>
|
||||
|
||||
|
||||
<form name="adminFormLink" id="adminFormLink">
|
||||
<table class="admintable" width="100%">
|
||||
|
||||
<?php
|
||||
|
||||
// Number
|
||||
$itemsNumber = array ('switchheight' => array('COM_PHOCAGALLERY_FIELD_SWITCH_IMAGE_HEIGHT_LABEL', 480),'switchwidth' => array('COM_PHOCAGALLERY_FIELD_SWITCH_IMAGE_WIDTH_LABEL', 640));
|
||||
foreach ($itemsNumber as $key => $value) {
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="'.$key.'">'.Text::_($value[0]).'</label></td>'
|
||||
.'<td nowrap="nowrap"><input type="text" name="'.$key.'" id="'.$key.'" value="'.$value[1].'" class="text_area" /></td>'
|
||||
.'</tr>';
|
||||
}
|
||||
|
||||
echo '<tr>'
|
||||
.'<td class="key" align="right" width="30%"><label for="switchfixedsize">'.Text::_('COM_PHOCAGALLERY_FIELD_SWITCH_FIXED_SIZE_LABEL').'</label></td>'
|
||||
.'<td nowrap><select name="pgslink" id="switchfixedsize" class="form-control">'
|
||||
.'<option value="0" selected="selected">'. Text::_( 'COM_PHOCAGALLERY_NO' ).'</option>'
|
||||
.'<option value="1" >'.Text::_( 'COM_PHOCAGALLERY_YES' ).'</option>'
|
||||
.'</select></td></tr>';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right"><button class="btn btn-primary" onclick="insertLink();return false;"><span class="icon-ok"></span> <?php echo Text::_( 'COM_PHOCAGALLERY_INSERT_CODE' ); ?></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</fieldset>
|
||||
<div style="text-align:left;"><span class="icon-16-edb-back"><a style="text-decoration:underline" href="<?php echo $this->t['backlink'];?>"><?php echo Text::_('COM_PHOCAGALLERY_BACK')?></a></span></div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,191 @@
|
||||
<?php
|
||||
/*
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
*
|
||||
* @component Phoca Component
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
//jimport( 'joomla.application.component.view' );
|
||||
use Joomla\String\StringHelper;
|
||||
phocagalleryimport('phocagallery.render.renderadminviews');
|
||||
class phocaGalleryViewphocaGalleryLinkImg extends HtmlView
|
||||
{
|
||||
var $_context = 'com_phocagallery.phocagallerylinkimg';
|
||||
protected $r;
|
||||
protected $t;
|
||||
protected $button;
|
||||
protected $user;
|
||||
protected $items;
|
||||
protected $request_url;
|
||||
protected $lists;
|
||||
|
||||
function display($tpl = null) {
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$this->r = new PhocaGalleryRenderAdminViews();
|
||||
$this->t = PhocaGalleryUtils::setVars('linkimg');
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
//JHtml::_('behavior.tooltip');
|
||||
//JHtml::_('behavior.formvalidation');
|
||||
//JHtml::_('behavior.keepalive');
|
||||
//JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$editor = $app->input->getCmd('editor', '');
|
||||
if (!empty($editor)) {
|
||||
$this->document->addScriptOptions('xtd-phocagallery', array('editor' => $editor));
|
||||
}
|
||||
|
||||
//Frontend Changes
|
||||
$tUri = '';
|
||||
$jsLink = Uri::base(true);
|
||||
if (!$app->isClient('administrator')) {
|
||||
$tUri = Uri::base();
|
||||
phocagalleryimport('phocagallery.render.renderadmin');
|
||||
phocagalleryimport('phocagallery.file.filethumbnail');
|
||||
$jsLink = Uri::base(true).'/administrator';
|
||||
}
|
||||
$document = Factory::getDocument();
|
||||
$db = Factory::getDBO();
|
||||
//JHtml::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
|
||||
//JHtml::stylesheet( 'media/com_phocagallery/js/jcp/picker.css' );
|
||||
//$document->addScript(JUri::root(true) .'/media/com_phocagallery/js/jcp/picker.js');
|
||||
|
||||
HTMLHelper::_('jquery.framework', false);
|
||||
HTMLHelper::stylesheet( 'media/com_phocagallery/css/administrator/phocagallery.css' );
|
||||
HTMLHelper::stylesheet( 'media/plg_editors-xtd_phocagallery/css/phocagallery.css' );
|
||||
|
||||
$eName = $app->input->get('editor', '', 'cmd');
|
||||
$this->t['ename'] = preg_replace( '#[^A-Z0-9\-\_\[\]]#i', '', $eName );
|
||||
$this->t['type'] = $app->input->get( 'type', 1, 'int' );
|
||||
$this->t['backlink'] = $tUri.'index.php?option=com_phocagallery&view=phocagallerylinks&tmpl=component&editor='.$this->t['ename'];
|
||||
|
||||
|
||||
|
||||
|
||||
$params = ComponentHelper::getParams('com_phocagallery') ;
|
||||
|
||||
//Filter
|
||||
|
||||
$filter_published = $app->getUserStateFromRequest( $this->_context.'.filter_published', 'filter_published', '', 'word' );
|
||||
$filter_catid = $app->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
|
||||
$filter_order = $app->getUserStateFromRequest( $this->_context.'.filter_order', 'filter_order', 'a.ordering', 'cmd' );
|
||||
$filter_order_Dir = $app->getUserStateFromRequest( $this->_context.'.filter_order_Dir', 'filter_order_Dir', '', 'word' );
|
||||
$search = $app->getUserStateFromRequest( $this->_context.'.search', 'search', '', 'string' );
|
||||
$search = StringHelper::strtolower( $search );
|
||||
|
||||
// Get data from the model
|
||||
$this->items = $this->get( 'Data');
|
||||
$total = $this->get( 'Total');
|
||||
$this->t['pagination'] = $this->get( 'Pagination' );
|
||||
|
||||
// build list of categories
|
||||
$javascript = 'class="form-control" size="1" onchange="Joomla.submitform( );"';
|
||||
|
||||
// get list of categories for dropdown filter
|
||||
$filter = '';
|
||||
|
||||
// build list of categories
|
||||
$javascript = 'class="form-select" size="1" onchange="Joomla.submitform( );"';
|
||||
|
||||
$query = 'SELECT a.title AS text, a.id AS value, a.parent_id as parentid'
|
||||
. ' FROM #__phocagallery_categories AS a'
|
||||
. ' WHERE a.published = 1'
|
||||
. ' AND a.approved = 1'
|
||||
. ' ORDER BY a.ordering';
|
||||
$db->setQuery( $query );
|
||||
$phocagallerys = $db->loadObjectList();
|
||||
|
||||
$tree = array();
|
||||
$text = '';
|
||||
$tree = PhocaGalleryCategoryhtml::CategoryTreeOption($phocagallerys, $tree, 0, $text, -1);
|
||||
array_unshift($tree, HTMLHelper::_('select.option', '0', '- '.Text::_('COM_PHOCAGALLERY_SELECT_CATEGORY').' -', 'value', 'text'));
|
||||
$this->lists['catid'] = HTMLHelper::_( 'select.genericlist', $tree, 'filter_catid', $javascript , 'value', 'text', $filter_catid );
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
// state filter
|
||||
$this->lists['state'] = HTMLHelper::_('grid.state', $filter_published );
|
||||
|
||||
// table ordering
|
||||
$this->lists['order_Dir'] = $filter_order_Dir;
|
||||
$this->lists['order'] = $filter_order;
|
||||
|
||||
// search filter
|
||||
$this->lists['search'] = $search;
|
||||
|
||||
$this->user = Factory::getUser();
|
||||
$this->request_url = $uri->toString();
|
||||
/*$this->assignRef('tmpl', $t);
|
||||
$this->assignRef('button', $this->button);
|
||||
$this->assignRef('user', $this->user);
|
||||
$this->assignRef('items', $this->items);
|
||||
$this->assignRef('request_url', $this->request_url);*/
|
||||
|
||||
switch($this->t['type']) {
|
||||
|
||||
case 2:
|
||||
case 5:
|
||||
|
||||
$i = 0;
|
||||
$itemsCount = $itemsStart = array();
|
||||
foreach($this->items as $key => $value) {
|
||||
|
||||
$itemsCount[$i] = new StdClass();
|
||||
$itemsCount[$i]->value = $key;
|
||||
$itemsCount[$i]->text = $key;
|
||||
$itemsStart[$i] = new StdClass();
|
||||
$itemsStart[$i]->value = $key;
|
||||
$itemsStart[$i]->text = $key;
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Don't display it if no category is selected
|
||||
if($i > 0) {
|
||||
$itemsCount[$i] = new StdClass();
|
||||
$itemsCount[$i]->value = (int)$key + 1;
|
||||
$itemsCount[$i]->text = (int)$key + 1;
|
||||
}
|
||||
$categoryId = $app->input->get( 'filter_catid', 0, '', 'int' );
|
||||
$categoryIdList = $app->getUserStateFromRequest( $this->_context.'.filter_catid', 'filter_catid', 0, 'int' );
|
||||
|
||||
if ((int)$categoryId == 0 && $categoryIdList == 0) {
|
||||
$itemsCount = $itemsStart = array();
|
||||
}
|
||||
|
||||
$this->lists['limitstartparam'] = HTMLHelper::_( 'select.genericlist', $itemsStart, 'limitstartparam', 'class="form-select"' , 'value', 'text', '' );
|
||||
$this->lists['limitcountparam'] = HTMLHelper::_( 'select.genericlist', $itemsCount, 'limitcountparam', 'class="form-select"' , 'value', 'text', '' );
|
||||
|
||||
parent::display('images');
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
parent::display('switchimage');
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
parent::display('slideshow');
|
||||
break;
|
||||
|
||||
case 1:
|
||||
default:
|
||||
|
||||
parent::display($tpl);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user