News:

Wondering if this will always be free?  See why free is better.

Main Menu

YouTube BBC Tag (XHTML Compliant)

Started by Daniel Marquard, January 03, 2007, 09:18:19 AM

Previous topic - Next topic

matjazz



Daniel Marquard

Quote from: matthen on January 04, 2007, 08:56:30 AM
I added this mod to my site, and it works fine for everyone, except for people using firefox. Though firefox 2 seems to have no problems with it.

Here is an example thread:

http://www.poweriserpages.com/forum/index.php/topic,1003.0.html

What changes should I make to the code to make it work for them?

Thanks,
Matt

The default <embed> code for YouTube videos, as posted on each video's YouTube page, is not XHTML compliant.  I took that code and revamped it to be XHTML compliant, apparently at the cost of browser compatibility.  I'm not aware of another way to format the code to be accepted in all borwsers and still retain its XHTML validity.  Any ideas are welcome for compatibility, but the goal here will still be to keep the code XHTML transitional.

NYRiders

Quote from: Marlon on January 04, 2007, 01:17:42 AM
Quote from: NYRiders on January 03, 2007, 11:20:05 PM
Works great in our forum (www.nyriders.com) with IE, cant get it to work with Firefox (1.5.0.9) though....
Any suggestions?

Can you give me an example topic where the mod is used?

hxxp:www.nyriders.com/board/index.php?topic=402.msg2185 [nonactive]


NYRiders

So it looks like we need to update our Firefox browsers to 2.0.
Thank you.


Daniel Marquard

Quote from: NYRiders on January 04, 2007, 06:08:20 PM
So it looks like we need to update our Firefox browsers to 2.0.
Thank you.

I'm afraid so.  :(

4fit?

Nice, I like it.  However, is there a way that we can tweak the code to make it default to 425,350 in the attributes?  I would like my users to simply be able to enter the tags and it automatically make it 425x350.  Something like:
[youtube]SVaQ3bkLC28[/youtube]
I know that clicking the BBC button automatically places the attributes in the tag, but the majority of my users manually type the code.

Daniel Marquard

Quote from: 4fit? on January 04, 2007, 10:46:55 PM
Nice, I like it.  However, is there a way that we can tweak the code to make it default to 425,350 in the attributes?  I would like my users to simply be able to enter the tags and it automatically make it 425x350.  Something like:
[youtube]SVaQ3bkLC28[/youtube]
I know that clicking the BBC button automatically places the attributes in the tag, but the majority of my users manually type the code.

There is a method of doing that; unfortunately, at the cost of the inability to define custom dimensions upon implementing the changes.

In Subs.php, find:
'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object>',


...and replace with:
'content' => '<object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object>',

In Post.template.php, find:
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

...and replace with:
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

Mick.

Sweet!   Thanx for the mod. Very useful ;D

RoarinRow

Quote from: BlueDevil on January 05, 2007, 01:46:20 PM
Sweet!   Thanx for the mod. Very useful ;D

Definitely!  It works better than the other YouTube mods that I could never get to work   8)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Mick.

Quote from: RoarinRow on January 05, 2007, 02:21:06 PM
Quote from: BlueDevil on January 05, 2007, 01:46:20 PM
Sweet!   Thanx for the mod. Very useful ;D

Definitely!  It works better than the other YouTube mods that I could never get to work   8)

Hahaha!! same here! 

Fiery

Very nice mod.  I think it would be cool if when someone pushed the youtube button and a little popup came up that allowed them to either put the entire youtube url or just the youtube video code.

This would make it easier for those that are not the best at using BBC code.

Just a thought

Daniel Marquard

Quote from: pmp6nl on January 05, 2007, 11:53:38 PM
Very nice mod.  I think it would be cool if when someone pushed the youtube button and a little popup came up that allowed them to either put the entire youtube url or just the youtube video code.

This would make it easier for those that are not the best at using BBC code.

Just a thought

Doesn't seem like a bad idea at all.  It will be considered if I ever release an update to this mod.  :)

Alexmosutheskypirate

yup..very nice..working perfectly..
the easyest way to do it...would be to tell the mod to actually read only the last 11 characters of...whatever you input..
as the youtube code is http blabla+11 characters..the last 11 characters...ae the important ones
this should be ...easy...shouldn't it ?

and it would still work if you input the 11 chracters..only..cause all of them would be the last 11 chars :D

thanks for the mod

saludos :D


The random hand of fate delivers me to you.

Daniel Marquard

Quote from: Alexmosutheskypirate on January 06, 2007, 03:38:18 AM
yup..very nice..working perfectly..
the easyest way to do it...would be to tell the mod to actually read only the last 11 characters of...whatever you input..
as the youtube code is http blabla+11 characters..the last 11 characters...ae the important ones
this should be ...easy...shouldn't it ?

and it would still work if you input the 11 chracters..only..cause all of them would be the last 11 chars :D

thanks for the mod

saludos :D

As long you YouTube agrees to *never* change the number of characters in their video IDs, I see no wrong with implementing it in the next version.  Thanks for the idea.  :)

karlbenson

#36
For clean 1.1.1 install wouldnt work (default skin) for me.

Installed (said successful) but no youtube button, bbcode didnt work when tried various
[youtube=VPyyEibTqmo]200,200[/youtube]
[youtube=200,250]VPyyEibTqmo[/youtube]


Wouldnt uninstall either.  Test Failed.

Daniel Marquard

Quote from: karlbenson on January 06, 2007, 12:55:06 PM
For clean 1.1.1 install wouldnt work (default skin) for me.

Installed (said successful) but no youtube button, bbcode didnt work when tried various
[youtube=VPyyEibTqmo]200,200[/youtube]
[youtube=200,250]VPyyEibTqmo[/youtube]


Wouldnt uninstall either.  Test Failed.

I really can't explain this.  Make sure you've cleared your cache?  No one else has reported the problem you're having with the mod, and on a clean install of 1.1.1, no less.

Fiery

Quote from: karlbenson on January 06, 2007, 12:55:06 PM
For clean 1.1.1 install wouldnt work (default skin) for me.

Installed (said successful) but no youtube button, bbcode didnt work when tried various
[youtube=VPyyEibTqmo]200,200[/youtube]
[youtube=200,250]VPyyEibTqmo[/youtube]


Wouldnt uninstall either.  Test Failed.

Try copying the youtube image to: /themes/your-theme/images/bbc

That worked for me




Quote from: Marlon on January 06, 2007, 12:29:02 AM
Quote from: pmp6nl on January 05, 2007, 11:53:38 PM
Very nice mod.  I think it would be cool if when someone pushed the youtube button and a little popup came up that allowed them to either put the entire youtube url or just the youtube video code.

This would make it easier for those that are not the best at using BBC code.

Just a thought

Doesn't seem like a bad idea at all.  It will be considered if I ever release an update to this mod.  :)

Sounds good.

karlbenson

I've managed to get the other YouTube working now with no probs.

Advertisement: