20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
24 function encode($textarea_id)
26 $code =
"<img src='{$this->image_path}/mp3.gif' alt='" .
_XOOPS_FORM_ALTMP3 .
"' onclick='xoopsCodeMp3(\"{$textarea_id}\",\"" . htmlspecialchars(
_XOOPS_FORM_ENTERMP3URL, ENT_QUOTES) .
"\");' onmouseover='style.cursor=\"hand\"'/> ";
28 function xoopsCodeMp3(
id, enterMp3Phrase)
30 var selection = xoopsGetSelect(
id);
31 if (selection.length > 0) {
34 var text = prompt(enterMp3Phrase,
"");
36 var domobj = xoopsGetElementById(
id);
37 if ( text.length > 0 ) {
38 var result =
"[mp3]" + text +
"[/mp3]";
39 xoopsInsertText(domobj, result);
52 $ts->patterns[] =
"/\[mp3\](.*?)\[\/mp3\]/es";
53 $ts->replacements[] = __CLASS__ .
"::decode( '\\1' )";
60 $rp =
"<embed flashvars=\"playerID=1&bg=0xf8f8f8&leftbg=0x3786b3&lefticon=0x78bee3&rightbg=0x3786b3&rightbghover=0x78bee3&righticon=0x78bee3&righticonhover=0x3786b3&text=0x666666&slider=0x3786b3&track=0xcccccc&border=0x666666&loader=0x78bee3&loop=no&soundFile={$url}\" quality='high' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' src='" . XOOPS_URL .
"/images/form/player.swf' width=290 height=24 type='application/x-shockwave-flash'></embed>";