I think generally that this is a usability bug. Requiring http:// for the youtube link to work seems kind of anal even though I understand how easy it is to include it. I just thought I'd let you know.
<iframe title="YouTube video player" width="736" height="444" src="http://www.youtube.com/embed/{TEXT}?hd=1" frameborder="0" allowfullscreen></iframe>
If any part of the URL is missing, like the "http://" bit, then BBcode thinks you have the wrong format and it won't display the video. It doesn't look clear to me if I can add conditional statements in these codes. I would love to fix this issue and do something like this...
<iframe title="YouTube video player" width="736" height="444" src="http://www.youtube.com/embed/{TEXT}?hd=1" frameborder="0" allowfullscreen></iframe>
If any part of the URL is missing, like the "http://" bit, then BBcode thinks you have the wrong format and it won't display the video. It doesn't look clear to me if I can add conditional statements in these codes. I would love to fix this issue and do something like this...
niniendowarrior wrote:I'm thinking this is running through regular expression, so you should be able to do something optional with the string used by the youtube tag.
Is there some API for BBCode?
It's definitely using some sort of regular expression thing to parse the string.
niniendowarrior wrote:I'm thinking this is running through regular expression, so you should be able to do something optional with the string used by the youtube tag.
Is there some API for BBCode?
It's definitely using some sort of regular expression thing to parse the string.
I'm not sure if there's an API for BBCode.
I'm not exactly grasping how the youtube tags were implemented. Can you put up a link on its implementation? I'm pretty sure it should be possible to do something like: