* @link http://regularlabs.com * @copyright Copyright © 2023 Regular Labs All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; use Joomla\CMS\Editor\Editor as JEditor; use Joomla\CMS\Factory as JFactory; use Joomla\CMS\Form\Form as JForm; use Joomla\CMS\HTML\HTMLHelper as JHtml; use Joomla\CMS\Language\Text as JText; use Joomla\CMS\Plugin\PluginHelper as JPluginHelper; $xmlfile = dirname(__FILE__, 2) . '/forms/popup.xml'; $form = new JForm('sourcerer'); $form->loadFile($xmlfile, 1, '//config'); $editor_plugin = JPluginHelper::getPlugin('editors', 'codemirror'); if (empty($editor_plugin)) { JFactory::getApplication()->enqueueMessage(JText::sprintf('SRC_ERROR_CODEMIRROR_DISABLED', '', ''), 'error'); return ''; } $user = JFactory::getApplication()->getIdentity() ?: JFactory::getUser(); $editor = JEditor::getInstance('codemirror'); ?>
'code']); ?> 'SRC_CODE', 'css' => 'SRC_CSS', 'js' => 'SRC_JAVASCRIPT', 'php' => 'SRC_PHP', 'settings' => 'SRC_TAG_SETTINGS', ]; foreach ($tabs as $id => $title) { echo JHtml::_('uitab.addTab', 'main', $id, JText::_($title)); echo $form->renderFieldset($id); echo JHtml::_('uitab.endTab'); } ?>