Facebook Logout buttons using JFacebook PDF Print E-mail

 
How to alter the default.php file to display your own logout button in JFacebook 

More @: Custom Facebook Buttons using JFacebook

We generate the logout button with the following:

 <div class="fblogout"><?php echo JHTML::_('xfbml.logout', $ourparams); ?></div>

Which gives you:

This part: JHTML::_('xfbml.logout', $ourparams); is a direct call to the 

xfbml::logout($params = array(), $text = '<img src="http://static.ak.fbcdn.net/rsrc.php/z2Y31/hash/cxrz4k7j.gif" >', $attributes = null) 

As you can see the second param in the method is a reference to the image, which we have give a default. You may have noticed that we didn't specify this argument in our original code above, so to do that we simply:

  1. define an image: $image = '<img src="/cms153/[YOUR IMAGE URL]" >';
  2. Send it along in you xfbml::logout call:  <div class="fblogout"><?php echo JHTML::_('xfbml.logout', $ourparams, $image); ?></div>


That's IT!

 
FreshBooks
3 Steps to Double Your Sales
Joomla Templates by Joomlashack