
01-07-2007, 11:42 PM
|
|
|
Join Date: Apr 2006
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Mr Chad
ok if that JS code doesnt work for you use this (this one is the basic one):
Code:
/**
* Insert Video Link
*/
this.createvideolink = function(e, url)
{
var my_colors=prompt("MySpace or YouTube or Google video URL","");
if ((my_colors=="") || (my_colors==null))
{
alert("Please Enter The Full URL!");
}
else
{
if (my_colors.match("www.youtube.com"))
{
var col_array=my_colors.split("?v=");
var part_num=1;
return this.insert_text("[youtube]" + col_array[part_num] + "[/youtube]");
}
else if (my_colors.match("myspace.com"))
{
if (my_colors.match("videoID="))
{
var col_array=my_colors.split("videoID=");
}
else
{
var col_array=my_colors.split("videoid=");
}
var part_num=1;
return this.insert_text("[myspace]" + col_array[part_num] + "[/myspace]");
}
else if (my_colors.match("video.google.com"))
{
var col_array=my_colors.split("docid=");
var part_num=1;
return this.insert_text("[googlevideo]" + col_array[part_num] + "[/googlevideo]");
}
else
{
alert("Please Enter The Full URL!");
}
}
};
add that code above these two spots:
Code:
/**
* Insert Link
*/
Code:
/**
* Insert Image
*
* @param event Event object
* @param string (Optional) Image URL
*
* @return boolean
*/
|
this worked
|