annoying

Author Topic: Embed Facebook BBCode v3.9  (Read 3621 times)

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Embed Facebook BBCode v3.9
« on: Jun 27, 2015, 02:57:45 AM »

EMBED FACEBOOK BBCODE v3.9
By Dougiefresh -> Link to Mod


Introduction
This modification adds a BBCode to embed Facebook posts and videos into your forum.  Embedding posts and videos are simple way to put public posts and videos - by a Page or a person on Facebook - into the content of your web site or web page.  Only public posts from Facebook Pages and profiles can be embedded.

The BBCode takes these forms:
Code: [Select]
[facebook]{facebook URL}[/facebook]
[facebook width={x}]{facebook URL}[/facebook]
where {facebook URL} is the URL to the facebook photo post, post or video that you want to display and {x} is the width of the post desired.  Note that if the width isn't specified, the global setting will be applied.

User Profile Settings
Under Profile => Look and Layout, there is a new option called Language the Facebook controls are shown in.  It's purpose is set the language of the Facebook controls used in each post that the user can see, which is overridden by Facebook when the user is already logged in.  Please note that setting this option only controls the default language of the FB controls, not the posts themselves, and does NOT translate the posts into a different language!

Admin Settings
Under Admin => Modification Settings, there are some new options:
o Language the Facebook controls are shown in.  It's purpose is to define the forum's default language for the Facebook post, which is overridden by Facebook when the user is already logged in.  Please note that setting this option only controls the default language of the FB controls, not the posts themselves, and does NOT translate the posts into a different language!
o Default width of embedded Facebook video
o Default height of embedded Facebook video
o Include Facebook link beneath?

Further Information
o Facebook Embedded Posts, specifically Getting a posts's URL

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

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

License
Quote
Copyright (c) 2015 - 2018, 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.
« Last Edit: Jan 23, 2016, 10:42:45 AM by dougiefresh »

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Re: Embed Facebook BBCode v2.21
« Reply #1 on: Jun 27, 2015, 02:58:02 AM »

Below are some preview images of what the mod looks like when being used

Download Mod


FileName: Embed_Facebook_BBCode_v3.9.zip
Size: 17 kb (17,271 bytes)
MD5: 713fc92c822fba3a10b52bd609ed8d66
Built: Mar 15, 2018, 06:47:49 PM
Downloaded 58 times

Changelog

Uploaded v3.9 - March 4th, 2018
o Fixed an issue that prevents BBC manager from showing bbcodes.

Uploaded v3.8 - January 11th, 2018
o Modified regex patterns to include dashes in Facebook user names.

Uploaded v3.7 - November 29th, 2017
o Revised Tapatalk support to return Facebook URL only if we can match a pattern.
o Streamlined some code in the bbcode validation function.

Uploaded v3.6 - November 27th, 2017
o Added Turkish translation, courtsey of mkucuksari!
o Added Tapatalk support so that any Facebook links show up as clickable links.
o Added option to show the Facebook URL after the Facebook post/video/photo/etc.

Uploaded v3.5 - November 22th, 2017
o Altered regex patterns to accept /photo/ URLs properly.

Uploaded v3.4 - September 26th, 2016
o Altered code to make regular and permalink post URLs responsive.
o Altered code to make video URLs responsive using Facebook code.
o Fixed regex pattern to accept photo.php URLs without the theater param.
o Removed BBCode-Facebook2.css from the mod, since it was unused.

Uploaded v3.3 - June 18th, 2016
o Added Spanish Latin translation, courtsey of Rock Lee.
o Fixed code so that the Facebook permalink.php URL is recognized as valid.
o Fixed auto-embed code so that the Facebook permalink.php URL is recognized as valid.

Uploaded v3.2 - March 7th, 2016
o Modified auto-embed code so that Facebook URLs in signature are embedded as [url]{link}[/url].

Uploaded v3.1 - February 14th, 2016
o Removed 25 pixel top border from the video iframe div box.

Uploaded v3.0 - February 10th, 2016
o Fixed issue where Facebook URLs shown in preview mode aren't parsed by Facebook SDK.

Uploaded v2.22 - January 22th, 2016
o Added support for Facebook event permalinks.

Uploaded v2.21 - December 30th, 2015
o Fixed issue where Facebook language set to default Facebook language, not user's language.
o Fixed photo URLs so that URLs with "&theater" in them display properly.
o Fixed auto-embed for Facebook videos.
o Fixed code for Facebook usernames with decimal points or underscores in them.
o Added new Facebook photo post format recognition.

Uploaded v2.20 - December 29th, 2015
o Fixed Spanish XML file so that it doesn't result in errors when Spanish isn't installed.
o Moved code from XML file into the PHP file to set the user's default facebook language.

Uploaded v2.19 - December 28th, 2015
o Added Spanish translation to the mod, courtsey of d3vcho

Uploaded v2.18 - December 21th, 2015
o Added support for Facebook photos as posts
o Added auto-embed support for Facebook photo posts

Uploaded v2.17 - December 11th, 2015
o Another fix for the auto-embed code so that all facebook URLs get embedded properly.

Uploaded v2.16 - December 9th, 2015
o Fixed the auto-embed so that "facebook.com/blah/posts/1234" gets embedded again.

Uploaded v2.15 - December 9th, 2015
o Fixed name of CSS file within Subs-BBCode-Facebook.php.

Uploaded v2.14 - November 30th, 2015
o Fixed issue with auto-embed where Facebook tags were removed from code tags.
o Modified auto-embed function for use as a hook with SMF 2.1.

Uploaded v2.13 - November 14th, 2015
o Fixed auto-embedding code so that it embeds the URL if no tags are around it.

Uploaded v2.12 - November 12th, 2015
o Issue already been addressed.  No functional changes made to the mod.

Uploaded v2.11 - November 7th, 2015
o Fixed Norwegian language modifications so that they are added to correct language file.

Uploaded v2.10 - November 6th, 2015
o Added Norwegian language modifications to the mod.  Thanks, Mimmi!

Uploaded v2.9 - October 2nd, 2015
o Rewrote auto-embedding code to deal with line-breaks and duplicate closing brackets.
o Added "Invalid Facebook URL" message for use with invalid FB URLs (duh)....

Uploaded v2.8 - September 21st, 2015
o Fixed auto-embedding issue where URLs inside code tags where auto-linked.

Uploaded v2.7 - September 6th, 2015
o Fixed issue where BBCodes list was completely empty because of mod... (shrug)

Uploaded v2.6 - August 29th, 2015
o Fixed missing CSS file operations within package-info.xml

Uploaded v2.5 - August 26th, 2015
o Fixed issue with auto-embedding code that created double bbcode tags around Facebook URLs.

Uploaded v2.4 - August 25th, 2015
o Added ability to auto-embed Facebook URLs to the mod.

Uploaded v2.3 - August 24th, 2015
o Fixed stupid language bug that I completely missed in the last 2 versions.... (Sigh)

Uploaded v2.2 - August 23rd, 2015
o Correction of which language file to insert new strings into....

Uploaded v2.1 - August 18th, 2015
o Added support for responsive Facebook videos to the mod.
o Added option to control the default width of the post when it is not specified.
o Added option to control the default width of the video when it is not specified.
o Updated Greek UTF8 language modifications, due to several new strings to support new options.
o Moved text for mod options from "index" to "ManageSettings" language file.

Uploaded v2.0 - August 14th, 2015
o Added user setting under Profile => Look and Layout to override global forum setting.
o BBCode "lang" parameter is now completely ignored, as user and forum settings are now used instead.
o Facebook script inclusion moved from post area to HTML head area.
o Removed Greek UTF8 language modification, citing new string better describing the purpose.

Uploaded v1.1 - August 8th, 2015
o Added Greek UTF8 language modification to the mod.
o Added additional validation to make sure the bbcode isn't abused.

Uploaded v1.0.2 - July 11th, 2015
o Fixed issue with variable not being set within BBCode_Facebook_Validate function.
o Added code to try to select the forum's language as the FB default language.

Uploaded v1.0.1 - July 9th, 2015
o Fixed an issue with setting the width parameter
o Added code to trim extra spaces from the given URL and make sure it starts with "http://" or "https://"
o Added code to select the default language used within Facebook posts.
o Added option within Admin -> Modification Settings to set default language used within Facebook posts.

Uploaded v1.0 - June 26th, 2015
o Initial Release

« Last Edit: Oct 29, 2016, 07:56:55 PM by dougiefresh »