Skip to content

Extended documentation

Shade- edited this page Sep 11, 2014 · 8 revisions

MyTwitter Connect comes with 13 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 MyTwitter 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 2.1
Adds templates Yes (6)
Edits templates Yes (1)
Edits core files No

Template edits

header_welcomeblock_guest

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

<a href="{$mybb->settings['bburl']}/mytwconnect.php?action=login">{$lang->mytwconnect_login}</a>

You might place the mytwconnect.php?action=login 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

MyTwitter 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 Twitter 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']}/mytwconnect.php?action=login">{$lang->mytwconnect_login}</a>

Replace {$lang->mytwconnect_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 Twitter 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. Consumer Key

The Consumer Key is one of the required fields and should be filled with the Twitter Consumer ID token according to the instructions provided in the installation doc. Nothing more to say about it.

3. Consumer Secret

The Consumer Secret is one of the required fields and should be filled with the Twitter Consumer Secret token according to the instructions provided in the installation doc. Nothing more to say about it.

4. One-click registration

MyTwitter 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 Twitter 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. A fictional email will be generated automatically using the user's Twitter ID and your board's name. This obviously can't receive emails but it's a workaround to prevent the datahandler to throw an error when validating the email. It is strongly recommended to ask the user to change his email in the PM that you can automatically send him.

With this option disabled, every user who hasn't got a registered account and logs in with Twitter will be prompted to choose a new username and eventually an email address different from his Twitter one. By default, inputs will be filled with his existing Twitter 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 Twitter, 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 Twitter-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: Twitter 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 MyTwitter 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. 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 MyTwitter 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. 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.

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' Twitter 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 Twitter account. Avatar, location and biography 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 Twitter.

Avatar can't be controlled from the ACP. It can only be controlled within the UCP at the moment.

8. Sync location

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

This switcher toggles another field.

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

9. Sync biography

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

This switcher toggles another field.

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