[2.0.19] Youtube Video BBCode

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
125
64%
Very Good
23
12%
Good
21
11%
Fair
5
3%
Poor
21
11%
 
Total votes: 195

skaloumbakas
Registered User
Posts: 179
Joined: Wed Sep 25, 2002 11:26 am
Location: Athens Hellas

How about a DailyMotion Video BBCode MOD???

Post by skaloumbakas »

I have managed to make YouTube tag buttons and the MOD is fully functional now!!! :razz:

How about a DailyMotion Video BBCode MOD???

I suspect the edits will be relative. The only thing I am not sure about, is what will be the equivalent code for:

Code: Select all

#
#-----[ OPEN includes/bbcode.php ]
#
#
#-----[ FIND ]
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]
#
$bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']);
$bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['youtube_link'], $bbcode_tpl['youtube']);
#
#-----[ FIND ]
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]
#
// [youtube]YouTube URL[/youtube] code..
$patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
$replacements[] = $bbcode_tpl['youtube'];
If anybody is interested to give it a little thought, the embedded codes from the YouTube and the DailyMotion are the following (using a real example of a film uploaded in both web-sites)

Code: Select all

YOUTUBE
http://www.youtube.com/watch?v=xs1aUws0Lrs (URL link)

<object width="425" height="350"> (Code for embedding)
<param name="movie" value="http://www.youtube.com/v/xs1aUws0Lrs"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/xs1aUws0Lrs" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>
</object>


DAILYMOTION
http://www.dailymotion.com/video/xvkes_film-about-audiophile-club-of-athen (URL link)

<object width="425" height="335"> (Code for embedding)
<param name="movie" value="http://www.dailymotion.com/swf/3GLmZkQaqcP0F6b8E"></param>
<param name="allowfullscreen" value="true"></param>
<embed src="http://www.dailymotion.com/swf/3GLmZkQaqcP0F6b8E" type="application/x-shockwave-flash" width="425" height="335" allowfullscreen=true></embed>
</object>
Sorry for insisting, but I find very interesting films in www.DailyMotion.com too!!!
Christos Skaloumbakas
pwoens
Registered User
Posts: 3
Joined: Wed Dec 27, 2006 2:54 am
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by pwoens »

the link seems to be broken....can someone post the correct link for the files?? that would be awesome!! thanks
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by Raimon »

pwoens wrote: the link seems to be broken....can someone post the correct link for the files?? that would be awesome!! thanks


Here you go,
http://www.phpbb.com/files/mods/youtube-1.0.1.mod ;-)
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me @ www.raimon.nl for fair prices and good service!
pwoens
Registered User
Posts: 3
Joined: Wed Dec 27, 2006 2:54 am
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by pwoens »

Raimon wrote:
pwoens wrote: the link seems to be broken....can someone post the correct link for the files?? that would be awesome!! thanks


Here you go,
http://www.phpbb.com/files/mods/youtube-1.0.1.mod ;-)



thanks...updated the 4 files accordingly but dont get the tags to show?? working on it now...thanks again!!
pwoens
Registered User
Posts: 3
Joined: Wed Dec 27, 2006 2:54 am
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by pwoens »

So I double checked that I updated everything correctly but do not get the tag for youtube to show up. I can manually put in a [youtube][/youtube] and get em to embed but no tag??

here is the code for the posting body tpl
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]',','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[youtube]','[/youtube]');
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by Raimon »

Have you the youtube mod en the multiple bbcode correctly installed?
That correctly your posting_body have you aslo correctly modifed you bbcode.tpl and bbcode.php?
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me @ www.raimon.nl for fair prices and good service!
MIAPLAYA
Registered User
Posts: 19
Joined: Wed Mar 28, 2007 4:12 am

Re: [2.0.19] Youtube Video BBCode

Post by MIAPLAYA »

So I installed both this mod and the multi BB mod but nothing doing on the youtube tags. Right now I'm doing this on my test server but I'd like to port the mods over to my live server in the morning. The youtube tags do work when put into the post but I can't get the tags to come up on the posting screen. One thing I did notice is that the following sections of the youube mod I could not find corresponding entries for in my phpBB2 directories.

Code: Select all

#
#-----[ OPEN ]---------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]---------------------------------
#
$EMBB_widths = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
 array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'60'

#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'YouTube'
s.latif
Registered User
Posts: 81
Joined: Thu Mar 29, 2007 8:17 pm

Re: [2.0.19] Youtube Video BBCode

Post by s.latif »

hi

can somebody PLLLLLLEEEEEAAAASSSSSSEEEEEEE help me, iv never installed mods before and i have no idea wot u guys r talking about!!

how do i download this mod and how do i install it?? i already have an FTP software but i dont know anything about mods!!

please please please please please please help!!!
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by Raimon »

Yhe download links from this mod is: http://www.phpbb.com/files/mods/youtube-1.0.1.mod
And you need also installed this mod: http://www.phpbb.com/files/mods/multi_bbcode-140c.zip

And before you begin on this modification i recomand you to read this article: http://www.neothermic.com/kb/article150.html how you install mods.
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me @ www.raimon.nl for fair prices and good service!
User avatar
daremo123
Registered User
Posts: 1
Joined: Fri Mar 30, 2007 7:24 pm
Location: Cowlumbus, Ohio
Contact:

Re: [2.0.19] Youtube Video BBCode

Post by daremo123 »

Ive been trying to add some functionality to this mod for other video sites such as google and gamevideos. The problem I am having is with my lack of PHP knowledge.

I do not understand this statement from /includes/bbcode.php

Code: Select all

 // [youtube]YouTube URL[/youtube] code..
        $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
        $replacements[] = $bbcode_tpl['youtube'];
I know the basic idea is to remove the video ID and pass it along. I just do not understand how this works. Looks like gamevideos videos use a similar video id.

http://www.gamevideos.com/video/id/10301

I know someone could write up what I need to do, but could anyone also expain that first line of code. I would like to be able to write other additions to this sometime in the future. The only thing I can figure out is that the 0-9A-Za-a-_ prob means take any character up to 11 digits long... The rest is greek to me 8O
whiskey_peat
Registered User
Posts: 32
Joined: Mon Mar 26, 2007 1:48 pm

Re: [2.0.19] Youtube Video BBCode

Post by whiskey_peat »

Great MOD ! Works fine with 2.0.21 too :)
mimiaow
Registered User
Posts: 1
Joined: Thu Mar 29, 2007 2:34 am

Re: [2.0.19] Youtube Video BBCode

Post by mimiaow »

nm I figured out my problem
MIAPLAYA
Registered User
Posts: 19
Joined: Wed Mar 28, 2007 4:12 am

Re: [2.0.19] Youtube Video BBCode

Post by MIAPLAYA »

I figured mine out too. This mod is working perfectly now. Thanks!! Great mod!!
User avatar
vishakh369
Registered User
Posts: 99
Joined: Fri Jun 23, 2006 7:52 pm

Re: [2.0.19] Youtube Video BBCode

Post by vishakh369 »

can you help me find the google video bbcode?
Need any help with phpBB 2 or 3? Ask me!!!
YoYo-Pete
Registered User
Posts: 17
Joined: Tue Apr 03, 2007 8:04 pm
Location: T-Town, OH

Re:

Post by YoYo-Pete »

m3mn0n- wrote: To get this mod to easily work with other video sharing sites... simply edit where it says "youtube" and replace it with say googlevideo, metacafe, revver, ifilm, grouper, & etc.

For the sites I mentioned, their embed codes are like this:

Code: Select all

<!-- BEGIN gvideo -->
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId={GVIDEOID}&hl=en" flashvars=""> </embed>
<!-- END gvideo -->

<!-- BEGIN metacafe -->
<embed src="http://www.metacafe.com/fplayer/{MCID}.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
<!-- END metacafe -->

<!-- BEGIN grouper -->
<embed allowScriptAccess="never" allowFullScreen="true"  src="http://grouper.com/mtg/mtgPlayer.swf?v=1.7" width="400" height="325" quality="high" scale="noScale" FlashVars="ap=0&rf=-1&vfver=8&extid=-1&extsite=-1&id={GROUPERID}&ml=o%3d7%26fr%3d{GROUPERID}%26fx%3d" wmode="window" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>
<!-- END grouper -->

<!-- BEGIN ifilm -->
<embed width="448" height="365" src="http://www.ifilm.com/efp" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="flvbaseclip={IFILMID}&"> </embed>
<!-- END ifilm -->

<!-- BEGIN revver -->
<script src="http://flash.revver.com/player/1.0/player.js?mediaId:{REVVERID};affiliateId:0;height:392;width:480;" type="text/javascript"></script>
<!-- END revver -->
I just added them all to my forum and it works great. Hope this helps someone.

note: in metacafe, there is actually a slash in the code
and also, I simply did the code instead of the whole URL.


I need the patterns and replacements for these to go into the bbcode.php page. I'm not so good at the regular expression stuff.
Post Reply

Return to “[2.0.x] MOD Database Releases”