Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

paddybl

Pioneers
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Real Name
    Blanchon Patrick

paddybl's Achievements

  1. a solution for logout problem: in create_account.php find <tr> <td> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?=$fbconfig['appid' ]?>', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { // do something with response login(); }); FB.Event.subscribe('auth.logout', function(response) { // do something with response logout(); }); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function login(){ document.location.href = "create_account.php"; } function logout(){ document.location.href = "logoff.php"; } </script> <?php if($fbme){ }else{?> <p> <fb:login-button autologoutlink="true" perms="email,offline_access,user_birthday,user_location,user_work_history,user_religion_politics,user_relationships">Connect with Facebook</fb:login-button> </p> <?php }?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> replace with <tr> <td> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?php echo $fbconfig['appid' ];?>', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { // do something with response login(); }); FB.Event.subscribe('auth.logout', function(response) { // do something with response logout(); }); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function login(){ document.location.href = "create_account.php"; } function logout(){ document.location.href = "logoff.php"; } </script> <?php if($fbme){?> <div align="right"> <a href="#" onclick="FB.logout(function() {window.location = 'Login.php'; }); return false;" class="main" ><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif" alt="Connect"/> Use another Facebook account?</a></div> <?php }else{?> <p> <fb:login-button autologoutlink="true" perms="email,offline_access,user_birthday,user_location,user_work_history,user_religion_politics,user_relationships">Connection</fb:login-button> </p> <?php }?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> in logoff.php add this code somewhere in the <body> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?php echo $fbconfig['appid' ];?>', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> <div align="right"> <a href="#" onclick="FB.logout(function() {window.location = 'index.php'; }); return false;" class="main" ><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif" alt="Connect"/> Don't forget to disconnect from Facebook!</a></div>
×
×
  • Create New...