Advertisement:

Author Topic: Embed Facebook BBCode  (Read 43921 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Embed Facebook BBCode
« on: July 11, 2015, 02:33:41 PM »
Link to Mod


EMBED FACEBOOK BBCODE v3.10
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.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,627
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Embed Facebook BBCode
« Reply #1 on: July 12, 2015, 02:17:39 AM »
nice Work
Good Mod
When try puty portuguese see that error
attach



Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,627
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Embed Facebook BBCode
« Reply #2 on: July 12, 2015, 02:27:28 AM »
Yes now iam Done

i change

Code: [Select]
<search position="before">

to

[code]<search position="end">



Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #3 on: July 12, 2015, 02:54:27 AM »
Nice

Grekk-uft8
Code: [Select]
<file name="$languagedir/ManageSettings.greek-utf8.php">
<operation>
<search position="before"><![CDATA[$txt['languages_ltr'] = 'Δεξιά προς αριστερά';]]></search>
<add><![CDATA[$txt['fb_default_lang'] = 'Προεπιλογή γλώσσας Facebook:';]]></add>
</operation>
</file>


Problem .
I install without errors .
In Admin => Modification Settings showing and can change .
No any errors when try to post
But .
Do not show the bbc image for facebook ( checking exists in directory) and have lost bbc image from 2 another mods from you "Embed Instagram BBCode" and from Yet Another YouTube BBCode Tag





Very strange



Remove mod but Instagram BBCode not showing ....



After remove this mod , remove instagram &  YouTube  mod and install again  but nothing happened .
"Embed Instagram BBCode" @ Yet Another YouTube BBCode Tag do not showing lost it ...... >:(

Finaly do not have anymore working "Embed Instagram BBCode" @ "Yet Another YouTube BBCode Tag" in my forum and can not make it work ..................

« Last Edit: July 12, 2015, 03:41:43 AM by villasg »

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #4 on: July 12, 2015, 03:23:11 AM »
After remove this mod , remove instagram mod and install again instagram  but nothing happened .
"Embed Instagram BBCode" do not showing lost it ...... >:(

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #5 on: July 12, 2015, 07:22:55 AM »
Update :
After checking bbc tags works
Code: [Select]
[instagram]xxxxxxxxx[/instagram]

[youtube]xxxxxxxxxx[/youtube]

[facebook]xxxxxxxxxxxxx[/facebook]


but bbc images in post do not showing .



How cai n fix it this ?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #6 on: July 12, 2015, 07:44:50 AM »
nice Work
Good Mod
When try puty portuguese see that error
attach
Yes now iam Done

i change
Code: [Select]
<search position="before">

to

[code]<search position="end">
Um... This mod doesn't contain a Portuguese language file.  Do you want to share a translation with everybody else?  If so, please attach your language files and I'll include them in the next version!

Nice

Grekk-uft8
Code: [Select]
<file name="$languagedir/ManageSettings.greek-utf8.php">
<operation>
<search position="before"><![CDATA[$txt['languages_ltr'] = 'Δεξιά προς αριστερά';]]></search>
<add><![CDATA[$txt['fb_default_lang'] = 'Προεπιλογή γλώσσας Facebook:';]]></add>
</operation>
</file>
I'll include it in the next version!

Problem .
I install without errors .
In Admin => Modification Settings showing and can change .
No any errors when try to post
But .
Do not show the bbc image for facebook ( checking exists in directory) and have lost bbc image from 2 another mods from you "Embed Instagram BBCode" and from Yet Another YouTube BBCode Tag





Very strange



Remove mod but Instagram BBCode not showing ....



After remove this mod , remove instagram &  YouTube  mod and install again  but nothing happened .
"Embed Instagram BBCode" @ Yet Another YouTube BBCode Tag do not showing lost it ...... >:(

Finaly do not have anymore working "Embed Instagram BBCode" @ "Yet Another YouTube BBCode Tag" in my forum and can not make it work ..................
Let me look into this....  Meanwhile, can you verify that you have the Subs-BBCode-Instagram.php and Subs-BBCode-YouTube.php files in your Sources folder?
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #7 on: July 12, 2015, 09:15:02 AM »
Let me look into this....  Meanwhile, can you verify that you have the Subs-BBCode-Instagram.php and Subs-BBCode-YouTube.php files in your Sources folder?

verified



And

« Last Edit: July 12, 2015, 09:39:53 AM by villasg »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #8 on: July 12, 2015, 11:18:57 AM »
Can you verify that under the "integrate_pre_include" hooks that they are loaded?
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #9 on: July 12, 2015, 12:06:39 PM »
Can you verify that under the "integrate_pre_include" hooks that they are loaded?




I install anothet bbc mod ( "BBCode Colorbox" ) for testing and showing great the bbc button

« Last Edit: July 12, 2015, 01:07:12 PM by villasg »

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #10 on: July 12, 2015, 01:05:32 PM »
I install anothet bbc mod ( "BBCode Colorbox" ) for testing and showing great the bbc button


Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #11 on: July 12, 2015, 01:59:25 PM »
Well, I just got installed every mod that the file listing showed (I have to note they were all mine  :P ), and checked the editor.  All the buttons are there, so I am at a complete loss as to why some of the bbcodes aren't working and the buttons aren't showing up....  Attached is a pic of the buttons from my clean forum....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #12 on: July 12, 2015, 02:04:29 PM »
I am confused , i do not know what happened ....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #13 on: July 12, 2015, 02:17:43 PM »
Me neither....  Is there any chance that the bbcodes are disabled in the Admin area (Forum => Posts and Topics => Bulletin Board Code)?
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #14 on: July 12, 2015, 02:29:00 PM »
Me neither....  Is there any chance that the bbcodes are disabled in the Admin area (Forum => Posts and Topics => Bulletin Board Code)?

If disabled all not showing if disable only the facebook - yet - instagram are the same results do not showing anything

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #15 on: July 13, 2015, 11:53:25 AM »
I installed the mods indicated by the file list you gave (probably incomplete, but...) and all the mods play together nicely for me.  I don't know what to tell ya....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #16 on: August 08, 2015, 10:10:21 AM »
Uploaded v1.1 - August 8th, 2015
o Added Greek UTF8 language string modification to the mod.
o Added additional validation to make sure the bbcode isn't abused.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Embed Facebook BBCode
« Reply #17 on: August 14, 2015, 07:30:36 PM »
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.



@villasg: Can you make a copy of the language_english.xml file and translate the new string within?  I need you to ATTACH the new file to the post, not insert the contents of the file into a post!!!  Thanks!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #18 on: August 15, 2015, 03:36:15 AM »

@villasg: Can you make a copy of the language_english.xml file and translate the new string within?  I need you to ATTACH the new file to the post, not insert the contents of the file into a post!!!  Thanks!

done

Offline villasg

  • Full Member
  • ***
  • Posts: 484
Re: Embed Facebook BBCode
« Reply #19 on: August 15, 2015, 06:32:42 AM »
Work great with the tags [facebook]...................[/facebook]  , settings works  , but i still have the problem with your mods ( not showing the bbc button/image) ........
« Last Edit: August 15, 2015, 07:29:33 AM by villasg »