Dear all.
I wants create a plugins in K2 to get link of Jdownloads base on Example plugin K2 and jDownloads Content Plugin.
My plugins includes:
1. example.xml2. k2itemoptions.php in plugins/k2/example/elementsMy problem:
Please help me to solve my problem
Thanks
I wants create a plugins in K2 to get link of Jdownloads base on Example plugin K2 and jDownloads Content Plugin.
My plugins includes:
1. example.xml
<params group="item-content" addpath="/plugins/k2/example/elements">
<param name="k2itemoptions" type="k2itemoptions" default="k2itemoptions" label="Abc" description="" /> class K2Elementk2itemoptions extends K2Element
{
var $name = 'k2itemoptions';
public function fetchElement($name, $value, &$node, $control_name)
{
$mainframe = JFactory::getApplication();
$db = JFactory::getDBO();
$doc = JFactory::getDocument();
$fieldName = $control_name.'['.$name.']';
$link = 'index.php?option=com_jdownloads&task=editor.insert.file&tmpl=component&e_name=text';
JHTML::_('behavior.modal', 'a.modal');
$html ='';
$test = '<label id="pluginsexampleJdemo_item-lbl" for="pluginsexampleJdemo_item">Liên k?t d? xem demo</label><div style="float:left;">'.
'<input style="background:#fff;margin:3px 0;" type="text" id="k2itemoptions_name" value="Thunghiem" disabled="disabled" />'.
'</div><div class="button2-left"><div class="blank">'.
'<a class="modal-button btn" title="Chon mot duong dan" href="index.php?option=com_jdownloads&task=editor.insert.file&tmpl=component&e_name=text" onclick="IeCursorFix(); return false;" rel="{handler: \'iframe\', size: {x: 670, y: 570}}"><i class="icon-jdownloads"></i> Insert download</a>'.
'</div></div><input type="hidden" id="k2itemoptions_id" name="'.$fieldName.'" value="'.( int )$value.'" />';
$html .= $test;
echo $html;
return $html;
}
public function fetchTooltip($label, $description, &$node, $control_name, $name)
{
return NULL;
}
}Attachment not found
Please help me to solve my problem
Thanks