Skip to content

Extended documentation

Shade- edited this page May 23, 2013 · 21 revisions

MyFacebook Connect comes with 19 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.

Plugin overview

Version 1.0.3
Adds templates Yes (6)
Edits templates Yes (1)
Edits core files No

Template edits

header_welcomeblock_guest

MyFacebook Connect edits the header_welcomeblock_guest template. It adds the following piece of code:

&mdash; <a href="{$mybb->settings['bburl']}/myfbconnect.php?action=fblogin">{$lang->myfbconnect_login}</a>

You might place the myfbconnect.php?action=fblogin link wherever you want in your templates. When the user clicks on it, it the login/registration process will immediately start up.

Using an image instead of a button

MyFacebook Connect edits your header_welcomeblock_guest template adding a link next to the normal Register button. Clicking on it 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:

1. Download the image

Save to your computer whatever Facebook login image you want. I'd recommend using the following:

It has been created by Chris Wallace from 365psd.com.

Lastly, upload the image to your /images folder.

2. Edit the template

Open your header_welcomeblock_guest template and find:

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

Replace {$lang->myfbconnect_login} with the following code:

<img src="/images/imagename.extension" />

Replace imagename.extension with whatever you have named the image and you're done.

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 instructions provided into the installation doc. Nothing more to say about it.

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 instructions provided into the installation doc. Nothing more to say about it.

4. One-click registration

MyFacebook Connect comes with 2 different types of registration. Both of them are great, but you have to choose unfortunately.

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

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'll want. In addition to this they'll be asked to select what data to import from Facebook, respecting their privacy in a better way than the simple one-click registration process.

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 register. By default it's set to 2, which equals to "Registered" usergroup, but I'd recommend to create a specific usergroup with some unique styles (or permissions, if you want to). This will lead into a smoother user experience: 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 place its ID into this field. The ID is the "gid" which appears into the URL of the usergroup's page. For example:

index.php?module=user-groups&action=edit&gid=X

The X is the value you must insert into the After registration usergroup option.

6. Request publishing permissions

This option is kinda useless at the moment. If enabled, will cause the system to ask users for extra Publishing Permissions when authorizing your app upon the login process. This option was created in the earlier phase of the plugin development but it hasn't been fully supported as of today. It was meant to add Publishing Permissions to be able to post onto the users' walls anything after they register with it, maybe some advertising stuff or something similar.

This will be supported in the next version of MyFacebook Connect although it causes the registration process to be a bit more slowly because of the exchanged data needed to post something. Leave it disabled for the moment.

7. Allow only validated users

Version added 1.0.3

Enabling this option will let your board be free of bots by allowing only verified Facebook accounts to register. Verified accounts are those Facebook users who have verified that they are humans by sending a code to their phones and entering it on Facebook.

This option is disabled by default.

8. Send PM upon registration

Enabling this option will cause 3 other options to appear. Enabling it, you are able to send a PM to the newly registered users who decide to use MyFacebook Connect to login.

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

8.2 PM message

This is the message of the PM which will be sent to the user. By default contains some kind words with two variables. They should be left as-is. They are:

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

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

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

At every login, their infos are fetched and inserted with a synchronization. In almost all cases, at 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.

Avatar and cover are merged into one setting which can't be controlled from the ACP. They can only be controlled within the UCP at the moment.

9. Sync birthday

Enable this option to let your users choose to sync or not birthday. Obviously, only if present into their Facebook or with permissions granted.

10. Sync location

Enable this option to let your users choose to sync or not location. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

10.1 Location Custom Profile Field ID

This field is toggled by the Sync location option and is required to work properly. It contains the Location Custom Profile Field ID that you can obtain watching your Custom Profile Fields page.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure you fill it with the right ID. By default it's set to 1, which is the ID of the Location field MyBB uses by default.

11. Sync biography

Enable this option to let your users choose to sync or not biography. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

11.1 Biography Custom Profile Field ID

This field is toggled by the Sync biography option and is required to work properly. It contains the Biography Custom Profile Field ID that you can obtain watching your Custom Profile Fields page.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure you fill it with the right ID. By default it's set to 2, which is the ID of the Biography field MyBB uses by default.

12. Sync First and Last Name

Enable this option to let your users choose to sync or not their names and last names, together. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

12.1 First and Last Name Custom Profile Field ID

This field is toggled by the Sync First and Last name option and is required to work properly. It contains the First and Last Name Custom Profile Field ID that you can obtain watching your Custom Profile Fields page.

Since MyBB doesn't come with a First and Last Name Custom Profile Field by default, if you want to use this sync option you have to create one Custom Profile Field with specifications similar to the Location one. Its ID will be used to insert the data coming from Facebook during every synchronization.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure you fill it with the right ID. By default it's void, because MyBB doesn't come with it by default.

13. Sync sex

Enable this option to let your users choose to sync or not sex. Obviously, only if present into their Facebook or with permissions granted.

Due to the dynamic nature of this Custom Profile Field (its values vary from board to board), this option doesn't work properly at the moment. If you enable it, the corresponding field will be filled with static italian values.

This behavior is still under investigation and a patch is in development stages.

This switcher toggles another field.

13.1 Sex Custom Profile Field ID

This field is toggled by the Sync sex option and is required to work properly. It contains the Sex Custom Profile Field ID that you can obtain watching your Custom Profile Fields page.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure you fill it with the right ID. By default it's set to 3, which is the ID of the Sex field MyBB uses by default.

Please read carefully the installation instructions.

Clone this wiki locally