php forum
php mysql forum
php mysql smarty
 
Page 1 of 4 1 2 3 4 >
Topic Options
#312431 - 12/31/06 08:37 AM YouTube BB Code
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
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


Attachments
2327-YouTubeBBcode.txt (285 downloads)
2328-youtube.gif


_________________________
i see threads people
http://www.chinooktc.com

Top
#312438 - 12/31/06 01:22 PM Re: YouTube BB Code [Re: chillin]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
cool, thanks laugh
_________________________
- Allen wavey
- What Drives You?

Top
#312442 - 12/31/06 05:38 PM Re: YouTube BB Code [Re: AllenAyres]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Looks good, should also prove to be a good basepoint for anyone wanting to extend their bbcode functionality; thanks smile.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312443 - 12/31/06 07:53 PM Re: YouTube BB Code [Re: Gizmo]
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
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
_________________________
Code monkey like Fritos

Top
#312757 - 01/18/07 03:32 AM Re: YouTube BB Code [Re: Ian Spence]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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>' ),


Edited by Gizmo (01/19/07 05:50 PM)
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312758 - 01/18/07 04:17 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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>' ),
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312759 - 01/18/07 04:20 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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>' ),
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312760 - 01/18/07 05:01 AM Re: YouTube BB Code [Re: Gizmo]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Thanks guys.

you need some images for those wink
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#312761 - 01/18/07 05:09 AM Re: YouTube BB Code [Re: Ian_W]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
'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
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312762 - 01/18/07 05:10 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312763 - 01/18/07 06:47 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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>' ),
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312764 - 01/18/07 06:51 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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>' ),
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312765 - 01/18/07 08:14 AM Re: YouTube BB Code [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
What about picasa and flickr? smile
_________________________
- Allen wavey
- What Drives You?

Top
#312771 - 01/18/07 06:42 PM Re: YouTube BB Code [Re: AllenAyres]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312774 - 01/18/07 09:30 PM Re: YouTube BB Code [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
Nada I guess, a regular image tag should do it smile
_________________________
- Allen wavey
- What Drives You?

Top
#312777 - 01/19/07 02:11 AM Re: YouTube BB Code [Re: AllenAyres]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312778 - 01/19/07 02:28 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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-
Code:
[img]http://lh4.google.com/image/moguai/RbCAWu1FEGI/AAAAAAAAAAo/uqyBEIFMAmE/413689385_l.jpg[/img]


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!
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312779 - 01/19/07 02:47 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
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:
Code:
[photobucket]http://w33.photobucket.com/albums/d51/moguai/Trey/1169195897.pbw[/photobucket]
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312780 - 01/19/07 02:48 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
I was thinking about making it shorter by hijacking the code they use for preview, but it woudln't really work any differant.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312781 - 01/19/07 02:55 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Online   shocked

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Anyone know of any photo services with slideshow generators which use flash?
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
Page 1 of 4 1 2 3 4 >


Moderator:  sirdude 
Who's Online
0 registered (), 41 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Ubb - Buy It!
best forum software
Latest Posts
I want to create a Self Search mod [Question]
by lightningrod
03/10/10 09:04 PM
If I create a new script, can I just upload it?
by lightningrod
03/10/10 05:35 PM
Notepad Creates Errors when working with PHP
by lightningrod
03/10/10 05:01 PM
Question on Adding a New Script ?
by lightningrod
03/10/10 06:39 AM
Disable Watch List option
by Mike_Tabat
03/09/10 01:27 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by Gizmo
02/27/10 05:07 PM
How to Be a Great Host
by pinku
02/19/10 02:47 AM
New Mods
Disable Watch List option
by Mike_Tabat
02/18/10 09:14 AM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by
07/30/06 10:42 PM
Newest Members
joshuasm02, Chosen, Vick, Bartman, Infinity Master
13496 Registered Users
Top Posters
AllenAyres 25554
JoshPet 11330
Rick 8373
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438
(Views)Popular Topics
Known public proxy servers 1028046
Finished-[6.5.2] Games Arcade Deluxe v1.9 327222
Integrated Index Page (IIP) 5.3.1 279924
Integrated Index Page (IIP) 5.1.1 279403
TLD Bv2.1 Released - Threads Links Directory 270427
[6.0x] Who's Online 4.0.0 [Finished] 230365
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 217518
[6.3.x] [beta] Hit Hack 2.0 179339
FlashChat & UBB.threads 161010
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 154650
Forum Stats
13496 Members
59 Forums
37114 Topics
290378 Posts

Max Online: 686 @ 06/28/07 07:04 AM
Featured Member
Registered: 11/04/08
Posts: 7

 

 

 
fusionbb message board php hacks