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 (279 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 Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
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 Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

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 Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312758 - 01/18/07 04:17 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312759 - 01/18/07 04:20 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312760 - 01/18/07 05:01 AM Re: YouTube BB Code [Re: Gizmo]
Ian_W Global Moderator 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 Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312762 - 01/18/07 05:10 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312763 - 01/18/07 06:47 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312764 - 01/18/07 06:51 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

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

Registered: 03/10/00
Posts: 25452
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 Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

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

Registered: 03/10/00
Posts: 25452
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 Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312778 - 01/19/07 02:28 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312779 - 01/19/07 02:47 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312780 - 01/19/07 02:48 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
#312781 - 01/19/07 02:55 AM Re: YouTube BB Code [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5134
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 Owner

Top
Page 1 of 4 1 2 3 4 >


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

Latest Posts
Wisdom needed
by Gizmo
Yesterday at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
12/03/08 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks