mwaraitch Posted October 16, 2016 Share Posted October 16, 2016 Hi, How to add Facebook Share button in Knowledgebase articles. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 16, 2016 Share Posted October 16, 2016 I would have thought the easiest way, for a one-off article, would be to use the Facebook Share tool - https://developers.facebook.com/docs/plugins/share-button that would generate the code that you can add to the WHMCS site - e.g if using the SDK solution into header.tpl and then the button code into the article itself, or if using iframe, just into the article. alternatively, if you don't want to edit the articles and want the share button added to every kb article automatically, you could edit the knowledgebasearticle.tpl template and change... <blockquote> {$kbarticle.text} </blockquote> to... <blockquote> {$kbarticle.text}<br /><iframe src="https://www.facebook.com/plugins/share_button.php?href={$systemurl}{$filename}.php?action=displayarticle&id={$kbarticle.id}&layout=button&size=small&mobile_iframe=true&width=60&height=20&appId" width="60" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> </blockquote> obviously, you can put the button anywhere on the page that you feel is most suitable. ... or with a bit of work, you can turn it into a sidebar and have similar sharing links for Google+ and Twitter... with the option of including it on any WHMCS page you choose. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.