miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /   

YouTube BB code

Page  Page 4 of 5:  « Previous  1  2  3  4  5  Next »  
Author tom322
Registered
#46 | Posted: 2 Jul 2007 16:55 | Edited by: tom322 
I think users find this code quite useful. :)

But now it seems YouTube went global and uses subdomains for different countries. For example, www.youtube.it (Italy) becomes it.youtube.com; www.youtube.co.uk is uk.youtube.com, www.youtube.fr is fr.youtube.com, www.youtube.pl is pl.youtube.com etc.

Automatically, the youtube code becomes http://XY.youtube.com/watch?v=SomeThing

That's why the current solution doesn't work with subdomains. Would it be possible to rewrite it so that it uses subdomains correctly?

Also - I think it is needed to make sure the code works without www. before www.youtube.com too because many users just type in youtube.com and the solution doesn't work then.

Thanks,

Tom

Author Paul
Lead Developer
#47 | Posted: 4 Jul 2007 04:15 | Edited by: Paul 
tom322

Thanks for reporting that.

What I the mostly hate when developing something related to 3rd party programs, is that 3rd party developers so often make cruicial changes in their software which makes your own work incompatible, and you need to work on it again and again with no profits.

I have fixed the codes package (the fix is only for bb_plugins' encode() function).

In general, strange thing I've noticed that YouTube provides direct URL containing subdomain, but the HTML code still refers to the original www version. For example, if the video is on pl.youtube.com, the source to embed still refers to www.youtube.com. I have fixed the code so whatever you enter as a subdomain - 'www' or 'international_subdomain' or 'nothing', it always embeds the source with www.

Hope it will work. Enjoy :-)

Author tom322
Registered
#48 | Posted: 4 Jul 2007 11:44 
Yes, it sucks (+ other developers' software can be buggy too)... Now it works good on all youtube pages - let's hope they don't change their codes any more ;). Thanks,

Tom

Author Gafudo
Guest
#49 | Posted: 11 Oct 2007 19:15 
I've provided the short solution in this package:

http://www.minibb.com/forums/storage/mods/youtube_codes.zip



So the downloadable pack needed a lot of changes. Is it mended now? I mean, if I download it now will work? If no, are you going to put a new one?

Thanks.

Author tom322
Registered
#50 | Posted: 11 Oct 2007 22:50 
It works correctly now.

Author rix
Guest
#51 | Posted: 30 Nov 2008 14:57 
hi thanks for all the advice,

i've got this on my forum now,

Author ripper
Registered
#52 | Posted: 11 Aug 2009 14:08 
Hello,

I noticed that when viewing video there is no full screen button. Is there a way to make embedded video play full screen?

Thanks

Author tom322
Registered
#53 | Posted: 11 Aug 2009 14:13 
ripper:
Is there a way to make embedded video play full screen?

I think you should ask Google/Youtube about that.. :} Or try to right-click on the video and there may be some options.

Author Paul
Lead Developer
#54 | Posted: 12 Aug 2009 02:55 
ripper
It really depends on what kind of options YouTube provides in embedded videos. miniBB just uses their embed code, it doesn't control anything. If you've seen examples over the web where embedded YouTube videos have a full-screen control, show it to us. Maybe there is kind of option we could put in the code.

Overall, you just need to move the mouse over the left-top corner, and there the video title appears... clicking on it will open the original YouTube page, were all the controls incl. full-screen are present.

Author ripper
Registered
#55 | Posted: 12 Aug 2009 03:27 | Edited by: ripper 
Yes, I have seen this option in many websites. Here is one website, which explains how to customize the code. I tried customizing it also in minibb as it is shown in the example, but it doesn't work.

Also there are many more options, like High Quality, etc.

Best regards

Author Paul
Lead Developer
#56 | Posted: 12 Aug 2009 04:28 | Edited by: Paul 
I've checked the website - well, whatever you need to add are the following additional tags and refs to the embedded code:

* <param name="allowFullScreen" value="true"></param>

* allowfullscreen="true" value to the <embed src...> tag

* &fs=1 to all the URLs appearing in the code.

I've tried it for miniBB solution and it purely works... here are the codes:

- for enCodeBB function:

/* YouTube code */
$pattern[]="/\[youtube=http:\/(\/www\.|\/[a-z]+\.|\/)youtube\.com\/watch\?v=([a-zA-Z0-9-_]+)(.*)\]/i";
$replacement[]="<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\2&fs=1\"></param><param name=\"wmode\" value=\"transparent\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://www.youtube.com/v/\\2&fs=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"344\" allowfullscreen=\"true\"></embed></object>";
/* --YouTube code */

- for deCodeBB function:

/* YouTube code */
$pattern[]="/<object width=\"[0-9]+\" height=\"[0-9]+\"><param name=\"movie\" value=\"http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)&fs=1\"><\/param><param name=\"wmode\" value=\"transparent\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><embed src=\"http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)&fs=1\" type=\"application\/x-shockwave-flash\" wmode=\"transparent\" width=\"[0-9]+\" height=\"[0-9]+\" allowfullscreen=\"true\"><\/embed><\/object>/i";
$replacement[]="[youtube=http://www.youtube.com/watch?v=\\1]";
/* --YouTube code */


Author ripper
Registered
#57 | Posted: 12 Aug 2009 05:15 
It works. Thank you.

Author ripper
Registered
#58 | Posted: 12 Aug 2009 10:40 
Have one more question, I don't want related videos to be displayed. Could you please explain again what else needs to be changed?

Author Paul
Lead Developer
#59 | Posted: 12 Aug 2009 10:45 | Edited by: Paul 
I think you need to add the parameter &rel=0 to the embedded URL strings following the example above.

Author ripper
Registered
#60 | Posted: 12 Aug 2009 11:29 
Thanks

Page  Page 4 of 5:  « Previous  1  2  3  4  5  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions / YouTube BB code Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB