https://www.icyphoenix.com/viewtopic.php?f=35&t=597&p=4875#p4875 ----------------------------------- Zuker Sat 18 Nov, 2006 18:51 Re: Google/Youtube Video In BBCode ----------------------------------- For Google Video It's based on bbcode [code linenumbers=false][googlevideo][/googlevideo][/code] [code] # #-----[ UPLOAD ]------------------------------------------ # googlevideo.gif to images/bbcb_mg/images/gif/ # #-----[ OPEN ]------------------------------------------ # templates/ca_aphrotite/bbcb_mg.tpl # #-----[ FIND ]------------------------------------------ # Quicktime # #-----[AFTER, ADD]------------------------------------------ # Google Video # #-----[ OPEN ]------------------------------------------ # language/lang_english/bbcb_mg.js # #-----[ FIND ]------------------------------------------ # s_img_error = 'You didn't write the image URL'; # #-----[ AFTER, ADD]------------------------------------------ # s_googlevideo_insert = 'Enter the Google video code'; s_googlevideo_error = 'You didn't write the Google video code'; # #-----[ FIND ]------------------------------------------ # s_image_upload_help = 'Upload image to PostImage.org and add to message'; # #-----[ AFTER, ADD]------------------------------------------ # s_google_help = 'Insert a Google video'; # #-----[ FIND ]------------------------------------------ # '[quote]','[/quote]', # #-----[ AFTER, ADD]------------------------------------------ # '[googlevideo]','[/googlevideo]', # #-----[ FIND ]------------------------------------------ # var Code = 0; # #-----[ AFTER, ADD]------------------------------------------ # var googlevideo = 0; # #-----[ FIND ]------------------------------------------ # function BBCcode() { var txtarea = document.post.message; if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (theSelection != '') { document.selection.createRange().text = "[code linenumbers=false]" + theSelection + "[/code]"; document.post.message.focus(); return; } } else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) { mozInsert(txtarea, "[code linenumbers=false]", "[/code]"); return; } if (Code == 0) { ToAdd = "[code linenumbers=false]"; document.post.code.src = bbcb_mg_img_path + "code1" + bbcb_mg_img_ext; Code = 1; } else { ToAdd = "[/code]"; document.post.code.src = bbcb_mg_img_path + "code" + bbcb_mg_img_ext; Code = 0; } PostWrite(ToAdd); } # #-----[ BEFORE, ADD]------------------------------------------ # function BBCgooglevideo() { var FoundErrors = ''; var enterURL = prompt(s_googlevideo_insert, s_url_insert_tip); if (!enterURL) { FoundErrors += s_googlevideo_error; } if (FoundErrors) { alert(s_gen_error + FoundErrors); return; } var ToAdd = "[googlevideo]"+enterURL+"[/googlevideo]"; PostWrite(ToAdd); }[/code]