MyBB plugin installation tutorial
Install our plugin on MyBB forums
Dear Members,
After the tutorial for the forumotion plugin and the one for XenForo forums, another plugin is not part of our collection: MyBB plugin! And as for the others, this is our dedicated tutorial about How to install a MyBB plugin on your forum
- Installation of MyBB plugin
- Creation of a MyBB plugin
- Install your own MyBB plugin
- Customization
- How does it work ?
- Create your first multilingual post
- Selecting the multilingual posts' language
- What if an alias does not exist in my language
What is a multi-lingual topic ?
A #multilingual topic is a special post in your forum that is available in different languages. This feature will allow new guests/members that don't speak your forum main-language to undestand your topic content and join the discussionBasically, you will create different messages in the same topic for different languages: our plugin will make visible the translation for the correct language of the member!
Installation of MyBB plugin
Creation of a MyBB plugin
- First, you need to create an account on our website at https://www.translationscloud.com/registration.
Note that an email verification is required. Use a valid email address. - Once that your account has been created and it has been verified, login your client area and Go to your Dashboard
- Now go to Modules > Plugins and you will now see the management tool for your plugins. Click on the MyBBforum plugin button to start creating a plugin for your MyBB forum
- If this is the first time you create a plugin for MyBB, click on the button in this new page to start
- You will be required to confirm and verify some information. Here you can find a full explanation of the different contents.
- Verify Api Key and Forum address
you will need to check if a valid api-key is available and if the forum address corresponds to the one you will use - Customization
- Multilingual icon
It is possible to set an icon to highlight multilingual contents. By default a light-bulb is displayed.
Some translations are required for your plugin. You can leave the default-ones or update them.. it is up to you
Install your own MyBB plugin
Templates
Open your ACP and go to Templates & styles > Templates > Manage Templates > Default Templates (expand)Now, open Ungrouped Templates > Edit codebuttons
In the template, find the following part:
- Code:
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote|maximize,source",
and replace it with:
- Code:
toolbar: "{$basic1}{$align}{$font}{$size}{$color}{$removeformat}{$basic2}image,{$email}{$link}|video{$emoticon}|{$list}{$code}quote,alias|maximize,source",
Then save
In the same location (Templates & styles > Templates > Manage Templates > Default Templates (expand) > Ungrouped Templates) Edit the template file headerinclude
Find the following string:
- Code:
{$stylesheets}
and add your personal snippet-code before it (this is just an example)
- Code:
<script type="text/javascript" src="https://www.translationscloud.com/MyBBforum/js/mybb-XX.js"></script>
[/list]
Customization
There are some CSS lines to include in your forum stylesheet. To do so, another file needs to be changed.
Go to Templates & Styles > Themes > Edit Stylesheet > Stylesheets in default >
Global.css > Options > Edit >
Edit Stylesheet: Advanced Mode and add:
- Code:
a#change_language {
display: block;
padding: 1px 0 1px 23px;
background-image: url(https://www.translationscloud.com/MyBBforum/mybb-alias-button.png);
background-repeat: no-repeat;
}
.post_date img.multilingual-post {
background: #fafafa;
border-radius: 100%;
padding: 5px;
vertical-align: middle;
margin-right: 6px;
}
alias {
display: inline-block!important;
background: #444444;
color: white;
font-style: italic;
font-size: 11px;
padding: 4px!important;
border-radius: 2px;
border-bottom: 2px solid #6D6B6B;
box-shadow: 0px 0px 1px white;
}
.sceditor-button-alias div {
background-image: url('https://www.translationscloud.com/fa_sceditor/fa-alias-button.png')!important;
}
Then , save your changed
Explanation of css lines
- a#change_language
this html elements refers to the new option that will be added in your edit profile page - .post_date img.multilingual-post
this class refers to the icon added in the header of a multilingual post - alias
this html tag allows you to change the appearance of the BBcode in WYSIWYG mode and in case that an alias doesn't exist. - .sceditor-button-alias div
this class refers the the button in your editor
How does it work ?
Creating a new multilingual post
Once the installation process is completed, you can start creating your own multilingual posts and topics
Thanks to our plugin and your settings, a special BBcode button is included in your editor and it will allow you to include an alias in your post
Alias can be created from your client area from Management > New translation and you and your translators can translate them in different languages from Client area > Pending translations. If you include an alias that hasn't been created yet, the system will return "not found"
Of course you can write a normal post and having only a part in multilingual.
Once included it will appear as in the example above (Source mode / WYSIWYG mode)
Now we are ready to post it
In your topic page the alias will be automatically replaced with the content of your translation! Wow!
An icon that you can set during the plugin creation will be displayed for valid multi-lingual posts. A simple post or a not-valid multilingual post will not be marked with this icon.
Selecting the multilingual posts' language
If you want to modify or select a language for your multilingual posts you can go on your forum to Edit profile > Settings > Preferences
There is no need to save the page: the update is made in async mode. If you see the green success text, your modification is done !
What if an alias does not exist in my language ?
If an alias is valid, but it is not available for in your language, the default version will be displayed and a special icon will notify you of a multilingual post in default language
For extended technical details, customization and generic support, please contact us in our Plugin assistance section |