[BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!

[BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

Postby Fraev » Sun Jan 13, 2008 2:49 pm

MOD Title: Video BBCode
MOD Description: This MOD will add a BBCode called "video", which lets users add youtube, googlevideo, dailymotion, metacafe. myspace, starsclips, yahoo, photobucket, filefront, veoh, vidilife, gametrailers, vidiac, gamespot, megavideo, vimeo, gamevideos, tu.tv, godtube. myvideo, collegehumor, comedycentral, slideshare, revver, sevenload, clipfish videos to their post.

Example:
Code: Select all
[video]http://youtube.com/watch?v=IiJdn6bg3fs[/video]
[video]http://video.google.it/videoplay?docid=-1807566009355608301[/video]
[video]http://dailymotion.alice.it/video/x3gvg0_baby-break-dance_fun[/video]
[video]http://www.metacafe.com/watch/976183/amazing_denver_zoo_lights_2007/[/video]
[video]http://starsclips.net/videos.aspx/video~no_break_girls_boxing_824/No_break_girls_boxing/Funny_videos/[/video]
[video]http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoID=1590276358[/video]
[video]http://video.yahoo.com/video/play?vid=1845135&fr=&cache=1[/video]
[video]http://photobucket.com/mediadetail/?media=%2Fplayer.swf%3Ffile%3Dhttp%3A%2F%2Fvid209.photobucket.com%2Falbums%2Fbb146%2Fgirlsrule619_photo%2FCIMG1214.flv&searchTerm=&pageOffset=[/video]
[video]http://files.filefront.com/Conflict+Denied+Ops+Launch+Trailer/;9506302;/fileinfo.html[/video]
[video]http://www.veoh.com/videos/v3307355BSa7tBwK?source=featured&cmpTag=featured&rank=3[/video]
[video]http://www.vidilife.com/video_play_1125851_Not_Karate.htm?hmtrk=Not_Karate[/video]
[video]http://www.gametrailers.com/player/30032.html[/video]
[video]http://www.vidiac.com/video/7fd7de8b-67e8-4ffb-a5bd-991900422e1a.htm[/video]
[video]http://www.gamespot.com/video/938343/6185167/videoplayerpop?[/video]
[video]http://www.megavideo.com/?v=QZ4O9C8P[/video]
[video]http://www.vimeo.com/173714[/video]
[video]http://www.gamevideos.com/video/id/17281[/video]
[video]http://www.tu.tv/videos/nuco-diga-no-a-una-mujer[/video]
[video]http://www.godtube.com/view_video.php?viewkey=9c72e4dcbe79c288680e[/video]
[video]http://www.myvideo.de/watch/4276644/Handys_boese[/video]
[video]http://www.collegehumor.com/video:1819139[/video]
[video]http://www.comedycentral.com/videos/index.jhtml?videoId=173093[/video]
[video]http://www.slideshare.net/ewan.mcintosh/unleasing-the-tribe/[/video]
[video]http://www.revver.com/video/129859/poker-player/[/video]
[video]http://de.sevenload.com/videos/7oREPw6-Simpsons-Intro-mit-Schauspielern[/video]
t=ft_2_unset_video&utm_campaign=cf[/video]
[video]http://www.clipfish.de/player.php?videoid=MTMyNzg4fDI0NTY3MzM%3D&tl=4712&utm_source=ft&utm_medium=ft_2&utm_term=ft_2_unset&utm_content=ft_2_unset_video&utm_campaign=cf[/video]


MOD Version: 0.1.3

MOD Download: Here or here

Demo Board: http://twoedge.us/phpbb/viewtopic.php?f=69&p=977#p977

HowTo install:
Code: Select all
Copy root/video.php to your root forum dir (the one which contain viewtopic.php)

Go to the Administration Control Panel and navigate to the "Posting" tab, then
to the "BBCodes" section. Click the "Add a new BBCode" button. The following
page is where you are to enter the information for the new BBCode.

    (1) In the "BBCode usage" area, enter the following:
    [video]{URL}[/video]

    (2) In the "HTML replacement" area, enter the following:
    <script type="text/javascript" src="video.php?link={URL}"></script>

    (3) In the "Help line" area, enter the following:
    Note: [video]link[/video]

    (4) In the "Settings" area, check the box for "Display on posting page" if
        you want a "video" button placed alongside the other BBCode buttons.

When that's all filled out, click "Submit".


Version 0.0.0
Initial Release
Version 0.0.1
Added MySpace and StarsClips.net
Fixed an issue with dailymotion
Version 0.0.2
Removed unwanted services link (Now this bbcode will return only video :) )
Some bugfixes
Version 0.0.3
Added Yahoo
Version 0.0.4
Added Photobucket
Added FileFront :D
Version 0.0.5
Fixed Photobucket
Added Stage6, Veoh and Vidilife
Version 0.0.6
Added GameTrailers, Vidiac, Gamespot, Megavideo and Vimeo
Version 0.0.7
Fixed GameTrailers
Added Gamevideos
Added some internal vars
Version 0.0.8
Fixed Myspace
Added Tu.tv and Godtube
Version 0.0.9
Fixed Youtube (issue linked to myspace fix -_-)
Version 0.1.0
Re-fixed Myspace (added support for myspacetv.com links)
Version 0.1.1
Fixed support for php4
Version 0.1.2
Re-wrote all the code
Fixed issues with some videos hosting
Version 0.1.3
Added Myvideo, CollegeHumor, ComedyCentral, Slideshare, Revver, Sevenload, Clipfish

Author: Me :P (Fraev or Framp, it depends from the boards)

Needed: allow_url_fopen = On ( needed for some video website)
How it works: The script simply extract the id video from the link inserted and return the proper "embed code" replacing the video id.
For some websites (Dailymotion, Yahoo, Photobucket, Filesfront, Vidilife, Gamespot, Megavideo, Gamevideos, Tu.tv and Slideshare) the script makes a connection to the video page and extract the "embed code" (that's why you need allow_url_fopen enabled).

About version 0.1.2:
I've rewrote all the script to make it use regex instead *a lot* of explode.
I've also tested the flash players syntax on konqueror, safari, firefox and ie and the script seems to work quite well.

IMPORTANT:
If you experience any problems remember the following things:
1. For Dailymotion, Yahoo, Photobucket, Filesfront, Vidilife, Gamespot, Megavideo, Gamevideos, Tu.tv and Slideshare you need allow_url_fopen enabled
2. Websites may change really rapidly so it may be a change in how sites broadcast videos.
3. Sometimes servers don't have enough bandwidth to connect to video servers and they fail.
4. Loading too many videos in the same page can be quite annoying for the user and some browsers don't handle very well too many flash players at the same time.
5. To test the script out of phpbb you can go with your browser to http://mysite/myforumpath/video.php?debug=1&link=myvideolink.

Add video support: To add support to other websites you can add an array into $values array at line 13
The array you've to create will contain 2 fields:
The first one is a regex that the link inserted has to match. In this regex the id video (optional) has to be grouped by using ( ) ('brackets').
The second one is the "embed code" you can usually found on the video page.
You can use 3 variables to define the embed code:
{ID_VIDEO} => will be replaced with the ID VIDEO retrieved by the first element of the array
{LINK} => will be replaced with the link provided by the user
{DOWNLOADurl%regex%function1|function2|...} => will be replaced with the value defined by regex in the first brackets, founded in the html code of the page url. Before returning the value, function1, function2, etc will be executed passing the value as the first and unique element. Functions are optional.
If url is not defined the script will use {LINK}.
You need allow_url_fopen enabled to use this variable.
The regex used in the script are compatible with preg_match

I'll create a website where users can create and submit their "video support arrays" as soon as I can
Let me know what you think ;)
If you have any suggestions or problems post it in this topic
Bye
Last edited by Fraev on Fri Oct 10, 2008 3:02 pm, edited 46 times in total.
Fraev
Registered User
 
Posts: 62
Joined: Mon Jan 07, 2008 9:22 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby 319 » Sun Jan 13, 2008 5:17 pm

This the great Mod. Big Thanx!!!
319
Registered User
 
Posts: 146
Joined: Fri Dec 21, 2007 12:47 am

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby Twent » Sun Jan 13, 2008 5:31 pm

Looks like your demo goes to a warez site :?
Twent
Registered User
 
Posts: 28
Joined: Sun Jan 13, 2008 11:06 am

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby Fraev » Sun Jan 13, 2008 7:51 pm

Well, that's the first forum on which I've installed this bbcode :)

EDIT: Oh, I didn't read the rules, sorry
Now I'll install on another board.
Last edited by Fraev on Mon Jun 09, 2008 2:45 pm, edited 1 time in total.
Fraev
Registered User
 
Posts: 62
Joined: Mon Jan 07, 2008 9:22 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby tupeu » Mon Jan 14, 2008 12:06 am

Twent wrote:Looks like your demo goes to a warez site :?

no demo :/

PS what is "warez" ?
tupeu
Registered User
 
Posts: 320
Joined: Wed Jul 25, 2007 5:47 pm
Location: roFLmania

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby WhiteWolfSix » Mon Jan 14, 2008 7:46 am

tupeu wrote:PS what is "warez" ?

http://en.wikipedia.org/wiki/Warez
Image
WhiteWolfSix (WW6)
User avatar
WhiteWolfSix
Registered User
 
Posts: 259
Joined: Sun May 15, 2005 5:43 am

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby Fraev » Mon Jan 14, 2008 4:35 pm

Here I've installed a demo board

Regards
Fraev
Fraev
Registered User
 
Posts: 62
Joined: Mon Jan 07, 2008 9:22 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby colorhim » Mon Jan 14, 2008 5:06 pm

you should add greybox like i did on my site....

example: http://sfpirates.net/daft-punk-harder,- ... -t101.html
AJAXIM - PHPBB3 BRIDGE COMING SOON
My TV Show: EMOtv
Free phpBB3.0.4/myBB Hosting: FireForumz.com
My Personal Site: emoruffino.com
User avatar
colorhim
Registered User
 
Posts: 118
Joined: Sat Nov 04, 2006 6:20 pm
Location: KY

REQUEST FEATURE?

Postby yexusbeliever » Mon Jan 14, 2008 7:07 pm

Thanks for a wonderful mod. I've not yet try it out. I probably only use youtube and one other if you add it into your mod. http://www.myspacetv.com

Requesting for you to add myspacetv too if you can?
User avatar
yexusbeliever
Registered User
 
Posts: 580
Joined: Mon Dec 08, 2003 8:49 pm
Location: Olympus phpBB3

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby gph » Tue Jan 15, 2008 3:01 pm

This works flawlessly! Great work!

Any chance of you adding starsclips.net to the list? Pretty pur-lease? :-)

Thanks!
gph
Registered User
 
Posts: 66
Joined: Tue Jul 10, 2007 9:16 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Metacafe)

Postby Fraev » Tue Jan 15, 2008 7:35 pm

Added myspace and starclips ;)

@colorhim: I think greyboxes are a little invasive
Bye :)


EDIT: myspace isn't actually working... trying to fix this...
EDIT2: Fixed :)
Fraev
Registered User
 
Posts: 62
Joined: Mon Jan 07, 2008 9:22 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

Postby Janet007 » Fri Jan 25, 2008 1:45 pm

Cant open the install Video BBCode file.

Code: Select all
The system cannot locate the resource specified.


Please help
Janet007
Registered User
 
Posts: 4
Joined: Sun Jan 29, 2006 10:19 pm
Location: NL

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

Postby xxxopenxxx » Fri Jan 25, 2008 4:08 pm

Great mod, is it possible to add:

file front (http://www.filefront.com/)
and
yahoo video (http://video.yahoo.com/)

Please and thank you!
xxxopenxxx
Registered User
 
Posts: 34
Joined: Thu Jan 10, 2008 11:07 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

Postby Fraev » Fri Jan 25, 2008 5:25 pm

Janet007 wrote:Cant open the install Video BBCode file.

Code: Select all
The system cannot locate the resource specified.


Please help


it's strange, i've just checked the archive and it's working flawlessy
I think it's a problem with your system

I'll add filefront and yahoo asap
Last edited by Fraev on Sat Jan 26, 2008 7:47 pm, edited 1 time in total.
Fraev
Registered User
 
Posts: 62
Joined: Mon Jan 07, 2008 9:22 pm

Re: [BETA] Video BBCODE (Youtube, GVideo, DailyMotion,Etc)

Postby KidneyBoy » Sat Jan 26, 2008 3:04 pm

I'm getting the same error. I'm trying to use IE 7 to open it. For whatever reason, I can open everybody else's XML file, but I get that same error listed above.....
KidneyBoy
Registered User
 
Posts: 78
Joined: Thu Jan 22, 2004 1:04 am

Next

Return to [3.0.x] MODs in Development

Who is online

Users browsing this forum: fresose, Lufred, NK Ad, RMcGirr83 and 29 guests