34 function xoopsCodeWmp(
id, enterWmpPhrase, enterWmpHeightPhrase, enterWmpWidthPhrase) {
35 var selection = xoopsGetSelect(
id);
36 if (selection.length > 0) {
39 var text = prompt(enterWmpPhrase,
"");
41 var domobj = xoopsGetElementById(
id);
42 if ( text.length > 0 ) {
43 var text2 = prompt(enterWmpWidthPhrase,
"480");
44 var text3 = prompt(enterWmpHeightPhrase,
"330");
45 var result =
"[wmp="+text2+
","+text3+
"]" + text +
"[/wmp]";
46 xoopsInsertText(domobj, result);
62 $ts->patterns[] =
"/\[wmp=(['\"]?)([^\"']*),([^\"']*)\\1]([^\"]*)\[\/wmp\]/sU";
63 $rp =
"<object classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" id=\"WindowsMediaPlayer\" width=\"\\2\" height=\"\\3\">\n";
64 $rp .=
"<param name=\"URL\" value=\"\\4\">\n";
65 $rp .=
"<param name=\"AutoStart\" value=\"0\">\n";
66 $rp .=
"<embed autostart=\"0\" src=\"\\4\" type=\"video/x-ms-wmv\" width=\"\\2\" height=\"\\3\" controls=\"ImageWindow\" console=\"cons\"> </embed>";
68 $ts->replacements[] = $rp;
load(MyTextSanitizer &$ts)