Google/Youtube Video In BBCode »  Show posts from    to     

Icy Phoenix


Old Support Topics - Google/Youtube Video In BBCode



babbman [ Sat 18 Nov, 2006 14:51 ]
Post subject: 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 ]
Post subject: Re: Google/Youtube Video In BBCode
Code: [Hide]
  1.  
  2. #  
  3. #-----[ UPLOAD ]------------------------------------------  
  4. #  
  5.  
  6. youtube.gif to images/bbcb_mg/images/gif/  
  7.  
  8. #  
  9. #-----[ OPEN ]------------------------------------------  
  10. #  
  11.  
  12. templates/ca_aphrotite/bbcb_mg.tpl  
  13.  
  14. #  
  15. #-----[ FIND ]------------------------------------------  
  16. #  
  17.  
  18. <a href="javascript:BBCquick()"><img border="0" src="{BBCB_MG_IMG_PATH}quick{BBCB_MG_IMG_EXT}" name="quick" type="image" onMouseOver="helpline('quick')" alt="Quicktime" title="Quicktime" class="bbimages" /></a>  
  19.  
  20. #  
  21. #-----[AFTER, ADD]------------------------------------------  
  22. #  
  23.  
  24. <a href="javascript:BBCyoutube()" accesskey="p"><img border="0" src="{BBCB_MG_IMG_PATH}youtube{BBCB_MG_IMG_EXT}" name="img" type="image" onMouseOver="helpline('youtube')" alt="Youtube" title="youtube" class="bbimages" /></a>  
  25.  
  26. #  
  27. #-----[ OPEN ]------------------------------------------  
  28. #  
  29.  
  30. language/lang_english/bbcb_mg.js  
  31.  
  32. #  
  33. #-----[ FIND ]------------------------------------------  
  34. #  
  35.  
  36. s_img_error = 'You didn't write the image URL';  
  37.  
  38. #  
  39. #-----[ AFTER, ADD]------------------------------------------  
  40. #  
  41.  
  42. s_youtube_insert = 'Enter the Youtube video code';  
  43. s_youtube_error = 'You didn't write the Youtube video code';  
  44.  
  45. #  
  46. #-----[ FIND ]------------------------------------------  
  47. #  
  48.  
  49. s_image_upload_help = 'Upload image to PostImage.org and add to message';  
  50.  
  51. #  
  52. #-----[ AFTER, ADD]------------------------------------------  
  53. #  
  54.  
  55. s_youtube_help = 'Insert a Youtube video';  
  56.  
  57. #  
  58. #-----[ FIND ]------------------------------------------  
  59. #  
  60.  
  61. '[quote]','[/quote]',  
  62.  
  63. #  
  64. #-----[ AFTER, ADD]------------------------------------------  
  65. #  
  66.  
  67. '[youtube]','[/youtube]',  
  68.  
  69. #  
  70. #-----[ FIND ]------------------------------------------  
  71. #  
  72.  
  73. var Code = 0;  
  74.  
  75. #  
  76. #-----[ AFTER, ADD]------------------------------------------  
  77. #  
  78.  
  79. var youtube = 0;  
  80.  
  81. #  
  82. #-----[ FIND ]------------------------------------------  
  83. #  
  84.  
  85. function BBCcode()  
  86. {  
  87. var txtarea = document.post.message;  
  88.  
  89. if ((clientVer >= 4) && is_ie && is_win)  
  90. {  
  91. theSelection = document.selection.createRange().text;  
  92. if (theSelection != '')  
  93. {  
  94. document.selection.createRange().text = "[code linenumbers=false]" + theSelection + "[/code]";  
  95. document.post.message.focus();  
  96. return;  
  97. }  
  98. }  
  99. else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))  
  100. {  
  101. mozInsert(txtarea, "[code linenumbers=false]", "[/code]");  
  102. return;  
  103. }  
  104. if (Code == 0)  
  105. {  
  106. ToAdd = "[code linenumbers=false]";  
  107. document.post.code.src = bbcb_mg_img_path + "code1" + bbcb_mg_img_ext;  
  108. Code = 1;  
  109. }  
  110. else  
  111. {  
  112. ToAdd = "[/code]";  
  113. document.post.code.src = bbcb_mg_img_path + "code" + bbcb_mg_img_ext;  
  114. Code = 0;  
  115. }  
  116. PostWrite(ToAdd);  
  117. }  
  118.  
  119. #  
  120. #-----[ BEFORE, ADD]------------------------------------------  
  121. #  
  122.  
  123. function BBCyoutube()  
  124. {  
  125. var FoundErrors = '';  
  126. var enterURL = prompt(s_youtube_insert, s_url_insert_tip);  
  127. if (!enterURL)  
  128. {  
  129. FoundErrors += s_youtube_error;  
  130. }  
  131. if (FoundErrors)  
  132. {  
  133. alert(s_gen_error + FoundErrors);  
  134. return;  
  135. }  
  136. var ToAdd = "[youtube]"+enterURL+"[/youtube]";  
  137. PostWrite(ToAdd);  


difus [ Sat 18 Nov, 2006 17:27 ]
Post subject: Re: Google/Youtube Video In BBCode
yep

thanks Zuker ! :wink:


Zuker [ Sat 18 Nov, 2006 17:54 ]
Post subject: 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 ]
Post subject: Re: Google/Youtube Video In BBCode
For Google Video

It's based on bbcode
Code: [Hide] [Select]
[googlevideo][/googlevideo]


Code: [Hide]
  1. #  
  2. #-----[ UPLOAD ]------------------------------------------  
  3. #  
  4.  
  5. googlevideo.gif to images/bbcb_mg/images/gif/  
  6.  
  7. #  
  8. #-----[ OPEN ]------------------------------------------  
  9. #  
  10.  
  11. templates/ca_aphrotite/bbcb_mg.tpl  
  12.  
  13. #  
  14. #-----[ FIND ]------------------------------------------  
  15. #  
  16.  
  17. <a href="javascript:BBCquick()"><img border="0" src="{BBCB_MG_IMG_PATH}quick{BBCB_MG_IMG_EXT}" name="quick" type="image" onMouseOver="helpline('quick')" alt="Quicktime" title="Quicktime" class="bbimages" /></a>  
  18.  
  19. #  
  20. #-----[AFTER, ADD]------------------------------------------  
  21. #  
  22.  
  23. <a href="javascript:BBCgooglevideo()" accesskey="g"><img border="0" src="{BBCB_MG_IMG_PATH}googlevideo{BBCB_MG_IMG_EXT}" name="img" type="image" onMouseOver="helpline('googlevideo')" alt="Google Video" title="Google Video" class="bbimages" /></a>  
  24.  
  25. #  
  26. #-----[ OPEN ]------------------------------------------  
  27. #  
  28.  
  29. language/lang_english/bbcb_mg.js  
  30.  
  31. #  
  32. #-----[ FIND ]------------------------------------------  
  33. #  
  34.  
  35. s_img_error = 'You didn't write the image URL';  
  36.  
  37. #  
  38. #-----[ AFTER, ADD]------------------------------------------  
  39. #  
  40.  
  41. s_googlevideo_insert = 'Enter the Google video code';  
  42. s_googlevideo_error = 'You didn't write the Google video code';  
  43.  
  44. #  
  45. #-----[ FIND ]------------------------------------------  
  46. #  
  47.  
  48. s_image_upload_help = 'Upload image to PostImage.org and add to message';  
  49.  
  50. #  
  51. #-----[ AFTER, ADD]------------------------------------------  
  52. #  
  53.  
  54. s_google_help = 'Insert a Google video';  
  55.  
  56. #  
  57. #-----[ FIND ]------------------------------------------  
  58. #  
  59.  
  60. '[quote]','[/quote]',  
  61.  
  62. #  
  63. #-----[ AFTER, ADD]------------------------------------------  
  64. #  
  65.  
  66. '[googlevideo]','[/googlevideo]',  
  67.  
  68. #  
  69. #-----[ FIND ]------------------------------------------  
  70. #  
  71.  
  72. var Code = 0;  
  73.  
  74. #  
  75. #-----[ AFTER, ADD]------------------------------------------  
  76. #  
  77.  
  78. var googlevideo = 0;  
  79.  
  80. #  
  81. #-----[ FIND ]------------------------------------------  
  82. #  
  83.  
  84. function BBCcode()  
  85. {  
  86. var txtarea = document.post.message;  
  87.  
  88. if ((clientVer >= 4) && is_ie && is_win)  
  89. {  
  90. theSelection = document.selection.createRange().text;  
  91. if (theSelection != '')  
  92. {  
  93. document.selection.createRange().text = "[code linenumbers=false]" + theSelection + "[/code]";  
  94. document.post.message.focus();  
  95. return;  
  96. }  
  97. }  
  98. else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))  
  99. {  
  100. mozInsert(txtarea, "[code linenumbers=false]", "[/code]");  
  101. return;  
  102. }  
  103. if (Code == 0)  
  104. {  
  105. ToAdd = "[code linenumbers=false]";  
  106. document.post.code.src = bbcb_mg_img_path + "code1" + bbcb_mg_img_ext;  
  107. Code = 1;  
  108. }  
  109. else  
  110. {  
  111. ToAdd = "[/code]";  
  112. document.post.code.src = bbcb_mg_img_path + "code" + bbcb_mg_img_ext;  
  113. Code = 0;  
  114. }  
  115. PostWrite(ToAdd);  
  116. }  
  117.  
  118. #  
  119. #-----[ BEFORE, ADD]------------------------------------------  
  120. #  
  121.  
  122. function BBCgooglevideo()  
  123. {  
  124. var FoundErrors = '';  
  125. var enterURL = prompt(s_googlevideo_insert, s_url_insert_tip);  
  126. if (!enterURL)  
  127. {  
  128. FoundErrors += s_googlevideo_error;  
  129. }  
  130. if (FoundErrors)  
  131. {  
  132. alert(s_gen_error + FoundErrors);  
  133. return;  
  134. }  
  135. var ToAdd = "[googlevideo]"+enterURL+"[/googlevideo]";  
  136. PostWrite(ToAdd);  


babbman [ Sat 18 Nov, 2006 20:35 ]
Post subject: 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 ]
Post subject: 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 ]
Post subject: Re: Google/Youtube Video In BBCode
Another image for google video bbcode :mrgreen:


Mighty Gorgon [ Sun 19 Nov, 2006 21:26 ]
Post subject: 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 ]
Post subject: 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)




Powered by Icy Phoenix