Warning: The author of this contribution does not provide support for it anymore.

Advanced BBCode Box 3

youtube and bbvideo - Advanced BBCode Box 3

youtube and bbvideo

by huddy » Wed Oct 15, 2014 2:18 pm

Firstly great mod so far.. Got this in test and very happy so far but.. I have one showstopper at the moment.

Currently, our forum allows the youtube bbcode.. the syntax is

Code: Select all

[youtube]{IDENTIFIER}[/youtube] 



now the ABBCB3 doesn't support you tube which is a problem for legacy posts.. I don't want to go through changing 100's of existing posts so they show correctly.. So I really need the legacy youtube bbcode working but i notice you can't remove it from the list.. Any suggestions?

Secondly, the BBvideo BBcode doesn't work anyway so presenetly, we can't embed videos using either the youtube or bbvideo bbcodes.

Thoughts please?

edit - using Version:3.0.13 on PHPBB 3.0.12
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact:

Re: youtube and bbvideo

by VSE » Wed Oct 15, 2014 5:10 pm

BBVideo works, it takes the full URL from the address bar.

just go into the install_abbc3.php script and hack out of it all the youtube codes before you install it. They appear a few times. Something like:

Code: Select all

         'youtube'      => array(
            'bbcode_tag'         => 'youtube',
            'bbcode_order'         => 74,
            'bbcode_id'            => 1,
            'bbcode_helpline'      => 'ABBC3_YOUTUBE_TIP',
            'bbcode_match'         => '[youtube]{URL}[/youtube]',
            'bbcode_tpl'         => '<a src="{URL}">{URL}</a>',
            'first_pass_match'      => '!\[youtube\]http://((.*?)?)youtube.com/watch\?v\=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]!ies',
            'first_pass_replace'   => '\'[youtube:$uid]http://${1}youtube.com/watch?v=${3}[/youtube:$uid]\'',
            'second_pass_match'      => '!\[youtube:$uid\]http://((.*?)?)youtube.com/watch\?v\=([0-9A-Za-z-_]{11})[^[]*\[/youtube:$uid\]!sie',
            'second_pass_replace'   => "\$this->auto_embed_video('http://\${2}youtube.com/v/\${3}', '425', '350')",
            'display_on_posting'   => 0,
            'display_on_pm'         => 0,
            'display_on_sig'      => 0,
            'abbcode'            => 1,
            'bbcode_image'         => 'youtube.gif',
            'bbcode_group'         => '0',
         ),
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4680
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: youtube and bbvideo

by huddy » Wed Oct 15, 2014 7:07 pm

Thank you for the reply :)

Oddly, from another workstation the youtube bbcode works but the bbvideo still doesn't


Here's an example


Settings in ACP

Image


example topic

Image


result

http://mlgtestforum.midlifegamers.co.uk ... =10&t=1264

you see the bbvideo doesn't show but the youtube bbcode does???



On the other matter, I have already installed the mod, is there anything else i can do to remove the Youtube bbcode so i can add the original i have?

or

can i change the code anywhere so the member can specify just the video ID rather than the full address as that's what we have our current youtube bbcode set to. I don't need the bbvideo tbh.

I just need tis so that legacy embedded youtube clips are viewable.

Again, thank you for your help :)
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact:

Re: youtube and bbvideo

by huddy » Thu Oct 16, 2014 8:55 am

Seems that the spoil tag doesn't work either.. Has this mod been tested?

http://mlgtestforum.midlifegamers.co.uk ... =10&t=1265
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact:

Re: youtube and bbvideo

by huddy » Thu Oct 16, 2014 12:32 pm

Any ideas? It's a great shame because i'd love to have this on our boards.

edit i have just tried the mod on a clean installation.. the bbvideo works but it's not embedded.. is that correct? The spolier works too so there must be a conflict with another mod i have installed?

http://www.huddysworld.co.uk/testforum2 ... t=2&p=2#p2


However, the youtube bbcode still doesn't work.
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact:

Re: youtube and bbvideo

by huddy » Fri Oct 17, 2014 9:30 am

Update

Ok, i re-built the test system and applied the mod using automod.

personally, I can't see the any of the two embedded videos using bbvideo and youtube tags yet our members can.. So something with my setup? I'm behind a German server but that shouldn't make any difference because i can see the videos on youtube and on our live forum. Might have something to do with the flash?

Here's the test?

http://mlgtestforum.midlifegamers.co.uk ... =10&t=1303


The only other problem is I need to change the youtube syntax so that the members only have to enter the YouTube ID rather than the full URL address in order to support legacy posts. Any idea How i can do this..?

Thanks

edit

my guess it has something to with this code


Code: Select all

         'youtube.com' => array(
            'id'      => 43,
            'image'      => 'youtube.gif',
            'example'   => 'http://www.youtube.com/watch?v=sP4NMoJcFd4',
            'match'      => '#https?://(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)([^[]*)?#i', // matches every youtube URL
//            'replace'   => '<iframe width="{WIDTH}" height="{HEIGHT}" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>',
            'replace'   => 'http://www.youtube.com/v/$1?version=3&hl=en_US',
            'method'   => 'flash',
         ),
         'youtu.be' => array(


This is what we have in our bbcode for html setup.

Code: Select all

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/{IDENTIFIER}&rel=en&fs=1&color1=0x234900&color2=0xd4d4d4"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{IDENTIFIER}&rel=en&fs=1&color1=0x234900&color2=0xd4d4d4" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>


the example of that would be

[youtube]{IDENTIFIER}[/youtube]
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact:

Re: youtube and bbvideo

by VSE » Sat Oct 18, 2014 3:36 am

Once you have installed this MOD, as it says in its warning during the install, it will overwrite any existing bbcodes with the same name. So your old youtube bbcodes are broken. You could possibly go into your database and delete the yotube entry in the bbcodes table, and then recreate your old youtube as a custom bbcode, but your old posts will still be broken. So then you'll need to find phpBB's STK (Support Tool Kit) and use it's reparse all bbcodes feature on your forum.
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.
User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4680
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: youtube and bbvideo

by huddy » Tue Oct 21, 2014 3:02 pm

We've gone for the mod on the basis we'll have to change older youtube and spolier tags. Not a big deal but frustrating.
huddy
Registered User
Posts: 163
Joined: Fri Feb 21, 2014 12:21 pm
Location: Chelmsford UK
Contact: