Adding Facebook/Facebook Messenger as a Communication Option
With my forum being a Trading and Buy/Sell Forum, communication is a key and vital for members making deals. This hack is really opening up another mode of communication to allowing my members to communicate.
The hack is adding Facebook Messenger as a communication option to your forum. NOTE: This does require your members to have a Facebook Account and is using Messenger. The steps are fairly straight forward, but does require some template and profile hacks as well as image uploads. 1) Download the images and upload them to your forums images/misc directory 1 - Messenger Icon - 2) Need to add a Profile Fields (Admincp->User Profile Fields->Add New User Profile Field) Note - I added a Profile Group Called PayPal Field 1 - Facebook/Messager Name - Facebook/Facebook Messenger Description - Add your Facebook (Messenger) username to add on your profile Field Required - No Editable - Yes Private, Searchable, Show on Memberlist - No Rest leave as default (unless you wish to set this) Make sure that you jot down the field ID numbers! There are 2 options that you can use to enable this hack. Option 1 - User Postbit Go to Styles & templates->Style Manager->Edit Template of the Style you wish to change Find the postbit or postbit_legacy template (depends which one you are using for your forum) - Doubleclick to Edit Note - I used postbit_legacy but this should be the same for postbit Find the following Code:
<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd> Code:
<!-- Facebook/Messenger--> <br /> <div align="Left"> <vb:if condition="$post['fieldXX']"><a href="https://m.me/{vb:raw post.fieldXX}" target="_blank"><img src="IMAGE FOLDER/messenger.png" alt="Contact {vb:raw post.fieldXX} on Messenger" border="" /></a></vb:if> </div> <br /> <!--Facebook/Messenger--> Could look as such this when applied FYI - You can use the same type of structure to add other items like Twitter, Facebook, etc... Test! Option 2 - Member Action Dropdown For this option there are 2 ways you can do this 1) Template Hack 2) Plug-in You don't need both - either one should work Template Hack Go to Styles & templates->Style Manager->Edit Template of the Style you wish to change Find the memberaction_dropdown - Doubleclick to Edit Find the following Code:
{vb:rawphrase send_email} </a> </li> </vb:if> Code:
<vb:if condition="$memberinfo['fieldXX']"> <li class="left"> <a href="https://m.me/{vb:raw memberinfo.fieldXX}" target="_blank" class="siteicon_profile"> Contact me on FB<BR>Messenger </a> </li> </vb:if> Plug-in Thanks to MarkFL for this. If you choose to you a plug-in, this is the code that would need to be added. Create a plugin hooked at "memberaction_dropdown" with the PHP code: Code:
if ($memberinfo['fieldxx']) { $template_hook['memberaction_dropdown_items'] .= '<li class="left"> <a href="https://m.me/' . $memberinfo['fieldxx'] . '" target="_blank" class="siteicon_profile"> Contact me on FB <BR> Messenger </a> </li>'; } Again, Test Lastly, alert your members to the change and bask in the praise of your genius (in your members eyes ) Notes - 1st release on 3 March 2018 Download No files for download. Supporters / CoAuthors
Screenshots |
Similar Mods
Lilis Pizza Pizza Messenger (PopUp Messenger) | vBulletin 3.5 Add-ons |