AAAAloadLanguage('com_admirorgallery'); } /** * 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&view=button&tmpl=component&e_name=' . $name; JHTML::_('behavior.modal'); $button = new JObject(); $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; } }