first commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Categories RAW View
|
||||
*
|
||||
* @since 3.6.161
|
||||
*/
|
||||
class J2xmlViewCategories extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Contact RAW View
|
||||
*
|
||||
* @since 3.6.161
|
||||
*/
|
||||
class J2xmlViewContact extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Content RAW View
|
||||
*
|
||||
* @since 3.6.161
|
||||
*/
|
||||
class J2xmlViewContent extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
298
administrator/components/com_j2xml/views/cpanel/tmpl/default.php
Normal file
298
administrator/components/com_j2xml/views/cpanel/tmpl/default.php
Normal file
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
* @since 1.5.3
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
JHTML::_('behavior.tooltip');
|
||||
jimport('joomla.language.language');
|
||||
|
||||
$data = file_get_contents(JPATH_COMPONENT_ADMINISTRATOR . '/j2xml.xml');
|
||||
$xml = simplexml_load_string($data);
|
||||
|
||||
$title = JText::_('Welcome_to_j2xml');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.file');
|
||||
$exts = array();
|
||||
$version = new \JVersion();
|
||||
$libraries = '/libraries' . ($version->isCompatible('3.9') ? '/eshiol' : '');
|
||||
|
||||
$files = array();
|
||||
|
||||
if ($version->isCompatible('3.9'))
|
||||
{
|
||||
if (JFolder::exists(JPATH_MANIFESTS . '/libraries/eshiol'))
|
||||
{
|
||||
$libraries = JFolder::files(JPATH_MANIFESTS . '/libraries/eshiol');
|
||||
foreach ($libraries as $library)
|
||||
{
|
||||
$files[] = JPATH_MANIFESTS . '/libraries/eshiol/' . $library;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$files[] = JPATH_MANIFESTS . '/libraries/eshiol.xml';
|
||||
$files[] = JPATH_MANIFESTS . '/libraries/j2xml.xml';
|
||||
$files[] = JPATH_MANIFESTS . '/libraries/j2xmlpro.xml';
|
||||
$files[] = JPATH_MANIFESTS . '/libraries/phpxmlrpc.xml';
|
||||
}
|
||||
|
||||
$files[] = JPATH_SITE . '/plugins/system/j2xml/j2xml.xml';
|
||||
$files[] = JPATH_SITE . '/plugins/content/setimages/setimages.xml';
|
||||
$files[] = JPATH_SITE . '/plugins/content/j2xml/j2xml.xml';
|
||||
$files[] = JPATH_SITE . '/plugins/content/j2xmlgi/j2xmlgi.xml';
|
||||
$files[] = JPATH_SITE . '/plugins/content/j2xmlredirect/j2xmlredirect.xml';
|
||||
|
||||
if (JFolder::exists(JPATH_SITE . '/plugins/j2xml'))
|
||||
{
|
||||
$plugins = JFolder::folders(JPATH_SITE . '/plugins/j2xml');
|
||||
foreach ($plugins as $plugin)
|
||||
{
|
||||
$files[] = JPATH_SITE . '/plugins/j2xml/' . $plugin . '/' . $plugin . '.xml';
|
||||
}
|
||||
}
|
||||
$lang = JFactory::getLanguage();
|
||||
foreach ($files as $file)
|
||||
{
|
||||
if (JFile::exists($file))
|
||||
{
|
||||
$xml = JFactory::getXML($file);
|
||||
if ($xml)
|
||||
{
|
||||
if ($xml->getName() == 'extension')
|
||||
{
|
||||
$extension = pathinfo($file, PATHINFO_FILENAME);
|
||||
$attr = $xml->attributes();
|
||||
if ($attr['type'] == 'plugin')
|
||||
{
|
||||
$lang->load('plg_' . $attr['group'] . '_' . $extension);
|
||||
}
|
||||
else if ($attr['type'] = 'library')
|
||||
{
|
||||
$lang->load('lib_' . $extension);
|
||||
}
|
||||
$exts = $exts + array(
|
||||
JText::_((string) $xml->name) .
|
||||
// .' '.ucfirst($attr['group'])
|
||||
' ' . ucfirst($attr['type']) => (string) $xml->version
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="index.php" method="post" name="adminForm">
|
||||
<?php if (class_exists('JPlatform') && version_compare(JPlatform::RELEASE, '12', 'ge')) { ?>
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<table>
|
||||
<tr>
|
||||
<?php if (!class_exists('JPlatform') || version_compare(JPlatform::RELEASE, '12', 'lt')): ?>
|
||||
<td width='45%' class='adminform' valign='top'>
|
||||
<p><?php JText::_('COM_J2XML_MSG_EXPORT'); ?></p>
|
||||
<div id='cpanel'>
|
||||
<?php
|
||||
$link = 'index.php?option=com_content';
|
||||
$this->_quickiconButton($link, 'icon-48-article.png', JText::_('COM_J2XML_TOOLBAR_ARTICLE_MANAGER'));
|
||||
|
||||
$link = 'index.php?option=com_j2xml&view=websites';
|
||||
$this->_quickiconButton($link, 'icon-48-websites.png', JText::_('COM_J2XML_TOOLBAR_WEBSITE_MANAGER'), '../media/com_j2xml/images/');
|
||||
?>
|
||||
</div>
|
||||
<div class='clr'></div>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td valign='top' style='padding: 7px 0 0 5px'>
|
||||
<table class='adminlist'>
|
||||
<tr>
|
||||
<td colspan='3'>
|
||||
<p><?php echo JText::_('COM_J2XML_XML_DESCRIPTION')?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_('Installed_Version'); ?>
|
||||
</td>
|
||||
<td width='100px'>
|
||||
<?php
|
||||
$xml = JFactory::getXML(JPATH_COMPONENT . '/j2xml.xml');
|
||||
echo $xml->version;
|
||||
?>
|
||||
</td>
|
||||
<td rowspan='<?php echo 3 + count($exts); ?>'
|
||||
style="text-align: center; width: 150px"><a
|
||||
href='<?php echo JText::_('COM_J2XML_LINK'); ?>'> <img
|
||||
src='../media/com_j2xml/images/j2xml.png' width='110'
|
||||
height='110' alt='j2xml' title='j2xml' align='middle'
|
||||
border='0'>
|
||||
</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<?php echo JText::_('Copyright'); ?>
|
||||
<a href='https://www.eshiol.it' target='_blank'>
|
||||
<?php echo str_replace("(C)", "©", $xml->copyright); ?>
|
||||
<img src='../media/com_j2xml/images/eshiol.png' alt='eshiol.it'
|
||||
title='eshiol.it' border='0'>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_('License'); ?>
|
||||
</td>
|
||||
<td><a href='http://www.gnu.org/licenses/gpl-3.0.html'
|
||||
target='_blank'>GNU/GPL v3</a></td>
|
||||
</tr>
|
||||
<?php foreach ($exts as $k=>$v): ?>
|
||||
<tr>
|
||||
<td><?php echo $k; ?></td>
|
||||
<td><?php echo $v; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<table>
|
||||
<tr>
|
||||
<?php if (!class_exists('JPlatform') || version_compare(JPlatform::RELEASE, '12', 'lt')): ?>
|
||||
<td width='45%' class='adminform' valign='top'>
|
||||
<p><?php echo JText::_('COM_J2XML_MSG_EXPORT'); ?></p>
|
||||
<div id='cpanel'>
|
||||
<?php
|
||||
$link = 'index.php?option=com_content';
|
||||
$this->_quickiconButton($link, 'icon-48-article.png', JText::_('COM_J2XML_TOOLBAR_ARTICLE_MANAGER'));
|
||||
|
||||
if (class_exists('JPlatform'))
|
||||
{
|
||||
$link = 'index.php?option=com_j2xml&view=websites';
|
||||
$this->_quickiconButton($link, 'icon-48-websites.png', JText::_('COM_J2XML_TOOLBAR_WEBSITE_MANAGER'), '../media/com_j2xml/images/');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='clr'></div>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td valign='top' style='padding: 7px 0 0 5px'>
|
||||
<table class='adminlist'>
|
||||
<tr>
|
||||
<td colspan='3'>
|
||||
<p><?php echo JText::_('COM_J2XML_XML_DESCRIPTION')?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_('Installed_Version'); ?>
|
||||
</td>
|
||||
<td width='100px'>
|
||||
<?php
|
||||
$xml = JFactory::getXML(JPATH_COMPONENT . '/j2xml.xml');
|
||||
echo $xml->version;
|
||||
?>
|
||||
</td>
|
||||
<td rowspan='<?php echo 3 + count($exts); ?>'
|
||||
style="text-align: center; width: 150px"><a
|
||||
href='<?php echo JText::_('COM_J2XML_LINK'); ?>'> <img
|
||||
src='../media/com_j2xml/images/j2xml.png' width='110'
|
||||
height='110' alt='j2xml' title='j2xml' align='middle'
|
||||
border='0'>
|
||||
</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<?php echo JText::_('Copyright'); ?>
|
||||
<a href='https://www.eshiol.it' target='_blank'>
|
||||
<?php echo str_replace("(C)", "©", $xml->copyright); ?>
|
||||
<img src='../media/com_j2xml/images/eshiol.png' alt='eshiol.it'
|
||||
title='eshiol.it' border='0'>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_('License'); ?>
|
||||
</td>
|
||||
<td><a href='http://www.gnu.org/licenses/gpl-3.0.html'
|
||||
target='_blank'>GNU/GPL v3</a></td>
|
||||
</tr>
|
||||
<?php foreach ($exts as $k=>$v): ?>
|
||||
<tr>
|
||||
<td><?php echo $k; ?></td>
|
||||
<td><?php echo $v; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php $title = JText::_('Support_us'); ?>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<p><?php echo JText::_('COM_J2XML_MSG_DONATION1'); ?></p>
|
||||
<div style="text-align: center;">
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr"
|
||||
method="post">
|
||||
<input type="hidden" name="cmd" value="_donations"> <input
|
||||
type="hidden" name="business" value="info@eshiol.it"> <input
|
||||
type="hidden" name="lc" value="en_US"> <input type="hidden"
|
||||
name="item_name" value="eshiol.it"> <input type="hidden"
|
||||
name="currency_code" value="EUR"> <input type="hidden"
|
||||
name="bn"
|
||||
value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"> <input
|
||||
type="image"
|
||||
src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif"
|
||||
border="0" name="submit" alt="PayPal secure payments."> <img
|
||||
alt="" border="0"
|
||||
src="https://www.paypal.com/en_US/i/scr/pixel.gif"
|
||||
width="1" height="1">
|
||||
</form>
|
||||
</div>
|
||||
<p><?php echo JText::_('COM_J2XML_MSG_DONATION2'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="option" value="com_j2xml" /> <input
|
||||
type="hidden" name="view" value="cpanel" /> <input type="hidden"
|
||||
name="task" value="" />
|
||||
<?php echo JHTML::_('form.token'); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
152
administrator/components/com_j2xml/views/cpanel/view.html.php
Normal file
152
administrator/components/com_j2xml/views/cpanel/view.html.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
* @since 1.5.3
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
JHtml::_('behavior.framework');
|
||||
|
||||
jimport('joomla.html.html.tabs');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class J2xmlViewCpanel extends JViewLegacy
|
||||
{
|
||||
|
||||
function display ($tpl = null)
|
||||
{
|
||||
// Trigger the onAfterDispatch event.
|
||||
JPluginHelper::importPlugin('j2xml');
|
||||
// JFactory::getApplication()->triggerEvent('onAfterDispatch');
|
||||
|
||||
$info = $this->get('Info');
|
||||
$this->assignRef('info', $info);
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$this->assignRef('params', $params);
|
||||
|
||||
J2XMLHelper::addSubmenu('cpanel');
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function _quickiconButton ($link, $image, $text, $path = null, $target = '', $onclick = '')
|
||||
{
|
||||
$app = JFactory::getApplication('administrator');
|
||||
if ($target != '')
|
||||
{
|
||||
$target = 'target="' . $target . '"';
|
||||
}
|
||||
if ($onclick != '')
|
||||
{
|
||||
$onclick = 'onclick="' . $onclick . '"';
|
||||
}
|
||||
if ($path === null || $path === '')
|
||||
{
|
||||
$template = $app->getTemplate();
|
||||
$path = '/templates/' . $template . '/images/header/';
|
||||
}
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
if (!class_exists('JPlatform') || version_compare(JPlatform::RELEASE, '12', 'lt'))
|
||||
{
|
||||
?>
|
||||
<div style="float:<?php echo ($lang->isRTL()) ? 'right' : 'left'; ?>;">
|
||||
<div class="icon">
|
||||
<a href="<?php echo $link; ?>" <?php echo $target;?>
|
||||
<?php echo $onclick;?>>
|
||||
<?php echo JHTML::_('image.administrator', $image, $path, NULL, NULL, $text ); ?>
|
||||
<span><?php echo $text; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar ()
|
||||
{
|
||||
require_once JPATH_COMPONENT . '/helpers/j2xml.php';
|
||||
$canDo = j2xmlHelper::getActions();
|
||||
|
||||
$toolbar = JToolBar::getInstance('toolbar');
|
||||
$toolbar->addButtonPath(JPATH_COMPONENT . DS . 'buttons');
|
||||
|
||||
JToolBarHelper::title(JText::_('COM_J2XML_TOOLBAR_J2XML'), 'j2xml.png');
|
||||
|
||||
$doc = JFactory::getDocument();
|
||||
if ($canDo->get('core.create') || ($canDo->get('core.edit')))
|
||||
{
|
||||
jimport('eshiol.core.file');
|
||||
|
||||
$min = ($this->params->get('debug', 0) ? '' : '.min');
|
||||
$doc->addScript("../media/lib_eshiol_core/js/encryption{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_core/js/core{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_core/js/version_compare{$min}.js", array('version'=>'auto'));
|
||||
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName('enabled'))
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('library'));
|
||||
$version = new \JVersion();
|
||||
if ($version->isCompatible('3.9'))
|
||||
{
|
||||
$query->where($db->quoteName('element') . ' = ' . $db->quote('eshiol/J2xmlpro'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName('element') . ' = ' . $db->quote('J2xmlpro'));
|
||||
}
|
||||
$pro = ((bool) $db->setQuery($query)->loadResult()) ? 'pro' : '';
|
||||
$doc->addScript("../media/lib_eshiol_j2xml{$pro}/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
$toolbar = JToolBar::getInstance('toolbar');
|
||||
$toolbar->appendButton('File', 'j2xml', 'COM_J2XML_BUTTON_OPEN', 'COM_J2XML_BUTTON_IMPORT', 'j2xml.cpanel.import', 600, 400, null,
|
||||
'xml,gz', null, $this->params->get('ajax', 0) ? 'eshiol.j2xml.importer' : null);
|
||||
// $params = JComponentHelper::getParams('com_j2xml');
|
||||
// $hostname = JFactory::getURI()->getHost();
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
if (
|
||||
// ($params->get('deveopment') &&
|
||||
// ($hostname == 'localhost') &&
|
||||
($jinput->getCmd('d3v3l0p', '0') === '1'))
|
||||
{
|
||||
$toolbar->appendButton('Link', 'purge', 'COM_J2XML_CONTENT_DELETE',
|
||||
'index.php?option=com_j2xml&task=cpanel.clean&develop=1&' . JSession::getFormToken() . '=1');
|
||||
}
|
||||
JToolBarHelper::divider();
|
||||
}
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_j2xml');
|
||||
}
|
||||
|
||||
$doc->addStyleDeclaration('#toolbar-credit{float:right;}');
|
||||
$toolbar->appendButton('Link', 'credit', 'COM_J2XML_DONATE', 'https://www.eshiol.it/' . Jtext::_('COM_J2XML_DONATE_1'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
?>
|
||||
<fieldset title="<?php echo JText::_('COM_J2XML_MSG_DESCFTPTITLE'); ?>">
|
||||
<legend><?php echo JText::_('COM_J2XML_MSG_DESCFTPTITLE'); ?></legend>
|
||||
|
||||
<?php echo JText::_('COM_J2XML_MSG_DESCFTP'); ?>
|
||||
|
||||
<?php if ($this->ftp instanceof Exception) : ?>
|
||||
<p><?php echo JText::_($this->ftp->getMessage()); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="adminform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="username" name="username" class="input_box" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120">
|
||||
<label for="password"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" id="password" name="password" class="input_box" size="70" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
$state = $this->get('State');
|
||||
$message = $state->get('message');
|
||||
?>
|
||||
|
||||
<?php if ($message) : ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<strong><?php echo $message; ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
97
administrator/components/com_j2xml/views/default/view.php
Normal file
97
administrator/components/com_j2xml/views/default/view.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* J2XML Default View
|
||||
*
|
||||
* @since 3.9
|
||||
*/
|
||||
class J2xmlViewDefault extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $config Configuration array
|
||||
*
|
||||
* @since 3.9
|
||||
*/
|
||||
public function __construct($config = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
parent::__construct($config);
|
||||
$this->_addPath('template', $this->_basePath . '/views/default/tmpl');
|
||||
$this->_addPath('template', JPATH_THEMES . '/' . $app->getTemplate() . '/html/com_j2xml/default');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the view.
|
||||
*
|
||||
* @param string $tpl Template
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.9
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
// Get data from the model.
|
||||
$state = $this->get('State');
|
||||
|
||||
// Are there messages to display?
|
||||
$showMessage = false;
|
||||
|
||||
if (is_object($state))
|
||||
{
|
||||
$message = $state->get('message');
|
||||
$showMessage = (bool) $message;
|
||||
}
|
||||
|
||||
$this->showMessage = $showMessage;
|
||||
$this->state = &$state;
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.9
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
$canDo = JHelperContent::getActions('com_j2xml');
|
||||
JToolbarHelper::title(JText::_('COM_J2XML_HEADER_' . $this->getName()), 'upload import');
|
||||
|
||||
if ($canDo->get('core.admin') || $canDo->get('core.options'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_j2xml');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlCategoriesTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=categories.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlCategories', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlCategories', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
112
administrator/components/com_j2xml/views/export/tmpl/contact.php
Normal file
112
administrator/components/com_j2xml/views/export/tmpl/contact.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlContactTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=contact.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlContact', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlContact', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
112
administrator/components/com_j2xml/views/export/tmpl/content.php
Normal file
112
administrator/components/com_j2xml/views/export/tmpl/content.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlContentTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=content.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlContent', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlContent', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
112
administrator/components/com_j2xml/views/export/tmpl/menus.php
Normal file
112
administrator/components/com_j2xml/views/export/tmpl/menus.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlMenusTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=menus.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlMenus', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlMenus', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
112
administrator/components/com_j2xml/views/export/tmpl/modules.php
Normal file
112
administrator/components/com_j2xml/views/export/tmpl/modules.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlModulesTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=modules.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlModules', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlModules', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlUsernotesTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=usernotes.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlUsernotes', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlUsernotes', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
112
administrator/components/com_j2xml/views/export/tmpl/users.php
Normal file
112
administrator/components/com_j2xml/views/export/tmpl/users.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlUsersTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=users.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlUsers', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlUsers', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlWeblinksTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml&task=weblinks.display&format=raw'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlWeblinks', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlWeblinks', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlExportOkBtn" type="button"
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
|
||||
<?php /** if ($version->isCompatible('4')) : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.Joomla.Modal.getCurrent().close();', 700);"> ?>
|
||||
<?php else : ?>
|
||||
onclick="this.form.submit();window.top.setTimeout('window.parent.jQuery(\'#j2xmlExportModal\').modal(\'hide\')', 700);">
|
||||
<?php endif; **/ ?>
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* View class for export items.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*/
|
||||
class J2xmlViewExport extends JViewLegacy
|
||||
{
|
||||
|
||||
/**
|
||||
* The JForm object
|
||||
*
|
||||
* @var JForm
|
||||
*/
|
||||
protected $form;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @param string $tpl
|
||||
* The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise an Error object.
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
// Initialiase variables.
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
return parent::display($tpl);
|
||||
}
|
||||
}
|
||||
30
administrator/components/com_j2xml/views/fields/view.raw.php
Normal file
30
administrator/components/com_j2xml/views/fields/view.raw.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
* @since 3.7.172
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Fields View
|
||||
*/
|
||||
class J2xmlViewFields extends J2xmlView
|
||||
{
|
||||
}
|
||||
?>
|
||||
247
administrator/components/com_j2xml/views/import/tmpl/default.php
Normal file
247
administrator/components/com_j2xml/views/import/tmpl/default.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
// MooTools is loaded for B/C for extensions generating JavaScript in their install scripts, this call will be removed at 4.0
|
||||
JHtml::_('jquery.framework', true);
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
if (!$version->isCompatible('4'))
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
}
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration('
|
||||
Joomla.submitbutton4 = function() {
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
// do field validation
|
||||
if (form.install_url.value == "" || form.install_url.value == "http://" || form.install_url.value == "https://") {
|
||||
alert("' . JText::_('COM_J2XML_MSG_INSTALL_ENTER_A_URL', true) . '");
|
||||
}
|
||||
else
|
||||
{
|
||||
JoomlaInstaller.showLoading();
|
||||
|
||||
form.installtype.value = "url";
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
|
||||
// Add spindle-wheel for installations:
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $("#j2xml-import");
|
||||
|
||||
JoomlaInstaller.getLoadingOverlay()
|
||||
.css("top", outerDiv.position().top - $(window).scrollTop())
|
||||
.css("left", "0")
|
||||
.css("width", "100%")
|
||||
.css("height", "100%")
|
||||
.css("display", "none")
|
||||
.css("margin-top", "-10px");
|
||||
});
|
||||
|
||||
var JoomlaInstaller = {
|
||||
getLoadingOverlay: function () {
|
||||
return jQuery("#loading");
|
||||
},
|
||||
showLoading: function () {
|
||||
this.getLoadingOverlay().css("display", "block");
|
||||
},
|
||||
hideLoading: function () {
|
||||
this.getLoadingOverlay().css("display", "none");
|
||||
}
|
||||
};');
|
||||
|
||||
JFactory::getDocument()->addStyleDeclaration('
|
||||
#loading {
|
||||
background: rgba(255, 255, 255, .8) url(\'' . JHtml::_('image', 'jui/ajax-loader.gif', '', null, true, true) . '\') 50% 15% no-repeat;
|
||||
position: fixed;
|
||||
opacity: 0.8;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
|
||||
filter: alpha(opacity = 80);
|
||||
overflow: hidden;
|
||||
}');
|
||||
?>
|
||||
|
||||
<?php JFactory::getApplication()->getLanguage()->load('com_j2xml.sys'); ?>
|
||||
|
||||
<div id="j2xml-import" class="clearfix">
|
||||
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
method="post" name="adminForm" id="adminForm" class="form-horizontal">
|
||||
<?php if (!empty($this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<!-- Render messages set by extension install scripts here -->
|
||||
<?php if ($this->showMessage) : ?>
|
||||
<?php echo $this->loadTemplate('message'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'myTab', array('active' => 'package')); ?>
|
||||
<?php // Show installation tabs at the start ?>
|
||||
<?php // $firstTab = JFactory::getApplication()->triggerEvent('onInstallerViewBeforeFirstTab', array()); ?>
|
||||
<?php // Show installation tabs ?>
|
||||
<?php // $tabs = JFactory::getApplication()->triggerEvent('onInstallerAddInstallationTab', array()); ?>
|
||||
|
||||
<?php
|
||||
$tabs = array();
|
||||
$tab = array();
|
||||
$tab['name'] = 'package';
|
||||
$tab['label'] = JText::_('COM_J2XML_PACKAGEIMPORTER_UPLOAD_DATA_FILE');
|
||||
|
||||
// Render the input
|
||||
ob_start();
|
||||
include __DIR__ . '/default_package.php';
|
||||
$tab['content'] = ob_get_clean();
|
||||
|
||||
$tabs[] = $tab;
|
||||
?>
|
||||
|
||||
<?php foreach ($tabs as $tab) : ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'myTab', $tab['name'], $tab['label']); ?>
|
||||
<fieldset class="uploadform">
|
||||
<?php echo $tab['content']; ?>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php // Show installation tabs at the end ?>
|
||||
<?php // $lastTab = JFactory::getApplication()->triggerEvent('onInstallerViewAfterLastTab', array()); ?>
|
||||
<?php // $tabs = array_merge($firstTab, $tabs, $lastTab); ?>
|
||||
<?php if (!$tabs) : ?>
|
||||
<?php JFactory::getApplication()->enqueueMessage(JText::_('COM_J2XML_NO_INSTALLATION_PLUGINS_FOUND'), 'warning'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->ftp) : ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'myTab', 'ftp', JText::_('COM_J2XML_MSG_DESCFTPTITLE')); ?>
|
||||
<?php echo $this->loadTemplate('ftp'); ?>
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="installtype" value=""/>
|
||||
<input type="hidden" name="task" value="import.import"/>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
</div>
|
||||
<button class="hidden" id="j2xmlImportCloseBtn" type="button" onclick="this.form.install_package.val('');"></button>
|
||||
<button class="hidden" id="j2xmlImportBtn" type="button" onclick="console.log('install_package');this.form.install_package.val('');"></button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="loading"></div>
|
||||
|
||||
<?php
|
||||
JText::script('LIB_J2XML_MSG_FILE_FORMAT_NOT_SUPPORTED');
|
||||
|
||||
$doc = Factory::getDocument();
|
||||
$cparams = JComponentHelper::getParams('com_j2xml');
|
||||
$min = $cparams->get('debug', 0) ? '' : '.min';
|
||||
|
||||
JLog::add(new JLogEntry("loading ../media/lib_eshiol_j2xml/js/pako_inflate{$min}.js", JLog::DEBUG, 'com_j2xml'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/pako_inflate{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JLog::add(new JLogEntry("loading ../media/lib_eshiol_j2xml/js/version_compare{$min}.js", JLog::DEBUG, 'com_j2xml'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/version_compare{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JLog::add(new JLogEntry("loading ../media/lib_eshiol_j2xml/js/j2xml{$min}.js", JLog::DEBUG, 'com_j2xml'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JLog::add(new JLogEntry("loading ../media/lib_eshiol_j2xml/js/j2xml{$min}.js", JLog::DEBUG, 'com_j2xml'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/base64{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JLog::add(new JLogEntry("loading ../media/com_j2xml/js/j2xml{$min}.js", JLog::DEBUG, 'com_j2xml'));
|
||||
$doc->addScript("../media/com_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
// Trigger the onLoadJS event.
|
||||
PluginHelper::importPlugin('j2xml');
|
||||
Factory::getApplication()->triggerEvent('onLoadJS');
|
||||
|
||||
// Load the import options form
|
||||
$selector = 'j2xmlImport';
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
echo HTMLHelper::_('bootstrap.renderModal', $selector . 'Modal',
|
||||
array(
|
||||
'title' => Text::_('COM_J2XML_IMPORT'),
|
||||
'url' => JRoute::_('index.php?'. http_build_query([
|
||||
'option' => 'com_j2xml',
|
||||
'view' => 'import',
|
||||
'layout' => 'options',
|
||||
'tmpl' => 'component',
|
||||
Session::getFormToken() => 1
|
||||
])),
|
||||
'height' => '420px',
|
||||
'width' => '300px',
|
||||
'modalWidth' => '50',
|
||||
'footer' =>
|
||||
'<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
|
||||
. Text::_('JTOOLBAR_CANCEL') . '</button>'
|
||||
. '<button type="button" class="btn btn-success" data-bs-dismiss="modal" aria-hidden="true"'
|
||||
. ' onclick="eshiol.j2xml.importerModal();">'
|
||||
. Text::_("COM_J2XML_IMPORT") . '</button>'
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($version->isCompatible('3.4'))
|
||||
{
|
||||
echo JHtml::_('bootstrap.renderModal', $selector . 'Modal',
|
||||
array(
|
||||
'title' => JText::_('COM_J2XML_IMPORT'),
|
||||
'url' => JRoute::_('index.php?option=com_j2xml&view=import&layout=options&tmpl=component'),
|
||||
'height' => '370px',
|
||||
'width' => '300px',
|
||||
'modalWidth' => '50',
|
||||
'modalHeight' => '50',
|
||||
'footer' => '<a class="btn" data-dismiss="modal" type="button"'
|
||||
. ' onclick="jQuery(\'#' . $selector .'Modal iframe\').contents().find(\'#' . $selector . 'CancelBtn\').click();">' . JText::_("JTOOLBAR_CANCEL") . '</a>'
|
||||
. '<button class="btn btn-success" type="button"'
|
||||
. ' onclick="eshiol.j2xml.importerModal();jQuery(\'#' . $selector . 'Modal iframe\').contents().find(\'#' . $selector . 'OkBtn\').click();">'
|
||||
. JText::_("COM_J2XML_IMPORT") . '</button>'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo JHtml::_('bootstrap.renderModal', $selector . 'Modal',
|
||||
array(
|
||||
'title' => JText::_('COM_J2XML_IMPORT'),
|
||||
'url' => JRoute::_('index.php?option=com_j2xml&view=import&layout=options&tmpl=component'),
|
||||
'height' => '370px',
|
||||
'width' => '300px',
|
||||
'modalWidth' => '40'),
|
||||
addslashes('<div class="container-fluid"><div class="row-fluid"><div class="span12"><div class="btn-toolbar">'
|
||||
. '<a class="btn btn-wrapper pull-right" data-dismiss="modal" type="button"'
|
||||
. ' onclick="jQuery(\'#' . $selector .'Modal iframe\').contents().find(\'#' . $selector . 'CancelBtn\').click();">' . JText::_("JTOOLBAR_CANCEL") . '</a>'
|
||||
. '<button class="btn btn-success btn-wrapper pull-right" type="button"'
|
||||
. ' onclick="eshiol.j2xml.importerModal();jQuery(\'#' . $selector . 'Modal iframe\').contents().find(\'#' . $selector . 'OkBtn\').click();">'
|
||||
. JText::_("COM_J2XML_IMPORT") . '</button>'
|
||||
. '</div></div></div></div>'));
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
-->
|
||||
<metadata>
|
||||
<layout title="COM_J2XML_INSTALL_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_J2XML_INSTALL_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
</metadata>
|
||||
@@ -0,0 +1,452 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$version = new JVersion();
|
||||
if ($version->isCompatible('3.8'))
|
||||
{
|
||||
JHtml::_('jquery.token');
|
||||
}
|
||||
|
||||
JText::script('COM_J2XML_IMPORTING');
|
||||
JText::script('COM_J2XML_PACKAGEIMPORTER_UPLOAD_ERROR_UNKNOWN');
|
||||
JText::script('COM_J2XML_PACKAGEIMPORTER_UPLOAD_ERROR_EMPTY');
|
||||
JText::script('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN');
|
||||
JText::script('LIB_J2XML_MSG_FILE_FORMAT_NOT_SUPPORTED');
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration('
|
||||
Joomla.submitbuttonpackage = function()
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
// do field validation
|
||||
if (form.install_package.value == "")
|
||||
{
|
||||
alert("' . JText::_('COM_J2XML_PACKAGEIMPORTER_NO_PACKAGE', true) . '");
|
||||
}
|
||||
else
|
||||
{
|
||||
JoomlaInstaller.showLoading();
|
||||
form.installtype.value = "upload"
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
');
|
||||
|
||||
// Drag and Drop installation scripts
|
||||
$token = JSession::getFormToken();
|
||||
$return = JFactory::getApplication()->input->getBase64('return');
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$params = ComponentHelper::getParams('com_j2xml');
|
||||
$document->addScriptOptions('J2XML', array('HaltOnError' => (bool) $params->get('haltonerror', 1)));
|
||||
|
||||
// Drag-drop installation
|
||||
$document->addScriptDeclaration(
|
||||
<<<JS
|
||||
jQuery(document).ready(function($) {
|
||||
if (typeof FormData === 'undefined') {
|
||||
$('#legacy-uploader').show();
|
||||
$('#uploader-wrapper').hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var uploading = false;
|
||||
var dragZone = $('#dragarea');
|
||||
var fileInput = $('#install_package');
|
||||
var button = $('#select-file-button');
|
||||
var url = 'index.php?option=com_installer&task=install.ajax_upload';
|
||||
var returnUrl = $('#installer-return').val();
|
||||
var actions = $('.upload-actions');
|
||||
var progress = $('.upload-progress');
|
||||
var progressBar = progress.find('.bar');
|
||||
var percentage = progress.find('.uploading-number');
|
||||
|
||||
if (returnUrl) {
|
||||
url += '&return=' + returnUrl;
|
||||
}
|
||||
|
||||
button.on('click', function(e) {
|
||||
fileInput.click();
|
||||
});
|
||||
|
||||
fileInput.on('change', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (uploading) {
|
||||
return;
|
||||
}
|
||||
|
||||
var files = e.originalEvent.target.files || e.originalEvent.dataTransfer.files;
|
||||
|
||||
if (!files.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var file = files[0];
|
||||
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
console.log('reader.onload');
|
||||
try {
|
||||
var data = pako.ungzip(this.result, {"to": "string"});
|
||||
console.log('gzip');
|
||||
} catch (err) {
|
||||
console.log('xml');
|
||||
var data = this.result;
|
||||
}
|
||||
tmp = strstr(data, '<?xml version="1.0" ');
|
||||
data = (tmp !== false ? tmp : data);
|
||||
console.log(data);
|
||||
|
||||
eshiol.j2xml.convert.forEach(function(fn) {
|
||||
data = fn(data);
|
||||
});
|
||||
|
||||
var xmlDoc;
|
||||
var nodes = Array();
|
||||
try {
|
||||
xmlDoc = $.parseXML(data);
|
||||
xml = $(xmlDoc);
|
||||
root = xml.find(":root")[0];
|
||||
|
||||
if (root.nodeName != "j2xml") {
|
||||
console.log(Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN'));
|
||||
Joomla.renderMessages({'error': [Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN')]});
|
||||
} else {
|
||||
validated = false;
|
||||
eshiol.j2xml.validate.forEach(function(fn) {
|
||||
validated = validated || fn(data);
|
||||
});
|
||||
if (validated) {
|
||||
console.log('j2xml file version ' + $(root).attr('version'));
|
||||
|
||||
$('#j2xml_filename').val(file.name);
|
||||
$('#j2xml_data').val(btoa(unescape(encodeURIComponent(data))));
|
||||
|
||||
var j2xmlOptions = Joomla.getOptions('J2XML'),
|
||||
JoomlaVersion = j2xmlOptions && j2xmlOptions.Joomla ? j2xmlOptions.Joomla : '3';
|
||||
|
||||
if (JoomlaVersion == '4') {
|
||||
var el = document.getElementById('j2xmlImportModal')
|
||||
var modal = bootstrap.Modal.getInstance(el) // Returns a Bootstrap modal instance
|
||||
modal.show();
|
||||
} else {
|
||||
$('#j2xmlImportModal').modal();
|
||||
}
|
||||
|
||||
fileInput.val('');
|
||||
return false;
|
||||
} else {
|
||||
console.log('j2xml file version ' + $(root).attr('version') + ' not supported');
|
||||
Joomla.renderMessages({'error': [Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_NOT_SUPPORTED').replace('%s', $(root).attr('version'))]});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
Joomla.renderMessages({'error': [e.message.split('\\n').join('<br />')]});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
reader.readAsText(file, 'UTF-8');
|
||||
});
|
||||
|
||||
dragZone.on('dragenter', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragZone.addClass('hover');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Notify user when file is over the drop area
|
||||
dragZone.on('dragover', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragZone.addClass('hover');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
dragZone.on('dragleave', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
dragZone.removeClass('hover');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
dragZone.on('drop', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dragZone.removeClass('hover');
|
||||
|
||||
if (uploading) {
|
||||
return;
|
||||
}
|
||||
|
||||
var files = e.originalEvent.target.files || e.originalEvent.dataTransfer.files;
|
||||
|
||||
if (!files.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var file = files[0];
|
||||
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
console.log('reader.onload');
|
||||
try {
|
||||
var data = pako.ungzip(this.result, {"to": "string"});
|
||||
console.log('gzip');
|
||||
} catch (err) {
|
||||
console.log('xml');
|
||||
var data = this.result;
|
||||
}
|
||||
tmp = strstr(data, '<?xml version="1.0" ');
|
||||
data = (tmp !== false ? tmp : data);
|
||||
console.log(data);
|
||||
|
||||
eshiol.j2xml.convert.forEach(function(fn) {
|
||||
data = fn(data);
|
||||
});
|
||||
|
||||
var xmlDoc;
|
||||
var nodes = Array();
|
||||
try {
|
||||
xmlDoc = $.parseXML(data);
|
||||
xml = $(xmlDoc);
|
||||
root = xml.find(":root")[0];
|
||||
|
||||
if (root.nodeName != "j2xml") {
|
||||
console.log(Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN'));
|
||||
Joomla.renderMessages({'error': [Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN')]});
|
||||
} else {
|
||||
validated = false;
|
||||
eshiol.j2xml.validate.forEach(function(fn) {
|
||||
validated = validated || fn(data);
|
||||
});
|
||||
if (validated) {
|
||||
console.log('j2xml file version ' + $(root).attr('version'));
|
||||
|
||||
$('#j2xml_filename').val(file.name);
|
||||
$('#j2xml_data').val(btoa(unescape(encodeURIComponent(data))));
|
||||
|
||||
var j2xmlOptions = Joomla.getOptions('J2XML'),
|
||||
JoomlaVersion = j2xmlOptions && j2xmlOptions.Joomla ? j2xmlOptions.Joomla : '3';
|
||||
|
||||
if (JoomlaVersion == '4') {
|
||||
var el = document.getElementById('j2xmlImportModal')
|
||||
var modal = bootstrap.Modal.getInstance(el) // Returns a Bootstrap modal instance
|
||||
modal.show();
|
||||
} else {
|
||||
$('#j2xmlImportModal').modal();
|
||||
}
|
||||
|
||||
fileInput.val('');
|
||||
return false;
|
||||
} else {
|
||||
console.log(Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_NOT_SUPPORTED').replace('%s', $(root).attr('version')));
|
||||
Joomla.renderMessages({'error': [Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_NOT_SUPPORTED').replace('%s', $(root).attr('version'))]});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
Joomla.renderMessages({'error': [Joomla.JText._('LIB_J2XML_MSG_FILE_FORMAT_UNKNOWN')]});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
reader.readAsText(file, 'UTF-8');
|
||||
});
|
||||
});
|
||||
JS
|
||||
);
|
||||
|
||||
$document->addStyleDeclaration(
|
||||
<<<CSS
|
||||
#dragarea {
|
||||
background-color: #fafbfc;
|
||||
border: 1px dashed #999;
|
||||
box-sizing: border-box;
|
||||
padding: 5% 0;
|
||||
transition: all 0.2s ease 0s;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#dragarea p.lead {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#upload-icon {
|
||||
font-size: 48px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
line-height: 175%;
|
||||
color: #999;
|
||||
transition: all .2s;
|
||||
}
|
||||
|
||||
#dragarea.hover {
|
||||
border-color: #666;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#dragarea.hover #upload-icon,
|
||||
#dragarea p.lead {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.upload-progress, .install-progress {
|
||||
width: 50%;
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
/* Default transition (.3s) is too slow, progress will not run to 100% */
|
||||
.upload-progress .progress .bar {
|
||||
-webkit-transition: width .1s;
|
||||
-moz-transition: width .1s;
|
||||
-o-transition: width .1s;
|
||||
transition: width .1s;
|
||||
}
|
||||
|
||||
#dragarea[data-state=pending] .upload-progress {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dragarea[data-state=pending] .install-progress {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dragarea[data-state=uploading] .install-progress {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dragarea[data-state=uploading] .upload-actions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dragarea[data-state=installing] .upload-progress {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dragarea[data-state=installing] .upload-actions {
|
||||
display: none;
|
||||
}
|
||||
CSS
|
||||
);
|
||||
|
||||
$version = new \JVersion();
|
||||
if ($version->isCompatible('3.7'))
|
||||
{
|
||||
$maxSize = JFilesystemHelper::fileUploadMaxSize();
|
||||
}
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg');
|
||||
$document->addScriptOptions('progressBarErrorClass', 'progress-bar progress-bar-striped progress-bar-animated bg-error');
|
||||
}
|
||||
?>
|
||||
<legend><?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_UPLOAD_IMPORT_DATA'); ?></legend>
|
||||
|
||||
<div id="uploader-wrapper">
|
||||
<div id="dragarea" data-state="pending">
|
||||
<div id="dragarea-content" class="text-center">
|
||||
<p>
|
||||
<span id="upload-icon" class="icon-upload" aria-hidden="true"></span>
|
||||
</p>
|
||||
<div class="upload-progress">
|
||||
<div class="progress<?php echo $version->isCompatible('4') ? '' : ' progress-striped active'; ?>">
|
||||
<div class="<?php echo $version->isCompatible('4') ? 'progress-bar progress-bar-striped progress-bar-animated bg-success' : 'bar bar-success'; ?>"
|
||||
style="width:0"
|
||||
role="progressbar"
|
||||
aria-valuenow="0"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
></div>
|
||||
</div>
|
||||
<p class="lead">
|
||||
<span class="uploading-text">
|
||||
<?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_UPLOADING'); ?>
|
||||
</span>
|
||||
<span class="uploading-number">0</span><span class="uploading-symbol">%</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="install-progress">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="bar" style="width: 100%;"></div>
|
||||
</div>
|
||||
<p class="lead">
|
||||
<span class="installing-text">
|
||||
<?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_IMPORTING'); ?>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="upload-actions">
|
||||
<p class="lead">
|
||||
<?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_DRAG_FILE_HERE'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<button id="select-file-button" type="button" class="btn btn-success">
|
||||
<span class="icon-copy" aria-hidden="true"></span>
|
||||
<?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_SELECT_FILE'); ?>
|
||||
</button>
|
||||
</p>
|
||||
<?php if ($version->isCompatible('3.7')) : ?>
|
||||
<p>
|
||||
<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="legacy-uploader" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="install_package" class="control-label"><?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_DATA_FILE'); ?></label>
|
||||
<div class="controls">
|
||||
<input class="input_box" id="install_package" name="install_package" type="file" size="57" /><br>
|
||||
<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<!-- <button class="btn btn-primary" type="button" id="installbutton_package" onclick="Joomla.submitbuttonpackage()"> -->
|
||||
<button class="btn btn-primary" type="button" id="installbutton_package">
|
||||
<?php echo JText::_('COM_J2XML_PACKAGEIMPORTER_UPLOAD_AND_INSTALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<input id="installer-return" name="return" type="hidden" value="<?php echo $return; ?>" />
|
||||
<input id="installer-token" name="token" type="hidden" value="<?php echo $token; ?>" />
|
||||
</div>
|
||||
|
||||
<input id="j2xml_filename" name="j2xml_filename" type="hidden" value="" />
|
||||
<input id="j2xml_data" name="j2xml_data" type="hidden" value="" />
|
||||
104
administrator/components/com_j2xml/views/import/tmpl/options.php
Normal file
104
administrator/components/com_j2xml/views/import/tmpl/options.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
if ($version->isCompatible('4'))
|
||||
{
|
||||
$ui = 'uitab';
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('showon');
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = 'bootstrap';
|
||||
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlTabs a:first' ).tab( 'show' );
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form
|
||||
action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm" autocomplete="off"
|
||||
class="form-horizontal">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlImport', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlImport', $name, JText::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
</form>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
JLoader::register('J2XMLViewDefault', dirname(__DIR__) . '/default/view.php');
|
||||
|
||||
/**
|
||||
* J2xml Import View
|
||||
*
|
||||
* @since 3.9.0
|
||||
*/
|
||||
class J2xmlViewImport extends J2xmlViewDefault
|
||||
{
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @param string $tpl Template
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.9
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
// Initialiase variables.
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
$paths = new stdClass;
|
||||
$paths->first = '';
|
||||
$state = $this->get('state');
|
||||
|
||||
$this->paths = &$paths;
|
||||
$this->state = &$state;
|
||||
|
||||
JPluginHelper::importPlugin('installer');
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar ()
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
JToolBarHelper::title(JText::_('COM_J2XML_TOOLBAR_J2XML'), 'upload import');
|
||||
|
||||
if (JFactory::getUser()->authorise('core.admin'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_j2xml');
|
||||
}
|
||||
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addStyleDeclaration('#toolbar-credit{float:right;}');
|
||||
|
||||
$toolbar = JToolBar::getInstance('toolbar');
|
||||
$toolbar->appendButton('Popup', 'credit', 'COM_J2XML_DONATE', 'https://www.eshiol.it/' . Jtext::_('COM_J2XML_DONATE_1') . '?tmpl=component', 550, 350);
|
||||
}
|
||||
}
|
||||
30
administrator/components/com_j2xml/views/menus/view.raw.php
Normal file
30
administrator/components/com_j2xml/views/menus/view.raw.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
* @since 3.9.213
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Menus View
|
||||
*/
|
||||
class J2xmlViewMenus extends J2xmlView
|
||||
{
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Modules View
|
||||
*
|
||||
* @since 3.9.213
|
||||
*/
|
||||
class J2xmlViewModules extends J2xmlView
|
||||
{
|
||||
}
|
||||
?>
|
||||
132
administrator/components/com_j2xml/views/raw.php
Normal file
132
administrator/components/com_j2xml/views/raw.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use eshiol\J2xml\Exporter;
|
||||
use eshiol\J2xml\Version;
|
||||
|
||||
JLoader::import('eshiol.J2xml.Exporter');
|
||||
JLoader::import('eshiol.J2xml.Version');
|
||||
|
||||
/**
|
||||
* J2XML Component base RAW View
|
||||
*
|
||||
* @since 3.2.137
|
||||
*/
|
||||
class J2xmlView extends JViewLegacy
|
||||
{
|
||||
|
||||
/**
|
||||
* The list of IDs to be exported
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $ids;
|
||||
|
||||
/**
|
||||
* The params object
|
||||
*
|
||||
* @var JRegistry
|
||||
*/
|
||||
protected $params;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->ids = explode(",", $jform['cid']);
|
||||
unset($jform['cid']);
|
||||
|
||||
$this->params = new JRegistry();
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute and display a template script.
|
||||
*
|
||||
* @param string $tpl
|
||||
* The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise an Error object.
|
||||
*
|
||||
* @see JViewLegacy::loadTemplate()
|
||||
*/
|
||||
function display($tpl = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
$params = new JRegistry();
|
||||
foreach ($this->params->toArray() as $k => $v)
|
||||
{
|
||||
$params->set(substr($k, 0, 7) == 'export_' ? substr($k, 7) : $k, $v);
|
||||
}
|
||||
|
||||
$j2xml = new Exporter();
|
||||
$get_xml = strtolower(str_replace('J2xmlView', '', get_class($this)));
|
||||
$j2xml->$get_xml($this->ids, $xml, $params);
|
||||
|
||||
$out = 'j2xml' . str_replace('.', '', Version::$DOCVERSION) . JFactory::getDate()->format("YmdHis");
|
||||
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
$dom->formatOutput = true;
|
||||
$dom->loadXML($xml->asXML());
|
||||
$data = $dom->saveXML();
|
||||
|
||||
// modify the MIME type
|
||||
$document = JFactory::getDocument();
|
||||
$compression = $params->get('compression', 0);
|
||||
|
||||
if (!\extension_loaded('zlib') || ini_get('zlib.output_compression'))
|
||||
{
|
||||
$document->setMimeEncoding('text/xml', true);
|
||||
JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $out . '.xml"', true);
|
||||
}
|
||||
elseif ($compression)
|
||||
{
|
||||
$document->setMimeEncoding('application/gzip', true);
|
||||
JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $out . '.gz"', true);
|
||||
$data = gzencode($data, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
$document->setMimeEncoding('text/xml', true);
|
||||
JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $out . '.xml"', true);
|
||||
}
|
||||
echo $data;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlCategoriesTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlCategories', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlCategories', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=categories.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
154
administrator/components/com_j2xml/views/send/tmpl/contact.php
Normal file
154
administrator/components/com_j2xml/views/send/tmpl/contact.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlContactTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlContact', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlContact', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=contact.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
154
administrator/components/com_j2xml/views/send/tmpl/content.php
Normal file
154
administrator/components/com_j2xml/views/send/tmpl/content.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlContentTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlContent', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlContent', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=content.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
154
administrator/components/com_j2xml/views/send/tmpl/menus.php
Normal file
154
administrator/components/com_j2xml/views/send/tmpl/menus.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlMenusTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlMenus', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlMenus', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=menus.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
154
administrator/components/com_j2xml/views/send/tmpl/users.php
Normal file
154
administrator/components/com_j2xml/views/send/tmpl/users.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlUsersTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlUsers', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlUsers', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=users.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
154
administrator/components/com_j2xml/views/send/tmpl/weblinks.php
Normal file
154
administrator/components/com_j2xml/views/send/tmpl/weblinks.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$version = new JVersion();
|
||||
|
||||
$ui = $version->isCompatible('4') ? 'uitab' : 'bootstrap';
|
||||
|
||||
if ($version->isCompatible('3.4'))
|
||||
{
|
||||
JHtml::_('behavior.formvalidator');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.formvalidation');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('jquery.framework', true);
|
||||
|
||||
if ($version->isCompatible( '4' ))
|
||||
{
|
||||
JFactory::getDocument()->getWebAssetManager()
|
||||
->useScript( 'webcomponent.toolbar-button' );
|
||||
$this->document->addScriptOptions('progressBarContainerClass', 'progress');
|
||||
$this->document->addScriptOptions('progressBarClass', 'progress-bar progress-bar-striped progress-bar-animated bg-success');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
JHtml::_($ui . '.tooltip', '.hasTooltip', array(
|
||||
'placement' => 'bottom'
|
||||
));
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
JHtml::_('behavior.tabstate');
|
||||
JFactory::getDocument()->addScriptDeclaration(<<<EOL
|
||||
// Select first tab
|
||||
jQuery(document).ready(function() {
|
||||
jQuery( '#j2xmlWeblinksTabs a:first' ).tab( 'show' );
|
||||
|
||||
// url validator
|
||||
document.formvalidator.setHandler( 'url', function( value, element ) {
|
||||
var regex = /^(https?|ftp|rmtp|mms):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)*)(:(\d+))?\/?/i;
|
||||
return regex.test( value );
|
||||
});
|
||||
});
|
||||
EOL
|
||||
);
|
||||
}
|
||||
|
||||
$params = JComponentHelper::getParams('com_j2xml');
|
||||
$min = ($params->get('debug', 0) ? '' : '.min');
|
||||
$doc = JFactory::getDocument();
|
||||
$doc->addScript("../media/lib_eshiol_phpxmlrpc/js/jquery.xmlrpc{$min}.js", array('version'=>'auto'));
|
||||
$doc->addScript("../media/lib_eshiol_j2xml/js/j2xml{$min}.js", array('version'=>'auto'));
|
||||
|
||||
JText::script('COM_J2XML_SEND_ERROR');
|
||||
JText::script('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED');
|
||||
JText::script('LIB_J2XML_SENDING');
|
||||
JText::script('LIB_J2XML_MSG_XMLRPC_DISABLED');
|
||||
JText::script('LIB_J2XML_ERROR_UNKNOWN');
|
||||
JText::script('LIB_J2XML_ERROR_STATUS0');
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_j2xml'); ?>"
|
||||
id="adminForm" method="post" name="adminForm"
|
||||
class="form-horizontal form-validate">
|
||||
|
||||
<?php $fieldsets = $this->form->getFieldsets(); ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.startTabSet', 'j2xmlWeblinks', array('active' => 'export')); ?>
|
||||
|
||||
<?php foreach ($fieldsets as $name => $fieldSet) : ?>
|
||||
<?php if ($name == 'details') continue; ?>
|
||||
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_J2XML_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<?php echo JHtml::_($ui . '.addTab', 'j2xmlWeblinks', $name, Text::_($label)); ?>
|
||||
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<?php
|
||||
$dataShowOn = '';
|
||||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
|
||||
?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($field->hidden) : ?>
|
||||
<?php echo $field->input; ?>
|
||||
<?php else : ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
|
||||
<?php if ($name != 'permissions') : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_($ui . '.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_($ui . '.endTabSet'); ?>
|
||||
|
||||
<button class="hidden" id="j2xmlSendOkBtn" type="button"
|
||||
onclick="
|
||||
eshiol.removeMessages(window.parent.jQuery('#system-message-container'));
|
||||
|
||||
var f = document.adminForm;
|
||||
if (document.formvalidator.isValid(f)) {
|
||||
window.top.setTimeout('window.parent.jQuery(\'#j2xmlSendModal\').modal(\'hide\')', 700);
|
||||
|
||||
eshiol.j2xml.send({
|
||||
export_url: 'index.php?option=com_j2xml&task=weblinks.export&format=json&<?php echo JSession::getFormToken(); ?>=1',
|
||||
remote_url: jQuery('#jform_remote_url').val().replace(/\/?$/, '/') + 'index.php?option=com_j2xml&task=services.import&format=xmlrpc',
|
||||
compression: jQuery('#jform_compression').val(),
|
||||
password: jQuery('input:radio[name=\'jform\[password\]\']:checked').first().val(),
|
||||
fields: jQuery('input:radio[name=\'jform\[fields\]\']:checked').first().val(),
|
||||
});
|
||||
}
|
||||
else {
|
||||
var msg = new Array();
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR'));
|
||||
if (jQuery('#jform_remote_url').hasClass('invalid')) {
|
||||
msg.push(Joomla.JText._('COM_J2XML_SEND_ERROR_REMOTEURL_IS_REQUIRED'));
|
||||
}
|
||||
// alert (msg.join('\n'));
|
||||
return false;
|
||||
}
|
||||
"></button>
|
||||
</form>
|
||||
59
administrator/components/com_j2xml/views/send/view.html.php
Normal file
59
administrator/components/com_j2xml/views/send/view.html.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
/**
|
||||
* View class for send items.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*/
|
||||
class J2xmlViewSend extends JViewLegacy
|
||||
{
|
||||
|
||||
/**
|
||||
* The JForm object
|
||||
*
|
||||
* @var JForm
|
||||
*/
|
||||
protected $form;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @param string $tpl
|
||||
* The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise an Error object.
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
// Initialiase variables.
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
return parent::display($tpl);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component User notes RAW View
|
||||
*
|
||||
* @since 3.9.213
|
||||
*/
|
||||
class J2xmlViewUsernotes extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
54
administrator/components/com_j2xml/views/users/view.raw.php
Normal file
54
administrator/components/com_j2xml/views/users/view.raw.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Users RAW View
|
||||
*
|
||||
* @since 1.5.3beta4.39
|
||||
*/
|
||||
class J2xmlViewUsers extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
* @since 3.7.192
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Viewlevels View
|
||||
*/
|
||||
class J2xmlViewViewlevels extends J2xmlView
|
||||
{
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_j2xml
|
||||
*
|
||||
* @version 3.9.229-rc1
|
||||
*
|
||||
* @author Helios Ciancio <info (at) eshiol (dot) it>
|
||||
* @link https://www.eshiol.it
|
||||
* @copyright Copyright (C) 2010 - 2023 Helios Ciancio. All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
|
||||
* J2XML is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License
|
||||
* or other free or open source software licenses.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die();
|
||||
|
||||
require_once dirname(__FILE__) . '/../raw.php';
|
||||
|
||||
/**
|
||||
* J2XML Component Weblinks RAW View
|
||||
*
|
||||
* @since 3.6.161
|
||||
*/
|
||||
class J2xmlViewWeblinks extends J2xmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $config
|
||||
* A named configuration array for object construction.
|
||||
* name: the name (optional) of the view (defaults to the view class name suffix).
|
||||
* charset: the character set to use for display
|
||||
* escape: the name (optional) of the function to use for escaping strings
|
||||
* base_path: the parent path (optional) of the views directory (defaults to the component folder)
|
||||
* template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name
|
||||
* helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/)
|
||||
* layout: the layout (optional) to use to display the view
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
JLog::add(new JLogEntry(__METHOD__, JLog::DEBUG, 'com_j2xml'));
|
||||
|
||||
parent::__construct($config);
|
||||
|
||||
$jform = JFactory::getApplication()->input->post->get('jform', array(), 'array');
|
||||
|
||||
$this->params->loadArray($jform);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user