News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Embed Facebook BBCode

Started by dougiefresh, July 11, 2015, 02:33:41 PM

Previous topic - Next topic

dougiefresh

Link to Mod



EMBED FACEBOOK BBCODE v3.12
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:

[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 RC2, as well as SMF 2.0 and up.  SMF 1.x and SMF 2.1 Beta 1 is not and will not be supported.

Changelog
The changelog can be viewed at XPtsp.com.

License
Copyright (c) 2015 - 2019, 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.

Apllicmz

nice Work
Good Mod
When try puty portuguese see that error
attach



Apllicmz

Yes now iam Done

i change

<search position="before">

to

[code]<search position="end">



villasg

#3
Nice

Grekk-uft8
<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 ..................


villasg

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

villasg

Update :
After checking bbc tags works [instagram]xxxxxxxxx[/instagram]

[youtube]xxxxxxxxxx[/youtube]

[facebook]xxxxxxxxxxxxx[/facebook]


but bbc images in post do not showing .



How cai n fix it this ?

dougiefresh

Quote from: Joomlamz on July 12, 2015, 02:17:39 AM
nice Work
Good Mod
When try puty portuguese see that error
attach
Quote from: Joomlamz on July 12, 2015, 02:27:28 AM
Yes now iam Done

i change<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!

Quote from: villasg on July 12, 2015, 02:54:27 AM
Nice

Grekk-uft8
<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!

Quote from: villasg on July 12, 2015, 02:54:27 AM
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?

villasg

#7
Quote from: dougiefresh on July 12, 2015, 07:44:50 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


dougiefresh

Can you verify that under the "integrate_pre_include" hooks that they are loaded?

villasg

#9
Quote from: dougiefresh on July 12, 2015, 11:18:57 AM
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


villasg

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


dougiefresh

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....

villasg

I am confused , i do not know what happened ....

dougiefresh

Me neither....  Is there any chance that the bbcodes are disabled in the Admin area (Forum => Posts and Topics => Bulletin Board Code)?

villasg

Quote from: dougiefresh 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)?

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

dougiefresh

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....

dougiefresh

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.

dougiefresh

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!

villasg

Quote from: dougiefresh on August 14, 2015, 07:30:36 PM

@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

villasg

#19
Work great with the tags [facebook]...................[/facebook]  , settings works  , but i still have the problem with your mods ( not showing the bbc button/image) ........

Advertisement: