Advertisement:

Author Topic: YouTube BBC Tag (XHTML Compliant)  (Read 210398 times)

Offline matjazz

  • Semi-Newbie
  • *
  • Posts: 81
    • EUmoto motorcycle and scooter portal
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #20 on: January 04, 2007, 12:52:56 PM »
Code: [Select]
[youtube=425,350]gRWIyvBSjtk[/youtube]
http://www.youtube.com/watch?v=gRWIyvBSjtk

The end of address  ;)

Offline buhaychat.com

  • Semi-Newbie
  • *
  • Posts: 49
  • SMF Rocks!
    • BuhayCHAT Online Community for Filipino Adult Chatters
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #21 on: January 04, 2007, 01:18:18 PM »
ooh there you you go! worky for me now!

thanks! :)

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #22 on: January 04, 2007, 03:41:46 PM »
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.

Offline NYRiders

  • Newbie
  • *
  • Posts: 3
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #23 on: January 04, 2007, 03:48:53 PM »
Works great in our forum (hxxp:www.nyriders.com [nonactive]) 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]

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #24 on: January 04, 2007, 04:00:36 PM »

Offline NYRiders

  • Newbie
  • *
  • Posts: 3
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #25 on: January 04, 2007, 06:08:20 PM »
So it looks like we need to update our Firefox browsers to 2.0.
Thank you.


Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #26 on: January 04, 2007, 06:35:30 PM »
So it looks like we need to update our Firefox browsers to 2.0.
Thank you.

I'm afraid so.  :(

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #27 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:
Code: [Select]
[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.

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #28 on: January 04, 2007, 11:21:34 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:
Code: [Select]
[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:
Code: [Select]
'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:
Code: [Select]
'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:
Code: [Select]
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
...and replace with:
Code: [Select]
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,055
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #29 on: January 05, 2007, 01:46:20 PM »
Sweet!   Thanx for the mod. Very useful ;D

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #30 on: January 05, 2007, 02:21:06 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

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,055
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #31 on: January 05, 2007, 02:38:22 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! 

Offline Fiery

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,221
  • Gender: Male
  • Community Builder
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #32 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

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #33 on: January 06, 2007, 12:29:02 AM »
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.  :)

Offline Alexmosutheskypirate

  • Semi-Newbie
  • *
  • Posts: 16
  • Gender: Male
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #34 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


The random hand of fate delivers me to you.

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #35 on: January 06, 2007, 12:54:18 PM »
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.  :)

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #36 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]
[youtube]VPyyEibTqmo[/youtube]

Wouldnt uninstall either.  Test Failed.
« Last Edit: January 06, 2007, 12:56:49 PM by karlbenson »

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #37 on: January 06, 2007, 01:00:10 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]
[youtube]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.

Offline Fiery

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,221
  • Gender: Male
  • Community Builder
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #38 on: January 06, 2007, 01:05:57 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]
[youtube]VPyyEibTqmo[/youtube]

Wouldnt uninstall either.  Test Failed.

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

That worked for me



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.

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #39 on: January 06, 2007, 01:14:54 PM »
I've managed to get the other YouTube working now with no probs.