Advertisement:

Author Topic: ESPN Video BBCode  (Read 3311 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
ESPN Video BBCode
« on: June 25, 2015, 05:25:46 AM »
Link to Mod


ESPN VIDEO BBCODE v1.6
By Dougiefresh -> Link to Mod


Introduction
This modification adds a BBCodes to watch ESPN videos.

The two BBCodes takes these forms:
Code: [Select]
[ESPN]{ESPN video ID}[/ESPN]
[ESPN width=x height=x]{ESPN video ID}[/ESPN]
[ESPN]{ESPN video URL}[/ESPN]
[ESPN width=x height=x]{ESPN video URL}[/ESPN]
[ESPN]{ESPN embed code}[/ESPN]
[ESPN width=x height=x]{ESPN embed code}[/ESPN]
where {ESPN embed code} is the embed code given from the ESPN.com website, and {ESPN video ID} is the number that starts with externalId=espn:.

Admin Settings
The default width and height parameters can be specified in the Admin -> Configuration -> Modification Settings area.

Compatibility Notes
This mod was tested on SMF 2.0.9, but should work on SMF 2.1 Beta 1, as well as SMF 2.0 and up.  SMF 1.x is not and will not be supported.

This mod should be installed after Tapatalk mod, if you want to use it with Tapatalk.

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Quote
Copyright (c) 2015 - 2017, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #1 on: July 01, 2015, 06:44:49 PM »
Uploaded v1.1 - July 1st, 2015
o Modified to show nothing if no URL is specified between the opening & closing tag.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #2 on: July 20, 2015, 06:57:23 PM »
NOTICE: I've updated my other video mods to be responsive.  This mod refuses to be made responsive.  The ESPN site REQUIRES a width and height to be supplied, and will only show the video at that size, so therefore, I cannot make this video mod responsive like the other two.  Thank you for understanding.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #3 on: October 02, 2015, 08:40:50 PM »
Uploaded v1.2 - October 2nd, 2015
o Modified validation function to check to make sure URL is actually a NHL video URL.
o Added "Invalid ESPN URL" message for use with invalid ESPN URLs (duh)....
o Added ability to auto-embed ESPN URLs to the mod.
o Added code to remove auto-embedded NHL videos from within code tags.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,930
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: ESPN Video BBCode
« Reply #4 on: October 03, 2015, 09:50:17 AM »
Is this for any ESPN video or just NHL ones? Your list of changes confused me. :P
Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #5 on: October 03, 2015, 10:51:04 AM »
And this is what happens when you cut and paste without making damn sure that the text is right.....  :P  Yes, I meant ESPN, not NHL.  Sorry about that!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #6 on: October 03, 2015, 03:13:18 PM »
Uploaded v1.3 - October 3rd, 2015
o Added responsive video display elements to this mod.
o When specifying width and height parameters, they are now treated as maximum display size.
o Changed default width and height from 640x400 to 100% of post display area.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,930
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: ESPN Video BBCode
« Reply #7 on: October 03, 2015, 05:54:18 PM »
Yes, I meant ESPN, not NHL.  Sorry about that!

No worries. I figured as much but just wanted to be sure. :)
Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #8 on: November 30, 2015, 05:36:51 PM »
Uploaded v1.4 - November 30th, 2015
o Fixed auto-embed function so that it only embeds URLs without tags around it.
o Modified auto-embed function for use as a hook with SMF 2.1.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #9 on: March 07, 2016, 02:21:03 PM »
Uploaded v1.5 - March 7th, 2016
o Modified auto-embed code so that ESPN URLs in signature are embedded as [url]{link}[/url].
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,423
    • XPtsp.com Community
Re: ESPN Video BBCode
« Reply #10 on: December 08, 2017, 10:12:44 PM »
Uploaded v1.6 - December 8th, 2017
o Added URL embedding code for the Tapatalk mod.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!