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
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
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
