How to configure

22 Sep 2016 Edited
#1
MyFacebook Connect 3.6 is packed with many settings you can adjust dependently on your needs. You can control many aspects and boost up your MFC copy, building up a rich user experience with ease.

This document contains all the settings MyFacebook Connect is shipped with, commented and explained one-by-one with tips and tricks you can use to enrich your experience with the plugin.

Template edits


MyFacebook Connect edits the header_welcomeblock_guest template, adding the {$facebook_login} variable, which resolves to the myfbconnect_login_button template.

You might place the variable wherever you want in your templates. When the user clicks on the link, which points to /myfbconnect.php?action=login, the login/registration process will immediately start up. Note that the login and the registration are handled by the same link. There are not separate buttons for the two actions.

Using an image instead of a button


Clicking on the generated link causes the login/registration process to begin, but since it's just a normal link, you can place it anywhere and place anything inside it.

If you want to use an image instead of a sad link, you can. Simply follow these steps:
KEYCAP 1 save to your computer whatever Facebook login image you want and upload the image to your server. An image is provided within the package, found at /images/social/facebook.png
KEYCAP 2 open your myfbconnect_login_button template and add your image within the login link boundaries

Configuration options


1. Master Switch


This is the main option which controls everything. Disabling it means totally deactivating the plugin. Everything will refuse to work and every attempt to login with Facebook will "fail" (the user will be simply redirected to your Homepage).

This is very useful if you want to temporary disable the plugin without uninstalling it.

2. App ID


The App ID is one of the required fields and should be filled with the Facebook Application ID token according to the How to install instructions.

3. App Secret


The App Secret is one of the required fields and should be filled with the Facebook Application Secret token according to the How to install instructions.

4. One-click registration


MyFacebook Connect comes with 2 different types of registration.

If this option is enabled, the plugin lets you register through Facebook with only one click and one front-end redirect. Every user who would like to login into your board and doesn't have a registered account will be registered and logged in directly.

With this option disabled, every user who hasn't got a registered account and logs in with Facebook will be prompted to choose a new username and eventually an email address different from his Facebook one. By default, inputs will be filled with his existing Facebook data but they'll be able to choose whatever username and email they want. They will also be asked to select what data to import from Facebook, respecting their privacy.

I'd recommend to disable this option, although it is enabled by default. Privacy is top priority to me, but since you can send a PM upon registration automatically, you might put there all the things to do after a single click registration.

5. After registration usergroup


This option lets you specify an usergroup to put the Facebook-registered users straight after they registered. By default it is set to the "Registered" usergroup, but I would recommend to create a specific usergroup with some unique styles (or permissions, if you want to). Facebook users will be immediately recognized by their username's color, for example.

You are limitless here: just create a special usergroup with your desired specs and then just select it.

6. Force operational status


Version added 3.0

Enabling this option will let MyFacebook Connect run even if registrations are disabled. This is particularly useful if you want to allow new registrations only with Facebook.

This option is disabled by default.

7. Send PM upon registration


Enabling this option toggles 3 options. By enabling it, you are allowed to send a PM to the newly registered users who decide to use MyFacebook Connect to login.

7.1 PM subject


This is the subject of the PM which will be sent to the user. By default is set to "New password", but you can change it to whatever you like.

7.2 PM message


This is the message of the PM which will be sent to the user. You are allowed to use two variables here:

{user} This will be converted to the recipient's username when the PM will be sent.
{password} This will be converted to the recipient's randomly generated password when the PM will be sent.

You can change the text to whatever you want, but make sure you include at least the {password} variable which is the main aim of why the PM is being sent.

7.3 PM sender


This is the UID (User ID) of the user who will be recognized as the sender of the PM. By default this field is left blank which means the user will be 0 (formerly, MyBB Engine). You can change it to whatever you like, but make sure the User ID exists before filling the field.

Synchronization options


This category contains all the options which controls the synchronization, aka importing of all the infos from users' Facebook accounts. Enabling and disabling them from the ACP will cause them to appear or not into users' control panels.

In fact, users are able to choose what infos to import from their Facebook account. Avatar, cover (if Profile Picture plugin is installed), birthday, location, sex, biography, first name and last name are all the available data points which can be turned on and off as you may like.

Upon every login, their infos are fetched and inserted with a synchronization. In almost all cases, upon every login and every time the user updates his settings from his Control Panel all selected infos are fetched and inserted into the database, overwriting old data. This leads into a dynamic and ever up-to-date connection between MyBB and Facebook.

The following data points are currently available:

WOMAN avatar
KEYCAP 6 birthday
GLOBE WITH MERIDIANS website
RESTROOM gender
ROUND PUSHPIN location
PERFORMING ARTS biography
WHITE HEAVY CHECK MARK first and last name
Rich Conley 28 Jul 2018 Edited
#2
Could you please provide an example of how the code in "myfbconnect_login_button" should be modified so that it will show the "/images/social/facebook.png" button?

I think I found it.
<a href="{$mybb->settings['bburl']}/myfbconnect.php?action=login">{$lang->myfbconnect_login}</a>