https://www.icyphoenix.com/viewtopic.php?f=35&t=597 ----------------------------------- babbman Sat 18 Nov, 2006 14:51 Google/Youtube Video In BBCode ----------------------------------- I've got these tags working properly, but I wold like to get icons for them in the reply window. Can anyone give me some pointers on what needs to be edited in order to get them to show up there? ----------------------------------- Zuker Sat 18 Nov, 2006 17:16 Re: Google/Youtube Video In BBCode ----------------------------------- [code] # #-----[ UPLOAD ]------------------------------------------ # youtube.gif to images/bbcb_mg/images/gif/ # #-----[ OPEN ]------------------------------------------ # templates/ca_aphrotite/bbcb_mg.tpl # #-----[ FIND ]------------------------------------------ # Quicktime # #-----[AFTER, ADD]------------------------------------------ # Youtube # #-----[ OPEN ]------------------------------------------ # language/lang_english/bbcb_mg.js # #-----[ FIND ]------------------------------------------ # s_img_error = 'You didn't write the image URL'; # #-----[ AFTER, ADD]------------------------------------------ # s_youtube_insert = 'Enter the Youtube video code'; s_youtube_error = 'You didn't write the Youtube video code'; # #-----[ FIND ]------------------------------------------ # s_image_upload_help = 'Upload image to PostImage.org and add to message'; # #-----[ AFTER, ADD]------------------------------------------ # s_youtube_help = 'Insert a Youtube video'; # #-----[ FIND ]------------------------------------------ # '[quote]','[/quote]', # #-----[ AFTER, ADD]------------------------------------------ # '[youtube]','[/youtube]', # #-----[ FIND ]------------------------------------------ # var Code = 0; # #-----[ AFTER, ADD]------------------------------------------ # var youtube = 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 BBCyoutube() { var FoundErrors = ''; var enterURL = prompt(s_youtube_insert, s_url_insert_tip); if (!enterURL) { FoundErrors += s_youtube_error; } if (FoundErrors) { alert(s_gen_error + FoundErrors); return; } var ToAdd = "[youtube]"+enterURL+"[/youtube]"; PostWrite(ToAdd); }[/code] ----------------------------------- difus Sat 18 Nov, 2006 17:27 Re: Google/Youtube Video In BBCode ----------------------------------- yep thanks Zuker ! :wink: ----------------------------------- Zuker Sat 18 Nov, 2006 17:54 Re: Google/Youtube Video In BBCode ----------------------------------- That's for youtube ;) For google video i didn't make anything ----------------------------------- 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] ----------------------------------- babbman Sat 18 Nov, 2006 20:35 Re: Google/Youtube Video In BBCode ----------------------------------- wow, you guys are great... and fast! I'll get this in.. Thanks much! C ----------------------------------- Zuker Sat 18 Nov, 2006 22:04 Re: Google/Youtube Video In BBCode ----------------------------------- the Google video it's not fully tested, any problem report it please ;) ----------------------------------- Zuker Sun 19 Nov, 2006 14:33 Re: Google/Youtube Video In BBCode ----------------------------------- Another image for google video bbcode :mrgreen: ----------------------------------- Mighty Gorgon Sun 19 Nov, 2006 21:26 Re: Google/Youtube Video In BBCode ----------------------------------- Nice work Zuker... I hope to find some free time to fix all new BBCodes in the package. :wink: ----------------------------------- Gianni PB Tue 09 Jan, 2007 04:31 Re: SOLVED -Google/Youtube Video In BBCode ----------------------------------- Is there a way to delete "http://" when it asks for youtube or googlevideo code? It's a code, not an URL... thanks! 8)