UBB.Dev
Posted By: chillin YouTube BB Code - 12/31/2006 4:37 PM
About
This mod add's a fancy little button to your Rich Text Panel button bar that when clicked prompts a user for a YouTube video code. The bbcode then imbeds the requisite html to display the YouTube video inline of the users post.

Credits
chillin

Files Altered
* /libs/ubbthreads.inc.php
* /templates/default/standard_text_editor.tpl
* /ubb_js/standard_text_editor.js

Files Added
youtube.gif

Directions
Backup your files first.
Upload the gif to your images/markup_panel/default/ directory
Follow instructions in the .txt file
rockband


Attached File
2327-YouTubeBBcode.txt  (288 downloads)
Attached picture 2328-youtube.gif
Posted By: AllenAyres Re: YouTube BB Code - 12/31/2006 9:22 PM
cool, thanks laugh
Posted By: Gizmo Re: YouTube BB Code - 01/01/2007 1:38 AM
Looks good, should also prove to be a good basepoint for anyone wanting to extend their bbcode functionality; thanks smile.
Posted By: Ian Spence Re: YouTube BB Code - 01/01/2007 3:53 AM
You should probably replace
Code
"#\[youtube\](.+?)\[/youtube\]#i"

with

Code
"#\[youtube\]([a-zA-Z0-9]+)\[/youtube\]#i"

To prevent someone from getting creative with what they try to link to
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 11:32 AM
Google Video tag:
Code
			array( "#\[googlevideo\]([a-zA-Z0-9-]+)\[/googlevideo\]#i", '<embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\1&hl=en"></embed>' ),
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 12:17 PM
I added some more lol...
Code
			// Added UBBCode
array( "#\[google\]([a-zA-Z0-9 ]+)\[/google\]#i", '<a href="http://www.google.com/custom?domains=www.undergroundnews.com&q=\1&sa=Search&sitesearch=&client=pub-5168900358893374&forid=1&channel=4984299912&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%238CA3D6%3BGL%3A1%3BDIV%3A%23666666%3BVLC%3A8CA3D6%3BAH%3Acenter%3BBGC%3A000000%3BLBGC%3A000000%3BALC%3AC0C0C0%3BLC%3AC0C0C0%3BT%3AFFFFFF%3BGFNT%3A8CA3D6%3BGIMP%3A8CA3D6%3BFORID%3A1&hl=en" target="_new">\1</a>' ),
array( "#\[googleimages\]([a-zA-Z0-9 ]+)\[/googleimages\]#i", '<a href="http://images.google.com/images?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-17,GGGL:en&q=\1" target="_new">\1</a>' ),
array( "#\[froogle\]([a-zA-Z0-9 ]+)\[/froogle\]#i", '<a href="http://froogle.google.com/froogle?q=\1C&btnG=Search+Froogle" target="_new">\1</a>' ),
array( "#\[pricegrabber\]([a-zA-Z0-9 ]+)\[/pricegrabber\]#i", '<a href="http://www.pricegrabber.com/search_getoffers.php?keyword=\1" target="_new">\1</a>' ),
array( "#\[youtube\]([a-zA-Z0-9]+)\[/youtube\]#i", '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' ),
array( "#\[googlevideo\]([a-zA-Z0-9]+)\[/googlevideo\]#i", '<embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\1&hl=en"></embed>' ),
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 12:20 PM
I can't forget:
Code
			array( "#\[wiki\]([a-zA-Z0-9 ]+)\[/wiki\]#i", '<a href="http://en.wikipedia.org/wiki/\1" target="_new">\1</a>' ),
Posted By: Ian_W Re: YouTube BB Code - 01/18/2007 1:01 PM
Thanks guys.

you need some images for those wink
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 1:09 PM
'eh I don't do images hehe... I implement features everyone will forget! wink...

The yahoo embed code is something odd... It embeds the id and author together seperated by a ".", and then it lists them both several times in the string... The video id is mentioned 4 times, and the author 3 times; butI can't quite get the regex right smirk
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 1:10 PM
You know, I guess I could jack the images from the google toolbar for the google links for froogle/google images/google but it doesn't have google video yet
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 2:47 PM
MySpace Video:
Code
			array( "#\[myspacevideo\]([a-zA-Z0-9]+)\[/myspacevideo\]#i", '<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\1&type=video" type="application/x-shockwave-flash" width="425" height="350"></embed>' ),
Posted By: Gizmo Re: YouTube BB Code - 01/18/2007 2:51 PM
Got Yahoo Video working; my god they're anal retentive...
Code
			array( "#\[yahoovideo\]([a-zA-Z0-9 ]+).([a-zA-Z0-9]+)\[/yahoovideo\]#i", '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=\2&emailUrl=http%3A%2F%2Fvideo.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D\1.\2%26cache%3D1&imUrl=http%253A%252F%252Fvideo.yahoo.com%252Fvideo%252Fplay%253F%2526ei%253DUTF-8%2526vid%253D\1.\2%2526cache%253D1&imTitle=TreehuggerTV%253A%2BFreshtopia%2BTakes%2Bthe%2BLong%2BTrain&searchUrl=http://video.yahoo.com/video/search?p=&profileUrl=http://video.yahoo.com/video/profile?yid=&creatorValue=YmlwZWRiaXBlZA%3D%3D&vid=\1.\2" type="application/x-shockwave-flash" width="425" height="350"></embed>' ),
Posted By: AllenAyres Re: YouTube BB Code - 01/18/2007 4:14 PM
What about picasa and flickr? smile
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 2:42 AM
Originally Posted by AllenAyres
What about picasa and flickr? smile
What about them do you want "ubbcoded"? I'll make any custom code, just need to know what you need cap'in!
Posted By: AllenAyres Re: YouTube BB Code - 01/19/2007 5:30 AM
Nada I guess, a regular image tag should do it smile
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 10:11 AM
I think flickr has a slideshow option; I think that photobucket does too; I think I may look into those as [flickrshow] and [bucketshow]

Not sure whatelse i can do, but feel free to lend opinions wink
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 10:28 AM
Well, i signed up for a picasa web account, if i did make a custom tag it'd be kinda worthless imo, it'd require a user to post 90% of the path to the image, and they could do all that just with the image tag...

Code
[picasa]moguai/RbCAWu1FEGI/AAAAAAAAAAo/uqyBEIFMAmE/413689385_l.jpg[/picasa]
-or-

I don't thin it'd save too much time or allow for anything that the current tools would allow...

Now to find some slideshow sites!
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 10:47 AM
Behold the PhotoBucket slideshow ubbcode:
Code
			array( "#\[photobucket\]([a-zA-Z0-9/:.]+)\[/photobucket\]#i", '<object width="425" height="350"><embed type="application/x-shockwave-flash" wmode="transparent" src="http://w33.photobucket.com/pbwidget.swf?pbwurl=\1" height="350" width="425"></embed></object>' ),

The problem here is that you have to take the URL to the image from the embed line and not the "link to this page" line.

Example of usage:
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 10:48 AM
I was thinking about making it shorter by hijacking the code they use for preview, but it woudln't really work any differant.
Posted By: Gizmo Re: YouTube BB Code - 01/19/2007 10:55 AM
Anyone know of any photo services with slideshow generators which use flash?
Posted By: Gizmo Re: YouTube BB Code - 01/20/2007 1:50 AM
Updated GoogleVideo class to allow "-" in video id's.
Posted By: Gizmo Re: YouTube BB Code - 01/20/2007 7:54 AM
Well, all of my above ubbcode sections with & properly escaped:
Code
			// Added UBBCode
array( "#\[google\]([a-zA-Z0-9 ]+)\[/google\]#i", '<a href="http://www.google.com/custom?domains=www.undergroundnews.com&q=\1&sa=Search&sitesearch=&client=pub-5168900358893374&forid=1&channel=4984299912&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%238CA3D6%3BGL%3A1%3BDIV%3A%23666666%3BVLC%3A8CA3D6%3BAH%3Acenter%3BBGC%3A000000%3BLBGC%3A000000%3BALC%3AC0C0C0%3BLC%3AC0C0C0%3BT%3AFFFFFF%3BGFNT%3A8CA3D6%3BGIMP%3A8CA3D6%3BFORID%3A1&hl=en" target="_new">\1</a>' ),
array( "#\[googlevideo\]([a-zA-Z0-9-]+)\[/googlevideo\]#i", '<embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\1&hl=en"></embed>' ),
array( "#\[googleimages\]([a-zA-Z0-9 ]+)\[/googleimages\]#i", '<a href="http://images.google.com/images?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-17,GGGL:en&q=\1" target="_new">\1</a>' ),
array( "#\[froogle\]([a-zA-Z0-9 ]+)\[/froogle\]#i", '<a href="http://froogle.google.com/froogle?q=\1C&btnG=Search+Froogle" target="_new">\1</a>' ),
array( "#\[pricegrabber\]([a-zA-Z0-9 ]+)\[/pricegrabber\]#i", '<a href="http://www.pricegrabber.com/search_getoffers.php?keyword=\1" target="_new">\1</a>' ),
array( "#\[youtube\]([a-zA-Z0-9]+)\[/youtube\]#i", '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' ),
array( "#\[yahoovideo\]([a-zA-Z0-9]+).([a-zA-Z0-9 ]+)\[/yahoovideo\]#i", '<embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=\2&emailUrl=http%3A%2F%2Fvideo.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D\1.\2%26cache%3D1&imUrl=http%253A%252F%252Fvideo.yahoo.com%252Fvideo%252Fplay%253F%2526ei%253DUTF-8%2526vid%253D\1.\2%2526cache%253D1&imTitle=TreehuggerTV%253A%2BFreshtopia%2BTakes%2Bthe%2BLong%2BTrain&searchUrl=http://video.yahoo.com/video/search?p=&profileUrl=http://video.yahoo.com/video/profile?yid=&creatorValue=YmlwZWRiaXBlZA%3D%3D&vid=\1.\2" type="application/x-shockwave-flash" width="425" height="350"></embed>' ),
array( "#\[myspace\]([a-zA-Z0-9 ]+)\[/myspace\]#i", '<a href="http://www.myspace.com/\1" target="_new">\1</a>' ),
array( "#\[myspacevideo\]([a-zA-Z0-9]+)\[/myspacevideo\]#i", '<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\1&type=video" type="application/x-shockwave-flash" width="425" height="350"></embed>' ),
array( "#\[loowa\]([a-zA-Z0-9@.]+)\[/loowa\]#i", '<a href="http://www.loowa.com/profile.php?email=\1" target="_new">\1</a>' ),
array( "#\[loowavideo\]([a-zA-Z0-9]+)\[/loowavideo\]#i", '<embed src="http://update.videoegg.com/flash/player8.swf?jsver=1.3" FlashVars="file=http%3A//selfserve1.download.videoegg.com/gid353/cid1208/CZ/PW/1169094106KzyWvMT0WVB7S74rN6a2&bgColor=000000&autoPlay=false&showAd=false&adVars=&pageURL=http%3A//www.loowa.com/video/\1&allowFlash9Fullscreen=true" quality="high" allowFullScreen="true" allowScriptAccess="always" bgcolor="#000000" scale="noscale" wmode="window" width="425" height="350" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>' ),
array( "#\[wiki\]([a-zA-Z0-9 ]+)\[/wiki\]#i", '<a href="http://en.wikipedia.org/wiki/\1" target="_new">\1</a>' ),
array( "#\[photobucket\]([a-zA-Z0-9/:.]+)\[/photobucket\]#i", '<object width="425" height="350"><embed type="application/x-shockwave-flash" wmode="transparent" src="http://w33.photobucket.com/pbwidget.swf?pbwurl=\1" height="350" width="425"></embed></object>' ),
Posted By: Gizmo Re: YouTube BB Code - 01/20/2007 10:38 AM
A "podcast" (mp3 player really) ubb code tag is:
Code
			array( "#\[podcast\]([a-zA-Z0-9-_.&:/]+)\[/podcast\]#i", '<embed src="http://www.undergroundnews.com/forum/MP3_Player/mp3player.swf" width="425" height="42" bgcolor="#000000" quality="low" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=\1&autostart=false&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xFFFFFF" />' ),

It however reuires that you download the FLASH MP3 PLAYER and upload the mp3player.swf file to your webspace and (please do this as i don't want to mirror the file for you) link to it as the embed src section of the ubbcode above.

Also, for those of you wondering "will it lag the podcast/audio file streaming it like that?" and the answer is no, I played a 10minute podcast in real time (I have the flash file set to low quality so it'll cache the content rather fast)
Posted By: Gizmo Re: YouTube BB Code - 01/20/2007 1:47 PM
Evidently youtube videos can have a - in them, so updated regex:
Code
			array( "#\[youtube\]([a-zA-Z0-9-]+)\[/youtube\]#i", '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' ),
Posted By: Ian_W Re: YouTube BB Code - 01/22/2007 11:44 AM
Do these video's etc. autoplay?

Reason I ask is that if they do - what is to stop someone from having a video that keeps playing in their signature?

Sure we can edit the signatures - but maybe it would be good to have certain ubbcode unavailable for signatures.

Just a thought smile
Posted By: Gizmo Re: YouTube BB Code - 01/22/2007 11:58 AM
They do not autoplay; you can set them to autoplay in each string see "autoplay = false" (or somethinjg like it) change it to true; I Don't recommend ANY auto playing though.

Posted By: Ian_W Re: YouTube BB Code - 01/22/2007 1:46 PM
OK - thx
Posted By: Gizmo Re: YouTube BB Code - 01/23/2007 2:09 AM
mmmm i can so see 15 embedded videos on one page, all autoplaying at once... hahahaha
Posted By: Ian_W Re: YouTube BB Code - 01/24/2007 7:21 PM
A few images. I am not very good at images (as the attached shows LOL )

So if anyone can add to these, or do better feel free smile



Attached picture 2344-myspace.jpg
Attached picture 2345-myspacevideo.jpg
Attached picture 2346-yahoovideo.jpg
Attached picture 2348-googlevideo.jpg
Posted By: Gizmo Re: YouTube BB Code - 01/24/2007 10:03 PM
still been too busy to try lol... are those all the "recommended" sizes?
Posted By: Gizmo Re: YouTube BB Code - 01/25/2007 10:20 AM
If you utilize Stickam and want users to be able to embed their webcam feed via ubbcode:

In libs/ubbthreads.inc.php
Find:
Code
			// Auto urls

Add Above:
Code
			array( "#\[webcam\]([a-zA-Z0-9-_]+)\[/webcam\]#i", '<center><embed src="http://player.stickam.com/stickamPlayer/\1" type="application/x-shockwave-flash" width="480" height="210" allowScriptAccess="always"></embed></center>' ),

Usage:
[webcam]camid[/webcam]
Posted By: Ian_W Re: YouTube BB Code - 01/25/2007 11:37 AM
Thanks smile
Posted By: Gizmo Re: YouTube BB Code - 01/29/2007 10:10 PM
Revver Video
Code
			array( "#\[revver\]([a-zA-Z0-9]+)\[/revver\]#i", '<center><embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" salign="TL" bgcolor="#ffffff" flashvars="mediaId=\1&affiliateId=64082" wmode="transparent" height="350" width="425"></embed></center>' ),
Posted By: Ian_W Re: YouTube BB Code - 01/30/2007 9:08 AM
revver? - new one on me....
Posted By: Gizmo Re: YouTube BB Code - 01/30/2007 9:09 AM
they seem to be fairly popular :shrug:
Posted By: Ian_W Re: YouTube BB Code - 02/01/2007 4:07 PM
In 7.1b5 this has changed from

Code


>>FIND
<a href="javascript: x()" onclick="DoPrompt('image');" title="{$lang.IMAGE_ALT}" alt="{$lang.IMAGE_ALT}"><img id="image" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/image.gif" /></a>

>>ADD BELOW
<a href="javascript: x()" onclick="DoPrompt('youtube');" title="Video" alt="Video"><img id="youtube" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/youtube.gif" /></a>



to

Code


>>FIND
<a href="javascript: void(0)" onclick="DoPrompt('image');" title="{$lang.IMAGE_ALT}" alt="{$lang.IMAGE_ALT}"><img id="image" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/image.gif" /></a>

>>ADD BELOW
<a href="javascript: void(0)" onclick="DoPrompt('youtube');" title="Video" alt="Video"><img id="youtube" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/youtube.gif" /></a>



Posted By: chep Re: YouTube BB Code - 02/15/2007 2:55 AM
Pardon me,

Is there an automated way to install the mods or not?

Posted By: Gizmo Re: YouTube BB Code - 02/15/2007 8:41 AM
In short, no; at this point they must be installed by hand, manually.
Posted By: Gizmo Re: YouTube BB Code - 02/24/2007 1:17 PM
My latest UBBCode Block:
Code
			// Gizmo's Added UBBCode
array( "#\[google\]([a-zA-Z0-9 ]+)\[/google\]#i", '<a href="http://www.google.com/custom?domains=www.undergroundnews.com&q=\1&sa=Search&sitesearch=&client=pub-5168900358893374&forid=1&channel=4984299912&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%238CA3D6%3BGL%3A1%3BDIV%3A%23666666%3BVLC%3A8CA3D6%3BAH%3Acenter%3BBGC%3A000000%3BLBGC%3A000000%3BALC%3AC0C0C0%3BLC%3AC0C0C0%3BT%3AFFFFFF%3BGFNT%3A8CA3D6%3BGIMP%3A8CA3D6%3BFORID%3A1&hl=en" target="_new">\1</a>' ),
array( "#\[googlevideo\]([a-zA-Z0-9-]+)\[/googlevideo\]#i", '<center><embed style="width:425px; height:350px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\1&hl=en"></embed></center>' ),
array( "#\[googleimages\]([a-zA-Z0-9 ]+)\[/googleimages\]#i", '<a href="http://images.google.com/images?sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-17,GGGL:en&q=\1" target="_new">\1</a>' ),
array( "#\[froogle\]([a-zA-Z0-9 ]+)\[/froogle\]#i", '<a href="http://froogle.google.com/froogle?q=\1C&btnG=Search+Froogle" target="_new">\1</a>' ),
array( "#\[pricegrabber\]([a-zA-Z0-9 ]+)\[/pricegrabber\]#i", '<a href="http://www.pricegrabber.com/search_getoffers.php?keyword=\1" target="_new">\1</a>' ),
array( "#\[youtube\]([a-zA-Z0-9-]+)\[/youtube\]#i", '<center><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></center>' ),
array( "#\[yahoovideo\]([a-zA-Z0-9]+).([a-zA-Z0-9 ]+)\[/yahoovideo\]#i", '<center><embed src="http://us.i1.yimg.com/cosmos.bcst.yahoo.com/player/media/swf/FLVVideoSolo.swf" flashvars="id=\2&emailUrl=http%3A%2F%2Fvideo.yahoo.com%2Futil%2Fmail%3Fei%3DUTF-8%26vid%3D\1.\2%26cache%3D1&imUrl=http%253A%252F%252Fvideo.yahoo.com%252Fvideo%252Fplay%253F%2526ei%253DUTF-8%2526vid%253D\1.\2%2526cache%253D1&imTitle=TreehuggerTV%253A%2BFreshtopia%2BTakes%2Bthe%2BLong%2BTrain&searchUrl=http://video.yahoo.com/video/search?p=&profileUrl=http://video.yahoo.com/video/profile?yid=&creatorValue=YmlwZWRiaXBlZA%3D%3D&vid=\1.\2" type="application/x-shockwave-flash" width="425" height="350"></embed></center>' ),
array( "#\[myspace\]([a-zA-Z0-9 ]+)\[/myspace\]#i", '<a href="http://www.myspace.com/\1" target="_new">\1</a>' ),
array( "#\[myspacevideo\]([a-zA-Z0-9]+)\[/myspacevideo\]#i", '<center><embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\1&type=video" type="application/x-shockwave-flash" width="425" height="350"></embed></center>' ),
array( "#\[loowa\]([a-zA-Z0-9@.]+)\[/loowa\]#i", '<a href="http://www.loowa.com/profile.php?email=\1" target="_new">\1</a>' ),
array( "#\[loowavideo\]([a-zA-Z0-9]+)\[/loowavideo\]#i", '<center><embed src="http://update.videoegg.com/flash/player8.swf?jsver=1.3" FlashVars="file=http%3A//selfserve1.download.videoegg.com/gid353/cid1208/CZ/PW/1169094106KzyWvMT0WVB7S74rN6a2&bgColor=000000&autoPlay=false&showAd=false&adVars=&pageURL=http%3A//www.loowa.com/video/\1&allowFlash9Fullscreen=true" quality="high" allowFullScreen="true" allowScriptAccess="always" bgcolor="#000000" scale="noscale" wmode="window" width="425" height="350" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></center>' ),
array( "#\[revver\]([a-zA-Z0-9]+)\[/revver\]#i", '<center><embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" salign="TL" bgcolor="#ffffff" flashvars="mediaId=\1&affiliateId=64082" wmode="transparent" height="350" width="425"></embed></center>' ),
array( "#\[wiki\]([a-zA-Z0-9 ]+)\[/wiki\]#i", '<a href="http://en.wikipedia.org/wiki/\1" target="_new">\1</a>' ),
array( "#\[description\](.+?)\[/description\]#i", '<b>Description</b>: \\1' ),
array( "#\[desc\](.+?)\[/desc\]#i", '<b>Description</b>: \\1' ),
array( "#\[photobucket\]([a-zA-Z0-9/:.]+)\[/photobucket\]#i", '<center><object width="425" height="350"><embed type="application/x-shockwave-flash" wmode="transparent" src="http://w33.photobucket.com/pbwidget.swf?pbwurl=\1" height="350" width="425"></embed></object></center>' ),
array( "#\[podcast\]([a-zA-Z0-9-_.&:/]+)\[/podcast\]#i", '<center><embed src="http://www.undergroundnews.com/forum/addons/mp3player.swf" width="425" height="42" bgcolor="#000000" quality="low" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=\1&autostart=false&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xFFFFFF" /></center>' ),
array( "#\[webcam\]([a-zA-Z0-9-_]+)\[/webcam\]#i", '<center><embed src="http://player.stickam.com/stickamPlayer/\1" type="application/x-shockwave-flash" width="480" height="210" allowScriptAccess="always"></embed></center>' ),
array( "#\[spoiler\](.+?)\[/spoiler\]#i", "<div class=\"ubbcode-block\"><div class=\"ubbcode-header\">Warning, Spoiler: <input type=\"button\" value=\"Show\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\" /></div><div class=\"ubbcode-body\"><div style=\"display: none;\">\\1</div></div></div>" ),

Everything from google searches, to memberids on youtube and loowa to video embedding and spoiler tags lol...
Posted By: Ian_W Re: YouTube BB Code - 02/24/2007 1:55 PM
is that all tipsy wink
Posted By: owen93 Re: YouTube BB Code - 03/09/2007 8:05 PM
If I stick the whole string available in either the "URL" or "Embed" boxes I see nothing in my post.

if I just put the "Video Id"

I see the picture - but can't click it and start it.

I'm testing with

http://www.youtube.com/watch?v=bfMgRHRJ-tc
Posted By: Gizmo Re: YouTube BB Code - 03/09/2007 8:26 PM
Code
[youtube]bfMgRHRJ-tc[/youtube]
works for me without any issues; the play button is in the center, just took one click.

I'm using the embed code here.
Posted By: owen93 Re: YouTube BB Code - 03/09/2007 9:32 PM
hmm

wonder if it is my web server?

do I need to add something to the apache config maybe?

Posted By: Gizmo Re: YouTube BB Code - 03/09/2007 10:38 PM
The code doesn't touch your apache config, it's a flash embed code, has nothing to do with your web server really... It should just load; assuming you inserted the bbcode in the proper place...

Can you link me to an example of your embedding?
Posted By: owen93 Re: YouTube BB Code - 03/10/2007 3:25 AM
Its my firefox browser.

works great in IE.

what I don't get is that youtube works fine from other sites and from youtube itself.

Posted By: Gizmo Re: YouTube BB Code - 03/10/2007 3:35 AM
It could be that you don't have the flash player installed; or a current version of it... I know I had to jump through all sorts of hurtles on my linux machine to get it to play any java applets...

I'm not sure if it'd be:
http://www.macromedia.com/software/flash/about/

But it looks promising...
Posted By: owen93 Re: YouTube BB Code - 03/10/2007 4:52 AM
I've been having some other trouble with the firefox install
on my machine
so I wound up uninstalling and re-installing firefox2.

its working for me now

Posted By: Gizmo Re: YouTube BB Code - 03/10/2007 4:54 AM
lol glad it's working now; i'm semi curious what the issue was, but since it's working you're golden wink
Posted By: owen93 Re: YouTube BB Code - 03/13/2007 3:18 AM
Originally Posted by Gizmo
lol glad it's working now; i'm semi curious what the issue was, but since it's working you're golden wink

I'm curious about that too.
I uninstalled all my extensions to see if perhaps there was something in there that was causing it.

The one thing I SHOULD have done - and didn't was clear my cache.
Oh well
Posted By: Mark_S Re: YouTube BB Code - 03/14/2007 2:47 PM
Mines working smile

I've added a improved gif,
it does have white text no transparency.

First Post Download txt needs to be updated,
as you read through this thread there are amendments.

As in [7.1] changes.

Love it, wasn't too bad to implement.

Another great Hack from the Gizmo camp.

Attached picture 2373-youtube.gif
Posted By: Mark_S Re: YouTube BB Code - 03/14/2007 3:29 PM
Saying that i cant get the yahoo video to work ?

http://video.yahoo.com/video/play?ei=UTF-8&cache=1&gid=177918&vid=266039&b=0

The player shows up, click to play but nothing happens?
Just the blank screen ?
No sound.

using the [yahoovideo] tags?

IE7 - Nothing
FFv2 - In the status bar says
Transfering data from playlist.yahoo.com........

Any idea's ?
Posted By: blaaskaak Re: YouTube BB Code - 03/14/2007 3:41 PM
Youtube also has underscores in the ID's. So you should add it to the regex.

Code
array( "#\[youtube\]([a-zA-Z0-9-_]+)\[/youtube\]#i", '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>' ),			array( "#\[u\](.+?)\[/u\]#i", "<u>\\1</u>" ),

Posted By: Gizmo Re: YouTube BB Code - 03/15/2007 12:27 AM
Mark, the problem with updating the inital post is that this isn't my set of addons, i just hijacked the thread wink...

blaas, I figured they may... I'll update mine and hell, I'll start my own thread wink...

Mark, I'm not sure on taht issue, the video id for that video looks completely differant than what I crafted the regex to accept... I'll look into it later...
Posted By: Frost Re: YouTube BB Code - 04/17/2007 6:24 PM
Nevermind I fixed that issue.

I am still having an issue playing the Video with Firefox even though I updated my flashplayer, it still will not let me click the play option.
Posted By: Gizmo Re: YouTube BB Code - 04/18/2007 12:28 AM
Clearer instructions and more updated code are available on the other thread.

your problem is quite simply, you're entering the URL; all you need to do is enter the video ID.
Posted By: Gizmo Re: YouTube BB Code - 04/18/2007 12:29 AM
I really need to check the post before responding to see if it's been edited vs relying on email notices... lol...

Not sure why firefox would give you these issues though, I'm using FFoX2 and haven't noticed any such problems...
Posted By: willing Re: YouTube BB Code - 04/21/2007 10:49 AM
Hi - I modified the file to add the YouTube and Google Videos - and YouTube works fine.

But for some reason the Google vid doesn't work.... the black space where the video should be appears on the page along with the bottom (google video) menu, but nothing moving even if I click play.....

Can anyone help me troubleshoot?

Thank you
Posted By: Mark_S Re: YouTube BB Code - 04/21/2007 11:16 AM
Humm i questioned Yahoo video maybe i ment Google lol

Originally Posted by Gizmo
Clearer instructions and more updated code are available on the other thread.

your problem is quite simply, you're entering the URL; all you need to do is enter the video ID.
Posted By: willing Re: YouTube BB Code - 04/21/2007 11:20 AM
I did enter just the video ID actually.
Posted By: Gizmo Re: YouTube BB Code - 04/21/2007 11:42 AM
Could you paste me the URL to the google video you're trying to utilize, as well as the code you're entereing in to get it to load on your site (as in [googlevideo]videoid[/googlevideo])
Posted By: willing Re: YouTube BB Code - 04/21/2007 11:52 AM
Hold on a sec I don't want to waste your time so I will redo it all once more triple carefully.

If the vid ID is "-5980380351326007052" then I just sandwich that between [googlevideo] and [/googlevideo], right?

Appreciate the help.
Posted By: Gizmo Re: YouTube BB Code - 04/21/2007 12:13 PM
these really belong here but yeh that SHOULD work...
Posted By: willing Re: YouTube BB Code - 04/21/2007 12:16 PM
Thanks Gizmo.

I'm NEARLY there now with setting them up. The only thing I can't solve at the moment is the favicon.ico thing for browsers. I just can't get it to appear in the browser, but will keep at it!
Posted By: AllenAyres Re: YouTube BB Code - 03/24/2008 2:42 AM
I'm going to add the youtube portion to a 7.2.2 site, is the first post updated with current code? smile
Posted By: AllenAyres Re: YouTube BB Code - 03/24/2008 2:45 AM
Nevermind, other topic smile
Posted By: Gizmo Re: YouTube BB Code - 03/24/2008 3:16 AM
Was about to say, current code for all video sites can be found in my long user tested thread wink
© UBB.Developers