loadLanguage();
// create the menu item
$menuitem = new stdClass();
$menuitem->type = $this->type;
$menuitem->group = 'multimedia';
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/audio/assets/images/audio.svg';
return $menuitem;
}
/*
* Display the html code for the item to be used into the interface
*
* Return String the html code
*/
public function onPagebuilderckLoadItemContentAudio() {
$input = JFactory::getApplication()->input;
$id = $input->get('ckid', '', 'string');
// ckstyle and inner classes are needed to get the styles from the interface
?>
loadLanguage();
// load the interface for the options
$tpl = JPATH_SITE . '/plugins/pagebuilderck/audio/layouts/edit_audio.php';
return $tpl;
}
/*
* Display the html code for the item to be used into the frontend page
* @param string the item object from simple_html_dom
*
* Return String the html code
*/
public function onPagebuilderckRenderItemAudio($item) {
$attrs = $item->find('.tab_audio');
$params = PagebuilderckFrontHelper::createParamsFromElement($attrs);
$audiosrc = PagebuilderckFrontHelper::getSource($params->get('audiourl'));
$html ='';
$html = preg_replace('#