[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) - 03/15/2007 12:34 AM
Instead of continuing to completely hijack the other thread, and post additions everywhere but the initial post; here's the thread for my Embedding BBCode additions.
7.3 Update - Due to the "Custom Tags" option added in 7.3 these can be added much easier, without having to hack code. Please see the following links:
[7.3+] Gizmo's Embedding BBCode (Compatibility) (compatibility with the codes below in 7.3)
[7.3+] Gizmo's CustomTags (My new custom tags thread for all things 7.3+)
Installation:
Open: libs/ubbthreads.inc.php
Find:
Add After (choose any you wish, this is my added block from my site):
Usage:
Others:
Spoiler Tags
Daily Motion
NOTE:
Markup Panel Note: The text attached shows you how to add an option to your markup panel (the graphic goes in images/markup_panel/ and should be named "vidembed.gif"); it took a while to get everything to mesh well, but I think it should work fine.
The only options in here (for now) is the Video Embedding options, and it prompts the user to enter a description for their video (so search engines or impaired users can actually tell what it is as they can have issues viewing videos)... On another note, do you like my video embed graphic?
Licensing Notice: I hereby grant exclusive access over the attached image(s) to UBB.Central and UBB.Dev and their userbase to be used only within the UBB (and any UBB addon's or scripts). No other usage is approved.
Attachment Information:
2475.gif - vidembed.gif
vidembedmarkuppanel.txt - The markup panel addon WITH the description tag added into the javascript prompts (recommended as Search Engines and Visually Impaired users cannot SEE the video, the reader can read a description of the video; higly recommended especially if you rely on search engine traffic).
vidembedmarkuppanel2.txt - The markup panel addon WITHOUT the description tag added into the javascript prompts (the above is recommended, this is provided for those who don't want the description tag for whatever reason).
7.3 Update - Due to the "Custom Tags" option added in 7.3 these can be added much easier, without having to hack code. Please see the following links:
[7.3+] Gizmo's Embedding BBCode (Compatibility) (compatibility with the codes below in 7.3)
[7.3+] Gizmo's CustomTags (My new custom tags thread for all things 7.3+)
Installation:
Open: libs/ubbthreads.inc.php
Find:
Code
// You don't see the next line
array( "#\[email:([+_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))\](.+?)\[/email]#i", '<a href="mailto:\1">\5</a>' ),
Add After (choose any you wish, this is my added block from my site):
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( "#\[break\]([a-zA-Z0-9-_]+)\[/break\]#i", '<center><object width="425" height="350"><param name="movie" value="http://embed.break.com/\1"></param><embed src="http://embed.break.com/\1" type="application/x-shockwave-flash" 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( "#\[pbucket\]([a-zA-Z0-9-_.:/]+)\[/pbucket\]#i", '<center><embed width="425" height="350" type="application/x-shockwave-flash" wmode="transparent" src="http://vid68.photobucket.com/player.swf?file=\1"></embed></center>' ),
array( "#\[skype\]([a-zA-Z0-9-_]+)\[/skype\]#i", '<a href="skype:\1?call"><img src="http://mystatus.skype.com/bigclassic/\1" style="border: none;" width="182" height="44" alt="My status" /></a>' ),
array( "#\[flash\]([0-9]+), ([0-9]+), ([a-zA-Z0-9-_.&:/]+)\[/flash\]#i", '<center><object width="\2" height="\1"><param name="movie" value="\3"></param><embed src="\3" type="application/x-shockwave-flash" width="\2" height="\1"></embed></object></center>' ),
array( "#\[flash\]([a-zA-Z0-9-_.&:/]+)\[/flash\]#i", '<center><object width="425" height="350"><param name="movie" value="\1"></param><embed src="\1" type="application/x-shockwave-flash" width="425" height="350"></embed></object></center>' ),
array( "#\[liveleak\]([a-zA-Z0-9_]+)\[/liveleak\]#i", '<center><object type="application/x-shockwave-flash" width="425" height="350" wmode="transparent" data="http://www.liveleak.com/player.swf?autostart=false&token=\1"><param name="movie" value="http://www.liveleak.com/player.swf?autostart=false&token=\1"><param name="wmode" value="transparent"><param name="quality" value="high"></object></center>' ),
array( "#\[sdeluxe\]([a-zA-Z0-9]+)\[/sdeluxe\]#i", '<center><object width="425" height="350"><param name="allowFullScreen" value="true" /><param name="movie" value="http://www.superdeluxe.com/static/swf/share_vidplayer.swf" /><param name="FlashVars" value="id=\1" /><embed src="http://www.superdeluxe.com/static/swf/share_vidplayer.swf" FlashVars="id=\1" type="application/x-shockwave-flash" width="425" height="350" allowFullScreen="true" ></embed></object></center>' ),
Usage:
Code
[google]Search Criteria[/google]
[googlevideo]VideoID[/googlevideo]
[googleimages]Search Criteria[/googleimages]
[froogle]Search Criteria[/froogle]
[pricegrabber]Search Criteria[/pricegrabber]
[youtube]VideoID[/youtube]
[break]VideoID[/break]
[yahoovideo][/yahoovideo]
[myspace]UserID[/myspace]
[myspacevideo]VideoID[/mypacevideo]
[loowa]UserID[/loowa]
[loowavideo]VideoID[/loowavideo]
[revver]VideoID[/revver]
[wiki]Wiki Criteria[/wiki]
[description]Desctiption Data[/description]
[desc]Description Data[/desc]
[photobucket]EmbedURL[/photobucket]
[podcast]http://www.url.to/podcast.mp3[/podcast]
[webcam]StickamID[/webcam]
[pbucket]PhotoBucketVideoURL[/pbucket]
[skype]SkypeID[/skype]
[flash]height, width, URL[/flash]
[flash]URL[/flash]
[liveleak]VideoID[/liveleak]
[sdeluxe]VideoID[/sdeluxe]
Others:
Spoiler Tags
Daily Motion
NOTE:
- The [podcast] tag requires the MP3 flash file inserted into your /libs directory; this file is available here. Please note that you'll also need to insert the URL to this file in the bbcode entry.
- For support on the Spoiler Tags bbcode, please go here as it has its own page.
- To see why there is the description/desc tags, please see here.
- The PhotoBucket Video code requires the videoURL from the embed link on photobucket, you can't use the "link to this page" link as it does not give the video data to embed the video.
Markup Panel Note: The text attached shows you how to add an option to your markup panel (the graphic goes in images/markup_panel/ and should be named "vidembed.gif"); it took a while to get everything to mesh well, but I think it should work fine.
The only options in here (for now) is the Video Embedding options, and it prompts the user to enter a description for their video (so search engines or impaired users can actually tell what it is as they can have issues viewing videos)... On another note, do you like my video embed graphic?
Licensing Notice: I hereby grant exclusive access over the attached image(s) to UBB.Central and UBB.Dev and their userbase to be used only within the UBB (and any UBB addon's or scripts). No other usage is approved.
Attachment Information:
2475.gif - vidembed.gif
vidembedmarkuppanel.txt - The markup panel addon WITH the description tag added into the javascript prompts (recommended as Search Engines and Visually Impaired users cannot SEE the video, the reader can read a description of the video; higly recommended especially if you rely on search engine traffic).
vidembedmarkuppanel2.txt - The markup panel addon WITHOUT the description tag added into the javascript prompts (the above is recommended, this is provided for those who don't want the description tag for whatever reason).