/** * Display the plugin */ public function display() { parent::display(); $document = WFDocument::getInstance(); $document->addScript(array('mediamanager'), 'plugins'); $document->addStyleSheet(array('mediamanager'), 'plugins'); $settings = $this->getSettings(); $document->addScriptDeclaration('MediaManagerDialog.settings=' . json_encode($settings) . ';'); $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN)); // Add tabs $tabs->addTab('file', 1, array('plugin' => $this)); $tabs->addTab('media', $this->getParam('tabs_media', 1), array('plugin' => $this)); $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1)); // Load Popups instance $popups = WFPopupsExtension::getInstance(array( // map src value to popup link href 'map' => array('href' => 'src'), 'default' => $this->getParam('mediamanager.popups.default', '') )); $popups->display(); // Load Media Player instance $mediaplayer = $this->getMediaPlayer(); $mediaplayer->display(); // Load video aggregators (Youtube, Vimeo etc) $this->loadAggregators(); }
/** * Display the plugin */ public function display() { parent::display(); $document = WFDocument::getInstance(); $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN)); // Add tabs $tabs->addTab('file'); $tabs->addTab('advanced'); // Load Popups instance $popups = WFPopupsExtension::getInstance(array('text' => false, 'default' => $this->getParam('filemanager.popups.default', ''))); $popups->addTemplate('popup'); $popups->display(); $document->addScript(array('filemanager'), 'plugins'); $document->addStyleSheet(array('filemanager'), 'plugins'); $document->addScriptDeclaration('FileManager.settings=' . json_encode($this->getSettings()) . ';'); }
function display() { parent::display(); $document = WFDocument::getInstance(); $settings = $this->getSettings(); $document->addScriptDeclaration('LinkDialog.settings=' . json_encode($settings) . ';'); $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN)); // Add tabs $tabs->addTab('link', 1); $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1)); $browser = $this->getBrowser(); $browser->display(); // Load Popups instance $popups = WFPopupsExtension::getInstance(array('text' => false)); $popups->display(); // add link stylesheet $document->addStyleSheet(array('link'), 'plugins'); // add link scripts last $document->addScript(array('link'), 'plugins'); }
public function display() { parent::display(); $document = WFDocument::getInstance(); $settings = $this->getSettings(); $document->addScriptDeclaration('LinkDialog.settings=' . json_encode($settings) . ';'); $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN)); // Add tabs $tabs->addTab('link', 1, array('plugin' => $this)); $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1)); // get and display links $links = $this->getLinks(); $links->display(); // get and display search $search = $this->getSearch('link'); $search->display(); // Load Popups instance $popups = WFPopupsExtension::getInstance(array('text' => false, 'default' => $this->getParam('link.popups.default', ''))); $popups->display(); // add link stylesheet $document->addStyleSheet(array('link'), 'plugins'); // add link scripts last $document->addScript(array('link'), 'plugins'); }
/** * Display the plugin */ public function display() { $browser = $this->getBrowser(); $document = WFDocument::getInstance(); if (JRequest::getCmd('dialog', 'plugin') == 'plugin') { $browser->addAction('view_mode', '', 'switchMode', WFText::_('WF_IMGMANAGER_EXT_CHANGE_MODE')); if ($this->canEdit()) { $request = WFRequest::getInstance(); if ($this->getParam('imgmanager_ext.image_editor', 1)) { $browser->addButton('file', 'image_editor', array('action' => 'editImage', 'title' => WFText::_('WF_BUTTON_EDIT_IMAGE'), 'restrict' => 'jpg,jpeg,png')); } if ($this->getParam('imgmanager_ext.thumbnail_editor', 1)) { $browser->addButton('file', 'thumb_create', array('action' => 'createThumbnail', 'title' => WFText::_('WF_BUTTON_CREATE_THUMBNAIL'), 'trigger' => true)); $browser->addButton('file', 'thumb_delete', array('action' => 'deleteThumbnail', 'title' => WFText::_('WF_BUTTON_DELETE_THUMBNAIL'), 'trigger' => true)); } } if ($this->getParam('imgmanager_ext.insert_multiple', 1)) { $browser->addButton('file', 'insert_multiple', array('action' => 'selectMultiple', 'title' => WFText::_('WF_BUTTON_INSERT_MULTIPLE'), 'multiple' => true, 'single' => false)); } // get parent display data parent::display(); // create new tabs instance $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN)); // Add tabs $tabs->addTab('image'); $tabs->addTab('rollover', $this->getParam('tabs_rollover', 1)); $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1)); // Load Popups instance $popups = WFPopupsExtension::getInstance(array('map' => array('href' => 'popup_src'), 'text' => false, 'default' => $this->getParam('imgmanager_ext.popups.default', ''))); $popups->addTemplate('popup'); $popups->display(); $document->addScript(array('canvas', 'imgmanager'), 'plugins'); $document->addStyleSheet(array('imgmanager'), 'plugins'); // load settings $document->addScriptDeclaration('ImageManagerDialog.settings=' . json_encode($this->getSettings()) . ';'); } else { if ($this->getParam('imgmanager_ext.image_editor', 1) == 0) { JError::raiseError(403, WFText::_('RESTRICTED')); } // cleanup tmp files $this->cleanEditorTmp(); $view = $this->getView(); $view->setLayout('editor'); $view->addTemplatePath(WF_EDITOR_PLUGIN . '/tmpl'); $lists = array(); $lists['resize'] = $this->getPresetsList('resize'); $lists['crop'] = $this->getPresetsList('crop'); $view->assign('lists', $lists); $document->setTitle(WFText::_('WF_IMGMANAGER_EXT_TITLE') . '::' . WFText::_('WF_IMGMANAGER_EXT_EDITOR_TITLE')); $wf = new WFEditorPlugin(); // bypass parent and use plugin view $wf->display(); // get UI Theme $theme = $this->getParam('editor.dialog_theme', 'jce'); $document->addScript(array('canvas', 'editor'), 'plugins'); $document->addStyleSheet(array('editor.css'), 'plugins'); $document->addScriptDeclaration('tinyMCEPopup.onInit.add(EditorDialog.init, EditorDialog);'); } $document->addScript(array('transform'), 'plugins'); $document->addStyleSheet(array('transform'), 'plugins'); }
<?php /** * @version $Id: popups.php 221 2011-06-11 17:30:33Z happy_noodle_boy $ * @package JCE * @copyright Copyright (C) 2005 - 2009 Ryan Demmer. All rights reserved. * @author Ryan Demmer * @license GNU/GPL * 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('_JEXEC') or die('Restricted access'); $popups = WFPopupsExtension::getInstance(); ?> <h4><label for="popup_list" class="hastip" title="<?php echo WFText::_('WF_POPUP_TYPE_DESC'); ?> "><?php echo WFText::_('WF_POPUP_TYPE'); ?> </label><?php echo $popups->getPopupList(); ?> </h4> <table style="display:<?php echo $popups->get('text') === false ? 'none' : ''; ?> ;"> <tr>