• Welcome to Simple Machines Community Forum. Please login or sign up.

Yet Another YouTube BBCode Tag

Started by dougiefresh, December 10, 2014, 06:09:01 PM

Previous topic - Next topic

NekoJonez

Score!

Man, I feel like your personal plug-in testing friend :3.

If you need anything to test, you know where I am. ;)
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Rk2910

Another nice mod Doug  8)
Observation: If I click the youtube button on a bare post it only adds the front part of the code [youtube] and not the end code.  If I paste the URL into a post, then highlight the url and then click the youtube button it does wrap the url properly.

Thanks again Doug.

Geor'G

Not all links work.
These work:
[youtube]fA4cphzsjn8[/youtube]
[youtube]http://youtu.be/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/embed/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/watch?v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/v/fA4cphzsjn8[/youtube]


Do not work:
[youtube]http://www.youtube.com/?v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/e/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/user/username#p/u/11/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/0/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/watch?feature=player_embedded&v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/?feature=player_embedded&v=fA4cphzsjn8[/youtube]

Rk2910

Thanks Geor'G,  I'll post those in the thread I have going .

dougiefresh

Quote from: Geor'G on January 09, 2015, 06:20:52 AM
Not all links work.
These work:
[youtube]fA4cphzsjn8[/youtube]
[youtube]http://youtu.be/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/embed/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/watch?v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/v/fA4cphzsjn8[/youtube]


Do not work:
[youtube]http://www.youtube.com/?v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/e/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/user/username#p/u/11/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/0/fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/watch?feature=player_embedded&v=fA4cphzsjn8[/youtube]
[youtube]http://www.youtube.com/?feature=player_embedded&v=fA4cphzsjn8[/youtube]

Thank you for reporting this.  I will investigate these issues.....




Quote from: Rk2910 on January 09, 2015, 07:59:39 PM
Thanks Geor'G,  I'll post those in the thread I have going .
Um....  THIS is the support topic here at Simple Machines for this mod.  I don't look other places for support issues....

That having been said, where is the thread you have going?  Links would be helpful....

Rk2910

Quote from: dougiefresh on January 09, 2015, 08:12:58 PM
Quote from: Rk2910 on January 09, 2015, 07:59:39 PM
Thanks Geor'G,  I'll post those in the thread I have going .
Um....  THIS is the support topic here at Simple Machines for this mod.  I don't look other places for support issues....

That having been said, where is the thread you have going?  Links would be helpful....
No other thread here - I have a thread on my site that explains how to use the youtube bbc so my members can take advantage of it.
Keep up the good work Doug.  Thx.

dougiefresh

 :o OH!!  Cool!  Sorry, I had misunderstood the purpose of the thread.  Thanks, Rk2910!

dougiefresh

Uploaded v1.7 - January 19th, 2015
o License change to Simplified BSD.  No functionality change.

bsnooch

great plugin, many thanks.
could you please add support for embedding playlists?

Ataru Moroboshi

Is there any easy way to change the position of bbc button in the editor?


Wkr

Is it possible in the future set the bbcode what only appears on a board?
For example: on a board called video or a id_board = XX
Thanks.

dougiefresh

I'm looking into these bug reports....

dougiefresh

Quote from: bsnooch on January 19, 2015, 10:01:51 PM
could you please add support for embedding playlists?
Let me see what I can do about this....

Quote from: Ataru Moroboshi on January 23, 2015, 04:38:28 AM
Is there any easy way to change the position of bbc button in the editor?
Not without editing the Subs-BBCode-YouTube.php file....  The ability to adjust the bccode buttons would be nice....

Quote from: Wkr on January 25, 2015, 03:17:28 PM
Is it possible in the future set the bbcode what only appears on a board?
For example: on a board called video or a id_board = XX
Thanks.
I can look into adding this feature, but bbcodes are generally available across the board on a forum.

dougiefresh

:o OMG!  Everybody, I'm so sorry about releasing this mod with clearly an erroneous statement that the regex expression for preg_match will covert the listed formats.  I took the statement about what it will cover from the Youtube I.D parsing for new URL formats page and did not look closely at the expression.  I want to apologize to everybody about this, and hope that you forgive me....

After some fighting with the regex expression, I have gotten my personal copy supports the following forms:
http://youtu.be/fA4cphzsjn8
http://www.youtube.com/embed/fA4cphzsjn8
http://www.youtube.com/watch?v=fA4cphzsjn8
http://www.youtube.com/v/fA4cphzsjn8
http://www.youtube.com/e/fA4cphzsjn8
http://www.youtube.com/p/fA4cphzsjn8
http://www.youtube.com/?v=fA4cphzsjn8

These currently do not work:
http://www.youtube.com/user/username#p/u/11/fA4cphzsjn8
http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/0/fA4cphzsjn8
http://www.youtube.com/watch?feature=player_embedded&v=fA4cphzsjn8
http://www.youtube.com/?feature=player_embedded&v=fA4cphzsjn8


I am continuing to test the changes I am making to the mod in order to get the last two forms to play, however, I'm not sure how I will get first two forms to work correctly....

dougiefresh

UPDATE: This mod has been updated so that it correctly validates the specified forms.  I don't have time to release the new version tonight, but I will release it tomorrow.  It's bedtime here....

REGARDING PLAYLISTS:  I haven't had time to figure out the correct forms for playlists yet.  It'll be part of the version after this next version.  I apologize if this inconveniences anybody....  but regular expressions are HARD!!!  :P

dougiefresh

Uploaded v1.8 - February 18th, 2015
o Updated Regular Expression used to validate the last few reported forms of the YouTube URL.
o Added some backup code in the event that the Regular Expression doesn't catch a valid URL.

karavan2


Rk2910

Thanks for all your hard work Doug  8)

dougiefresh

Y'all are welcome!




UPDATE: The next version of this mod will a fairly major update.  It will support YouTube playlist IDs, and will support at least 5 new parameters for the YouTube and YT bbcodes: autoplay, color, theme, start and end.  It may support YouTube videos uploaded by a specific user, as well as YouTube videos as part of a search query, each being part of a different bbcode....  More information will be forthcoming when the mod is released into the wild....

Advertisement: