/** * shows the data formatted for the table view * @param string data * @param object all the data in the tables current row * @return string formatted value */ function _renderTableData($data, $oAllRowsData) { $document =& JFactory::getDocument(); $params =& $this->getParams(); $str = $data; if ($params->get('fbVideoShowVideoInTable') == true) { if ($data != '') { $data = COM_FABRIK_LIVESITE . str_replace("\\", "/", $data); $url = COM_FABRIK_LIVESITE . "index.php?option=com_fabrik&tmpl=component&controller=plugin&task=pluginAjax&plugin=" . $this->_name . "&method=renderPopup&element_id=" . $this->_id . "&data={$data}"; FabrikHelperHTML::modal('a.popupwin'); $w = $params->get('fbVideoWidth', 300) + 20; $h = $params->get('fbVideoHeight', '300') + 50; $src = COM_FABRIK_LIVESITE . 'components/com_fabrik/plugins/element/' . $this->_name . '/icon.gif'; $data = '<a rel="{\'moveable\':true,useOverlay:false,handler: \'iframe\', size: {x: ' . $w . ', y: ' . $h . '}}" href="' . $url . '" class="popupwin"><img src="' . $src . '"alt="' . JText::_('View') . '" /></a>'; } } return $data; }
/** * Load the slimbox / media box css and js files * * @return void */ public static function slimbox() { $input = JFactory::getApplication()->input; if ($input->get('format') === 'raw') { return; } if (!self::$modal) { $fbConfig = JComponentHelper::getParams('com_fabrik'); if ($fbConfig->get('include_lightbox_js', 1) == 0) { return; } if ($fbConfig->get('use_mediabox', false)) { $folder = 'components/com_fabrik/libs/mediabox-advanced/'; $mbStyle = $fbConfig->get('mediabox_style', 'Dark'); JHTML::stylesheet($folder . 'mediabox-' . $mbStyle . '.css'); self::script($folder . 'mediaboxAdv.js'); } else { if (FabrikWorker::j3()) { JHTML::stylesheet('components/com_fabrik/libs/slimbox2/css/slimbox2.css'); self::script('components/com_fabrik/libs/slimbox2/js/slimbox2.js'); } else { JHTML::stylesheet('components/com_fabrik/libs/slimbox1.64/css/slimbox.css'); self::script('components/com_fabrik/libs/slimbox1.64/js/slimbox.js'); } } self::$modal = true; } }
/** * Load the slimbox / media box css and js files * * @return void */ public static function slimbox() { if (!self::$modal) { $fbConfig = JComponentHelper::getParams('com_fabrik'); if ($fbConfig->get('include_lightbox_js', 1) == 0) { return; } if ($fbConfig->get('use_mediabox', false)) { $folder = 'components/com_fabrik/libs/mediabox/'; JHTML::stylesheet($folder . '/css/mediabox.css'); self::script($folder . 'mediabox.js'); } else { JHTML::stylesheet('components/com_fabrik/libs/slimbox1.64/css/slimbox.css'); self::script('components/com_fabrik/libs/slimbox1.64/js/slimbox.js'); } self::$modal = true; } }
function _displayButtons($name, $buttons) { // Load modal popup behavior //JHTML::_('behavior.modal', 'a.modal-button'); FabrikHelperHTML::modal('behavior.modal', 'a.modal-button'); $args['name'] = $name; $args['event'] = 'onGetInsertMethod'; $return = ''; $results[] = $this->update($args); foreach ($results as $result) { if (is_string($result) && trim($result)) { $return .= $result; } } if (!empty($buttons)) { $results = $this->_subject->getButtons($name, $buttons); /* * This will allow plugins to attach buttons or change the behavior on the fly using AJAX */ $return .= "\n<div id=\"editor-xtd-buttons\">\n"; foreach ($results as $button) { /* * Results should be an object */ if ($button->get('name')) { $modal = $button->get('modal') ? 'class="modal-button"' : null; $href = $button->get('link') ? 'href="' . JURI::base() . $button->get('link') . '"' : null; $onclick = $button->get('onclick') ? 'onclick="' . $button->get('onclick') . '"' : null; $return .= "<div class=\"button2-left\"><div class=\"" . $button->get('name') . "\"><a " . $modal . " title=\"" . $button->get('text') . "\" " . $href . " " . $onclick . " rel=\"" . $button->get('options') . "\">" . $button->get('text') . "</a></div></div>\n"; } } $return .= "</div>\n"; } return $return; }