Jump to content

Add Facebook Like button to your pages


rslyon

Recommended Posts

Hi,

 

Just thought i show the following if anyone is interested.

How to add Facebook Like button to your whmcs pages, ideal for KB

 

Register at http://developers.facebook.com/setup/ and get an APP ID

Change the code bellow and replace YOUR APP ID with your id number.

 

Add the following code to the end of header.tpl

 

<div id="fb-root"></div>

<script>

window.fbAsyncInit = function() {

FB.init({appId: 'YOUR APP ID', status: true, cookie: true,

xfbml: true});

};

(function() {

var e = document.createElement('script'); e.async = true;

e.src = document.location.protocol +

'//connect.facebook.net/en_US/all.js';

document.getElementById('fb-root').appendChild(e);

}());

</script>

 

 

Then on your page templates add the like button:

 

<script src="https://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="{$whmcs_url}"></fb:like>

Link to comment
Share on other sites

  • 4 months later...
l would like to add the like button just under the twitter image in the client portal. anyone know what file that is??

 

Thanks

"templates/portal/footer.tpl" is where you'll find the Twitter image that's displayed in the right column for the Portal theme.

Edited by GGWH-James
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated