Yet Another YouTube BBCode Tag

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

Previous topic - Next topic

karavan2

Quote from: dougiefresh on February 18, 2015, 07:09:43 PMUPDATE: 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....
This is a very significant change functionality, offer to call it version 2.0 and the current version 1.8 does not remove and leave also available for download.

dougiefresh

#41
Uploaded v2.0 - February 19th, 2015
o YouTube videos are now displayed using the iframe tag for HTML5 compatibility.
o http://www.youtube-nocookie.com is now a valid URL to specify in the bbcode.
o Added yt_user bbcode to create a playlist of YouTube videos by a specific user.
o Added yt_search bbcode to create a playlist based on specified search results.
o Added support for YouTube playlist IDs as part of the youtube and yt bbcodes.
o Modification made to BBCode hook to define all bbcode parameters only ONCE for uniformity.
o Fixed a bug in the validation function that didn't set width/height parameters correctly.
o Modified validation function to work properly for all known YouTube video/playlist URLs with IDs.
o Parameters width and height are now optional instead of mandatory.
o Fixed an issue where the video's aspect ratio is screwed up if width or height isn't specified.
o Added autoplay parameter to the bbcodes.  1, yes, on and true are supported.
o Added color parameter to the bbcodes.  red and white are supported by YouTube.
o Added theme parameter to the bbcodes.  dark and light are supported by YouTube.
o Added loop parameter to the bbcodes.  1, yes, on and true are supported.
o Added start parameter to the bbcodes, specifying the number of seconds into the video to start at.
o Added end parameter to the bbcodess, specifying the number of seconds into the video to stop at.
o Added controls parameter to the bbcodes.  0, no, off, hide and false are supported.
o Added showinfo parameter to the bbcodes.  0, no, off, hide and false are supported.
o Added privacy parameter to the bbcodes.  1, yes, on and true are supported.
o http://www.youtube-nocookie.com is used in privacy mode, as supported by YouTube.




EDIT: I can't update the first post of this thread, so look at the mod description here for the latest information on the mod.  Thanks!

dougiefresh

Uploaded v2.1 - February 19th, 2015
o Readded code segment from v1.8 that dealt with "method of last resort" video ID.

@Everybody: I got a bug report via PM that some forms of the YouTube video URLs aren't being picked up like they were with the new code introduced by v1.8 (which was removed from v2.0).  That code has been reintroduced into v2.1.  I apologize about this issue!  Thank you for understanding....

karavan2

Excellent, thank you, both available versions (1.8 and 2.1) are installed correctly and work perfectly.

akbora

This program has made the revolution about Youtube videos. Spectacular and amazing features thanks.

I want only ask a question  how can we use the <iframe>codes with this mod?
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

dougiefresh

Quote from: akbora on February 20, 2015, 03:14:33 PM
how can we use the <iframe>codes with this mod?
When the statement was made that the mod now displays the videos using an iframe, it isn't something that the user actually has to worry about using.  The mod was using <object> and <embed> in the v1.x series, but everything I could find on the net said nothing about using playlists with <object> and <embed>....

Rk2910

I have 1.8 installed.  I tried to install 2.1 and it is failing on the '<img>' to '<img><iframe>' part twice in the post.php file.

dougiefresh

@Rk2910:  I apologize about the lateness of my reply.  You will probably have make a manual edit, as another mod has probably changed those lines of code.  For example, if the line contains <img><object><embed>, you would just add <iframe> to that statement.  I could probably find the area of code to change if you attach your Sources/Post.php file, however, it will probably be about 24 hours later that I'll be able to return it to you because I just worked 12 hours and am expecting to work 12 hour shifts for a while....

Rk2910

Here ya go Doug.  No hurry, whenever you get a chance.

akbora

same, I've got two <img><iframe>. but  I installed while error. this better be corrected,
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

dougiefresh

Quote from: Rk2910 on February 20, 2015, 06:56:45 PM
I have 1.8 installed.  I tried to install 2.1 and it is failing on the '<img>' to '<img><iframe>' part twice in the post.php file.
Attached is the modified Post.php file for you.  You have another mod installed that makes changes to the same lines as my mod.  This should work for ya....

Quote from: akbora on February 23, 2015, 10:51:33 AM
same, I've got two <img><iframe>. but  I installed while error. this better be corrected,
I'm going to ASSUME that you are ASKING for assistance and not DEMANDING this issue be corrected, even though it sure doesn't sound like a request for assistance.....  If this is the case, attach your Sources/Post.php file and I'll modify it for you.

akbora

SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

dougiefresh

@akbora: Your Post.php is already good to go for this mod.  No further modification is needed.

Rk2910

Quote from: dougiefresh on February 23, 2015, 07:32:03 PM
Quote from: Rk2910 on February 20, 2015, 06:56:45 PM
I have 1.8 installed.  I tried to install 2.1 and it is failing on the '<img>' to '<img><iframe>' part twice in the post.php file.
Attached is the modified Post.php file for you.  You have another mod installed that makes changes to the same lines as my mod.  This should work for ya....

Thanks Doug.  I did not complete the install due to the errors.  Should I install and then copy this file in?

NekoJonez

So do I need to install 1.8 and 2.1?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

karavan2

No, it is necessary to choose one of them. For simple use the youtube is enough version 1.8

dougiefresh

@Rk2910:  You are correct.  Just complete the install, then copy the new file into your installation, and it SHOULD work.

@NekoJones:  karavan2 is correct.  Version 2.1 has more features, version 1.8 supports only videos.

Rk2910

I guess I should have asked this also - should I uninstall 1.8 or install over it?  Will installing over it leave both versions installed? I uninstalled the previous version before installing 1.8.

karavan2

Before you install a higher version, previous to remove. At the same time should be set only one version.

dougiefresh

Uploaded v2.2 - April 6th, 2015
o Updated for SMF 2.1 Beta 1

Advertisement: