MyBB Community Forums

Full Version: Postbit Contact Buttons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I duplicate the postbit buttons for PM,Email,Find to create my own new one?
What exactly did you want to add? You will usually need a plugin to create the new postbit button.
(2015-05-04, 11:31 AM)Leefish Wrote: [ -> ]What exactly did you want to add? You will usually need a plugin to create the new postbit button.

I would like to add one for facebook page?  So there are only the four that can used?  No more can be recreated?
You can use Social Sites plugin, or do a plugin.
Just adding a button is not possible, because you have to check if the facebook field is filled or not.
(2015-05-04, 03:04 PM)Crazycat Wrote: [ -> ]You can use Social Sites plugin, or do a plugin.
Just adding a button is not possible, because you have to check if the facebook field is filled or not.

I can do that part.  I know how to call the custom field, just don't understand how I can add other postbit buttons for reply, etc, but can't do the email,pm ones.
So, it's a request for plugin.
This plugin must:
- create a facebook button template,
- add a variable in postbit and postbit_classic (after {$post['button_rep']}),
- have an action on the hook postbit to check if the fb field for the user is filled, and then set the template variable.

You must add a css for this button (or edit one of the existing, but discouraged).

FB button template example
<a href="https://www.facebook.com/{$mybb->userfield['facebook']}" title="{$lang->facebook}" class="postbit_facebook"><span>{$lang->postbit_button_facebook}</span></a>

postbit_facebook css example
.postbit_buttons a.postbit_facebook span {
   background: url(yourfbicon.png) no-repeat;
}