Your IP : 216.73.216.141


Current Path : /proc/thread-self/root/proc/thread-self/root/proc/1908984/root/proc/1147586/cwd/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/proc/1908984/root/proc/1147586/cwd/browser.tar

css/browser.min.css000064400000000260152355237010010314 0ustar00.ui-browser{left:0;right:0}.ui-modal-footer{border:1px solid #ddd}.ui-inline-help .ui-modal-dialog{top:0;height:100%}.ui-inline-help iframe{height:calc(100% - 41px);width:100%}css/index.html000064400000000054152355237010007333 0ustar00<html><body bgcolor="#FFFFFF"></body></html>js/browser.js000064400000002477152355237010007216 0ustar00/* jce - 2.9.21 | 2022-03-30 | 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($){function init(){$("#insert").on("click",function(e){e.preventDefault(),insert()}),$("#cancel").on("click",function(e){e.preventDefault(),tinyMCEPopup.close()});var ed=tinyMCEPopup.editor,src=tinyMCEPopup.getWindowArg("value");Wf.init(),/(:\/\/|www|index.php(.*)\?option)/gi.test(src)&&(src=""),src&&(src=ed.convertURL(src),$(".uk-button-text","#insert").text(tinyMCEPopup.getLang("update","Update",!0))),$("[data-filebrowser]").val(src).filebrowser().on("filebrowser:onfileclick",function(e,file,data){selectFile(data)})}function insert(){var win=tinyMCEPopup.getWindowArg("window"),callback=tinyMCEPopup.getWindowArg("callback");return callback?void $("[data-filebrowser]").trigger("filebrowser:insert",function(selected,data){data.length||(data=[{title:"",url:""}]),"string"==typeof callback&&(selectFile(data[0]),win.document.getElementById(callback).value=$("[data-filebrowser]").val()),"function"==typeof callback&&callback(selected,data),tinyMCEPopup.close()}):tinyMCEPopup.close()}function selectFile(file){var src=file.url||"";src=src.replace(/^\//,""),$("[data-filebrowser]").val(src)}$(document).ready(init)}(jQuery);js/index.html000064400000000054152355237010007157 0ustar00<html><body bgcolor="#FFFFFF"></body></html>js/popup.min.js000064400000001675152355237010007457 0ustar00/* jce - 2.9.21 | 2022-03-30 | 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 */
var tinyMCE=window.tinymce||window.parent.tinymce,tinyMCEPopup={getParam:function(n,dv){return this.editor.getParam(n,dv)},getLang:function(n,dv){return this.editor.getLang(n,dv)},getWindowArg:function(n,dv){var v=this.editor.windowManager.params[n];return"undefined"!=typeof v?v:dv},close:function(){return this.editor.windowManager.close()}};tinyMCEPopup.editor=tinyMCE,jQuery(document).ready(function($){var el,win=window.parent,s=tinyMCEPopup.editor.settings;if(s.element&&(el=win.document.getElementById(s.element),el&&(tinyMCEPopup.editor.windowManager.params.value=el.value)),s.callback){var fn=win[s.callback];"function"==typeof fn&&(tinyMCEPopup.editor.windowManager.params.callback=fn)}el||s.callback||s.element||$("#cancel, #insert").hide()});browser.php000064400000011714152355237010006747 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2021 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;

require_once WF_EDITOR_LIBRARIES . '/classes/manager.php';

class WFBrowserPlugin extends WFMediaManager
{
    /*
     * @var string
     */
    protected $_filetypes = 'doc,docx,dot,dotx,ppt,pps,pptx,ppsx,xls,xlsx,gif,jpeg,jpg,png,webp,apng,avif,pdf,zip,tar,gz,swf,rar,mov,mp4,m4a,flv,mkv,webm,ogg,ogv,qt,wmv,asx,asf,avi,wav,mp3,aiff,oga,odt,odg,odp,ods,odf,rtf,txt,csv';

    public function __construct($config = array())
    {
        $app = JFactory::getApplication();

        $config = array(
            'layout' => 'browser',
            'can_edit_images' => 1,
            'show_view_mode' => 1,
        );

        parent::__construct($config);

        // get mediatype from xml
        $mediatype = $app->input->getString('mediatype', $app->input->getString('filter', 'files'));

        if ($mediatype) {
            // clean and lowercase filter value
            $mediatype = (string) preg_replace('/[^\w_,]/i', '', strtolower($mediatype));

            // get filetypes from params
            $filetypes = $this->getParam('browser.extensions', $this->get('_filetypes'));

            // get file browser reference
            $browser = $this->getFileBrowser();

            // add upload event
            $browser->addEvent('onUpload', array($this, 'onUpload'));

            // map to comma seperated list
            $filetypes = $browser->getFileTypes('list', $filetypes);

            $map = array(
                'images' => 'jpg,jpeg,png,apng,gif,webp,avif',
                'media' => 'avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mpeg,m4a,m4v,swf,dcr,rm,ra,ram,divx,mp4,ogv,ogg,webm,flv,f4v,mp3,ogg,wav,xap',
                'files' => $filetypes,
            );

            // add svg support to images if it is allowed in filetypes
            if (in_array('svg', explode(',', $filetypes))) {
                $map['images'] .= ',svg';
            }

            if (array_key_exists($mediatype, $map)) {
                $filetypes = $map[$mediatype];
            } else {
                $filetypes = $mediatype;
            }

            // set updated filetypes
            $browser->setFileTypes($filetypes);

            $properties = array();

            // get existing upload values
            $upload = $browser->get('upload', array());
            $upload['filetypes'] = $filetypes;

            // update upload filetypes
            $properties['upload'] = $upload;

            $browser->setProperties($properties);
        }
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $app = JFactory::getApplication();

        $document = WFDocument::getInstance();
        $slot = $app->input->getCmd('slot', 'plugin');

        // update some document variables
        $document->setName('browser');
        $document->setTitle(JText::_('WF_BROWSER_TITLE'));

        if ($document->get('standalone') == 1) {
            if ($slot === 'plugin') {
                $document->addScript(array('window.min'));

                $callback = $app->input->getCmd('callback', '');
                $element = $app->input->getCmd('fieldid', 'field-media-id');

                // Joomla 4 field variable not converted
                if ($element == 'field-media-id') {
                    $element = $app->input->getCmd('element', '');
                }

                $settings = array(
                    'site_url' => JURI::base(true) . '/',
                    'document_base_url' => JURI::root(),
                    'language' => WFLanguage::getCode(),
                    'element' => $element,
                    'token' => JSession::getFormToken(),
                );

                if ($callback) {
                    $settings['callback'] = $callback;
                }

                $document->addScriptDeclaration('tinymce.settings=' . json_encode($settings) . ';');
            }

            $document->addScript(array('popup.min'), 'plugins');
            $document->addStyleSheet(array('browser.min'), 'plugins');
        }

        if ($slot === 'plugin') {
            $document->addScript(array('browser'), 'plugins');
        }
    }

    public function onUpload($file, $relative = '')
    {
        parent::onUpload($file, $relative);

        $app = JFactory::getApplication();

        // inline upload
        if ($app->input->getInt('inline', 0) === 1) {
            $result = array(
                'file' => $relative,
                'name' => basename($file),
            );

            return $result;
        }

        return array();
    }
}
browser.xml000064400000011712152355237010006756 0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_BROWSER_TITLE</name>
    <version>2.9.21</version>
    <creationDate>30-03-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_BROWSER_DESC</description>
    <icon></icon>
    <files></files>
    <fields name="browser">
        <fieldset name="config">
            <field name="dir" type="text" default="" size="50" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
            <field name="max_size" class="input-small" hint="1024" max="" type="uploadmaxsize" step="128" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" placeholder="" />
            <field name="extensions" type="extension" default="doc,docx,dot,dotx,ppt,pps,pptx,ppsx,xls,xlsx,gif,jpeg,jpg,png,apng,webp,avif,pdf,zip,tar,gz,swf,rar,mov,mp4,m4a,flv,mkv,webm,ogg,ogv,qt,wmv,asx,asf,avi,wav,mp3,aiff,oga,odt,odg,odp,ods,odf,rtf,txt,csv" label="WF_PARAM_EXTENSIONS" description="WF_PARAM_EXTENSIONS_DESC" />
            <field name="filesystem" type="filesystem" default="" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC">
                <option value="">WF_OPTION_INHERIT</option>
            </field>

            <field type="heading" label="WF_PROFILES_PLUGINS_ACCESS" />
            
            <field name="upload" type="yesno" default="1" label="WF_PARAM_UPLOAD" description="WF_PARAM_UPLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_new" type="yesno" default="1" label="WF_PARAM_FOLDER_CREATE" description="WF_PARAM_FOLDER_CREATE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_delete" type="yesno" default="1" label="WF_PARAM_FOLDER_DELETE" description="WF_PARAM_FOLDER_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_rename" type="yesno" default="1" label="WF_PARAM_FOLDER_RENAME" description="WF_PARAM_FOLDER_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_move" type="yesno" default="1" label="WF_PARAM_FOLDER_PASTE" description="WF_PARAM_FOLDER_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_delete" type="yesno" default="1" label="WF_PARAM_FILE_DELETE" description="WF_PARAM_FILE_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_rename" type="yesno" default="1" label="WF_PARAM_FILE_RENAME" description="WF_PARAM_FILE_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_move" type="yesno" default="1" label="WF_PARAM_FILE_PASTE" description="WF_PARAM_FILE_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="container" pro="true">
                <field name="image_editor" type="yesno" default="1" label="WF_MANAGER_IMAGE_EDITOR" description="WF_MANAGER_IMAGE_EDITOR_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>

                <field name="text_editor" type="yesno" default="0" label="WF_MANAGER_TEXT_EDITOR" description="WF_MANAGER_TEXT_EDITOR_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
            </field>

            <field type="heading" label="WF_BROWSER_MEDIAFIELD_OPTIONS" />

            <field name="mediafield_conversion" type="yesno" default="1" label="WF_BROWSER_MEDIAFIELD_CONVERSION" description="WF_BROWSER_MEDIAFIELD_CONVERSION_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="mediafield_upload" type="yesno" default="1" label="WF_BROWSER_MEDIAFIELD_UPLOAD" description="WF_BROWSER_MEDIAFIELD_UPLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <languages></languages>
    <help>
        <topic key="browser.about" title="WF_BROWSER_HELP_ABOUT" />
        <topic file="libraries/xml/help/manager.xml" />
    </help>
</extension>
config.php000064400000001107152355237010006524 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2021 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
 */
class WFBrowserPluginConfig
{
    public static function getConfig(&$settings)
    {
        $settings['file_browser_callback'] = '';
    }
}
editor_plugin.js000064400000001364152355237010007755 0ustar00/* jce - 2.9.21 | 2022-03-30 | 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.Browser",{init:function(ed,url){var self=this;self.ed=ed,ed.addCommand("mceFileBrowser",function(ui,args,win){self.open(args,win)})},open:function(args,win){args=args||{};var ed=this.ed;return ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&task=plugin.display&plugin=browser"+(args.caller?"."+args.caller:"")+(args.filter?"&filter="+args.filter:""),close_previous:"no",size:"mce-modal-landscape-full"},args),!1}}),tinymce.PluginManager.add("browser",tinymce.plugins.Browser)}();index.html000064400000000054152355237010006543 0ustar00<html><body bgcolor="#FFFFFF"></body></html>