Private
Server IP : 195.201.23.43  /  Your IP : 3.143.169.173
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/kdecoratie/public_html/plugins/editors-xtd/admirorbutton/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/kdecoratie/public_html/plugins/editors-xtd/admirorbutton/admirorbutton.php
<?php

/* ------------------------------------------------------------------------
  # admirorbutton - Admiror Gallery Plugin
  # ------------------------------------------------------------------------
  # author   Igor Kekeljevic & Nikola Vasiljevski
  # copyright Copyright (C) 2014 admiror-design-studio.com. All Rights Reserved.
  # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
  # Websites: http://www.admiror-design-studio.com/joomla-extensions
  # Technical Support:  Forum - http://www.vasiljevski.com/forum/index.php
  # Version: 5.0.0
  ------------------------------------------------------------------------- */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * Editor Image buton
 *
 * @package Editors-xtd
 * @since 1.5
 */
class plgButtonAdmirorbutton extends JPlugin {
    protected $autoloadLanguage = true;
    /**
     * Constructor
     *
     * For php4 compatability we must not use the __constructor as a constructor for plugins
     * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
     * This causes problems with cross-referencing necessary for the observer design pattern.
     *
     * @param 	object $subject The object to observe
     * @param 	array  $config  An array that holds the plugin configuration
     * @since 1.5
     */
    public function __construct(& $subject, $config) {
        parent::__construct($subject, $config);
        $this->loadLanguage('com_admirorgallery');
        $this->loadLanguage('plg_editors-xtd_admirorbutton');   
    }

    /**
     * Display the button
     * @name 
     */
    function onDisplay($name) {
        $doc = JFactory::getDocument();
        $doc->addStyleSheet(JURI::root() . 'administrator/components/com_admirorgallery/templates/default/css/add-trigger.css');
        $doc->addScriptDeclaration("            
		function insertTriggerCode(txt) {
		    if(!txt) return;
		    jInsertEditorText(txt, '" . $name . "');
		}
		");

        $link = 'index.php?option=com_admirorgallery&amp;view=button&amp;tmpl=component&amp;e_name=' . $name;

        JHTML::_('behavior.modal');

        $button = new JObject();
        $button->set('class','btn');
        $button->set('modal', true); // modal dialog
        $button->set('link', $link); //link to open on click
        $button->set('text', JText::_('COM_ADMIRORGALLERY')); //button text
        $button->set('name', 'admirorgallery'); //div class
        $button->set('options', "{handler: 'iframe', size: {x: 400, y: 300}}"); //need to work

        return $button;
    }
}

Private