first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1 @@
html,section{overflow:hidden}.ui-jce,section{position:absolute}.ui-jce main,nav .uk-nav-header,section{padding:.5rem}html{background:#fff;font-size:13px}.ui-jce{top:.25rem;left:.25rem;right:.25rem;bottom:.25rem}main,nav{box-sizing:border-box;height:100%;flex:auto;position:relative}nav .uk-nav{display:block}nav .uk-nav.hidden{display:none}nav .uk-parent>ul{margin-left:1.5rem}nav .uk-list-space>li:nth-child(n+2){margin-top:.25rem}main{margin:0 0 0 .5rem;width:80%}section{right:0;left:0;bottom:0;top:2.5rem}iframe{width:100%;height:100%}.ui-jce .uk-nav li{position:relative}.ui-jce .uk-nav li a,.ui-jce header a{color:inherit}.ui-jce header a:hover{color:#888}.ui-jce header a:active,.ui-jce header a:hover,.ui-jce header a:visited{text-decoration:none}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loading>a>span::before{content:"";display:inline-block;border:2px solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:16px;height:16px;animation:donut-spin 1.2s linear infinite;z-index:10001;box-sizing:border-box}

View File

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

View File

@@ -0,0 +1,2 @@
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.HelpPlugin",{init:function(ed,url){this.editor=ed,ed.addCommand("mceHelp",function(){ed.windowManager.open({title:ed.getLang("dlg.help","Help"),url:ed.getParam("site_url")+"index.php?option=com_jce&task=plugin.display&plugin=help&lang="+ed.getParam("language")+"&section=editor&category=editor&article=about",size:"mce-modal-landscape-full"})}),ed.addButton("help",{title:"dlg.help",cmd:"mceHelp"})}}),tinymce.PluginManager.add("help",tinymce.plugins.HelpPlugin)}();

View File

@@ -0,0 +1,217 @@
<?php
/**
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* JCE 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
*/
defined('JPATH_PLATFORM') or die;
class WFHelpPlugin extends WFEditorPlugin
{
protected $name = 'help';
public function __construct($config = array())
{
parent::__construct($config);
}
/**
* Display the plugin.
*/
public function display()
{
parent::display();
$app = JFactory::getApplication();
$section = $app->input->getWord('section');
$category = $app->input->getWord('category');
$article = $app->input->getWord('article');
$language = $app->input->getWord('lang');
$params = JComponentHelper::getParams('com_jce');
$url = $params->get('help_url', 'https://www.joomlacontenteditor.net');
$method = $params->get('help_method', 'reference');
$pattern = $params->get('help_pattern', '/$1/$2/$3');
// trim url of trailing slash
$url = trim($url, '/');
switch ($method) {
default:
case 'reference':
$url .= '/index.php?option=com_content&view=article&tmpl=component&print=1&mode=inline&task=findkey&lang=' . $language . '&keyref=';
break;
case 'xml':
break;
case 'sef':
break;
}
$key = array();
if ($section) {
$key[] = $section;
if ($category) {
$key[] = $category;
if ($article) {
$key[] = $article;
}
}
}
$options = array(
'url' => $url,
'key' => $key,
'pattern' => $method === "sef" ? $pattern : '',
);
$tabs = WFTabs::getInstance(array(
'base_path' => WF_EDITOR_PLUGIN,
));
// Add tabs
$tabs->addTab('help', 1, array('plugin' => $this));
$document = WFDocument::getInstance();
if ($document->get('standalone') == 1) {
$document->addScript(array('window.min'));
}
$document->addScript(array('help.min'), 'plugins');
$document->addStyleSheet(array('help.min'), 'plugins');
$document->addScriptDeclaration('jQuery(document).ready(function($){Wf.Help.init(' . json_encode($options) . ');});');
}
public function getLanguage()
{
$language = JFactory::getLanguage();
$tag = $language->getTag();
return substr($tag, 0, strpos($tag, '-'));
}
public function getTopics($file)
{
$result = '';
if (file_exists($file)) {
// load xml
$xml = simplexml_load_file($file);
if ($xml) {
foreach ($xml->help->children() as $topic) {
$subtopics = $topic->subtopic;
$class = count($subtopics) ? 'subtopics uk-parent' : '';
$key = (string) $topic->attributes()->key;
$title = (string) $topic->attributes()->title;
$file = (string) $topic->attributes()->file;
// if file attribute load file
if ($file) {
$result .= $this->getTopics(WF_EDITOR . '/' . $file);
} else {
$result .= '<li id="' . $key . '" class="' . $class . '"><a href="#"><span class="uk-icon uk-icon-copy uk-margin-small-right"></span>&nbsp;' . trim(JText::_($title)) . '</a>';
}
if (count($subtopics)) {
$result .= '<ul class="uk-nav uk-nav-side uk-list-space hidden">';
foreach ($subtopics as $subtopic) {
$sub_subtopics = $subtopic->subtopic;
// if a file is set load it as sub-subtopics
if ($file = (string) $subtopic->attributes()->file) {
$result .= '<li class="subtopics uk-parent"><a href="#"><span class="uk-icon uk-icon-file uk-margin-small-right"></span>&nbsp;' . trim(JText::_((string) $subtopic->attributes()->title)) . '</a>';
$result .= '<ul class="uk-nav uk-nav-side uk-list-space hidden">';
$result .= $this->getTopics(WF_EDITOR . '/' . $file);
$result .= '</ul>';
$result .= '</li>';
} else {
$id = $subtopic->attributes()->key ? ' id="' . (string) $subtopic->attributes()->key . '"' : '';
$class = count($sub_subtopics) ? ' class="subtopics uk-parent"' : '';
$icon = count($sub_subtopics) ? 'uk-icon-copy' : 'uk-icon-file';
$result .= '<li' . $class . $id . '><a href="#"><span class="uk-icon ' . $icon . ' uk-margin-small-right"></span>&nbsp;' . trim(JText::_((string) $subtopic->attributes()->title)) . '</a>';
if (count($sub_subtopics)) {
$result .= '<ul class="uk-nav uk-nav-side hidden">';
foreach ($sub_subtopics as $sub_subtopic) {
$result .= '<li id="' . (string) $sub_subtopic->attributes()->key . '"><a href="#"><span class="uk-icon uk-icon-file uk-margin-small-right"></span>&nbsp;' . trim(JText::_((string) $sub_subtopic->attributes()->title)) . '</a></li>';
}
$result .= '</ul>';
}
$result .= '</li>';
}
}
$result .= '</ul>';
}
}
}
}
return $result;
}
/**
* Returns a formatted list of help topics.
*
* @return string
*
* @since 1.5
*/
public function renderTopics()
{
$app = JFactory::getApplication();
$section = $app->input->getWord('section', 'admin');
$category = $app->input->getWord('category', 'cpanel');
$document = JFactory::getDocument();
$language = JFactory::getLanguage();
$language->load('com_jce', JPATH_SITE);
$language->load('com_jce_pro', JPATH_SITE);
$document->setTitle(JText::_('WF_HELP') . ' : ' . JText::_('WF_' . strtoupper($category) . '_TITLE'));
switch ($section) {
case 'admin':
$file = WF_ADMINISTRATOR . '/models/' . $category . '.xml';
break;
case 'editor':
$file = WF_EDITOR_PLUGINS . '/' . $category . '/' . $category . '.xml';
// check for installed plugin
$plugin = JPluginHelper::getPlugin('jce', 'editor-' . $category);
if ($plugin) {
$file = JPATH_PLUGINS . '/jce/editor-' . $category . '/editor-' . $category . '.xml';
$language->load('plg_jce_editor_' . $category, JPATH_ADMINISTRATOR);
}
if (!is_file($file)) {
$file = WF_EDITOR_LIBRARIES . '/xml/help/editor.xml';
} else {
$language->load('WF_' . $category, JPATH_SITE);
}
break;
}
$result = '';
$result .= '<ul class="uk-nav" id="help-menu"><li class="uk-nav-header">' . JText::_('WF_' . strtoupper($category) . '_TITLE') . '</li>';
$result .= $this->getTopics($file);
$result .= '</ul>';
return $result;
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
<name>WF_HELP_TITLE</name>
<version>2.9.32</version>
<creationDate>01-11-2022</creationDate>
<author>Ryan Demmer</author>
<authorEmail>info@joomlacontenteditor.net</authorEmail>
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
<copyright>Ryan Demmer</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<description>WF_HELP_DESC</description>
<icon>hr</icon>
<help></help>
<languages></languages>
</extension>

View File

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

View File

@@ -0,0 +1,2 @@
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($){Wf.Help={options:{url:"",key:[],pattern:""},init:function(options){var key,self=this;this.options=$.extend(this.options,options),$("#help-menu > li[id]").click(function(e){$("#help-menu").find("li").removeClass("loading").removeClass("active");var el=this;e.preventDefault(),"LI"!==e.target.nodeName&&(el=$(e.target).parents("li").first()),$(el).siblings().children("ul").addClass("hidden"),$(el).addClass("active").children("ul").removeClass("hidden"),!el.id&&$(el).hasClass("subtopics")&&(el=$(el).find("li[id]").first()),self.loadItem(el)}),$("#help-iframe").on("load",function(){$(".loading","#help-menu").removeClass("loading")}),key=this.options.key,key.length&&$("#"+key.join(".")).length?$("#"+key.join(".")).click():$("#help-menu > li[id]").first().click(),$("[data-toggle]").click(function(){$("nav").toggle(),self.resizeFrame()})},resizeFrame:function(){var s,self=this;$("#help-frame").parent().css("width",function(){return $("#help-menu-toggle div.toggle-handle").hasClass("collapsed")&&(s=$("#help-menu-toggle").outerWidth(!0)),$("div.row-fluid").width()-self.getMenuSize(s)-1})},getMenuSize:function(pos){return"undefined"==typeof pos&&(pos=$("#help-menu").parent().outerWidth()+14),pos},loadItem:function(el){var keys,pattern,s="";$(el).addClass("loading");var id=$(el).attr("id");this.options.pattern?(keys=id.split("."),pattern=this.options.pattern,s=pattern.replace(/\$([1-9])/g,function(a,b){var key=parseInt(b,10),key=Math.max(key-1,0);return keys[key]||""}),s="/"+s.replace(/^\//,"").replace(/\/$/,"")):s=id,$("#help-iframe").attr("src",this.options.url+s)}}}(jQuery);

View File

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

View File

@@ -0,0 +1,27 @@
<?php
/**
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* JCE 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
*/
defined('JPATH_PLATFORM') or die('RESTRICTED');
?>
<div class="ui-jce uk-flex">
<nav class="uk-panel uk-panel-box uk-height-1-1">
<?php echo $this->plugin->renderTopics(); ?>
</nav>
<main class="uk-panel uk-panel-box uk-height-1-1">
<header>
<a class="uk-button uk-button-link" data-toggle="collapse">
<span class="uk-icon uk-icon-list"></span>
</a>
</header>
<section>
<iframe id="help-iframe" src="javascript:;" scrolling="auto" frameborder="0"></iframe>
</section>
</main>
</div>

View File

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