soclever_login - Version 1.2.1

Version Notes

Added Twitter Login Pop up

Download this release

Release Info

Developer Soclever Social
Extension soclever_login
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2.0 to 1.2.1

app/code/local/Soclever/Socialloginsc/Model/Info.php CHANGED
@@ -48,7 +48,7 @@ class Soclever_Socialloginsc_Model_Info extends Mage_Adminhtml_Block_Abstract im
48
  <h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Extension Information!') ?></strong></h4>
49
 
50
  <div style="margin:5px 0">
51
- <strong>Version: </strong>1.2.0 <br/>
52
  <strong>Author:</strong>Soclever Social<br/>
53
  <strong>Website:</strong> <a href="https://www.socleversocial.com" target="_blank">www.socleversocial.com</a>
54
  <br/>
48
  <h4 class="ss_admin_fieldset_title"><strong><?php echo $this->__('Extension Information!') ?></strong></h4>
49
 
50
  <div style="margin:5px 0">
51
+ <strong>Version: </strong>1.2.1 <br/>
52
  <strong>Author:</strong>Soclever Social<br/>
53
  <strong>Website:</strong> <a href="https://www.socleversocial.com" target="_blank">www.socleversocial.com</a>
54
  <br/>
app/code/local/Soclever/Socialloginsc/Model/Observer.php CHANGED
@@ -10,7 +10,7 @@ class Soclever_Socialloginsc_Model_Observer
10
  $api_secret=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appsecret');
11
  $api_key=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appid');
12
 
13
-
14
 
15
  $valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_activate_sc.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview");
16
  if($valid_data!='0')
10
  $api_secret=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appsecret');
11
  $api_key=Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_appid');
12
 
13
+
14
 
15
  $valid_data=file_get_contents("https://www.socleversocial.com/dashboard/mage_login_activate_sc.php?site_id=".$site_id."&api_key=".$api_key."&api_secret=".$api_secret."&csplatform=magentologin&type=preview");
16
  if($valid_data!='0')
app/code/local/Soclever/Socialloginsc/controllers/IndexController.php CHANGED
@@ -41,7 +41,7 @@ require('http.php');
41
  require('oauth_client.php');
42
  $client = new oauth_client_class;
43
  $client->server = 'Twitter';
44
- $client->redirect_uri = 'http://eurekadigital.com.au/mageonlylogin/index.php/soclever_socialloginsc/index/twlogin';
45
 
46
  $client->client_id = $my_Api[0];
47
  $application_line = __LINE__;
@@ -511,54 +511,36 @@ if($is_new=='1' && Mage::getStoreConfig('socialloginsc_options/displaysettings/s
511
  }
512
  $is_from='1';
513
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
514
- ?>
 
 
 
515
  <script type="text/javascript">
516
 
517
  setTimeout(function(){
518
 
519
-
520
- window.location.href="<?php echo $redirect_location;?>";
521
 
522
  },1000);
523
-
524
- /*setTimeout(function(){
525
-
526
-
527
- window.close();
528
- //window.opener.location = window.opener.window.location;
529
-
530
- /*try{
531
- if(parent.window.opener != null && ! parent.window.opener)
532
- {
533
- alert("good");
534
- }
535
-
536
- }catch(e){ alert("message="+e.description);}
537
- */
538
-
539
- //alert("called redirection=="+top.window.opener.document.URL+"=");
540
- //top.window.location.assign("<?php echo Mage::getBaseUrl();?>customer/account/edit/");
541
-
542
- // top.window.location.href="<?php echo Mage::getBaseUrl();?>customer/account/edit/";
543
- //close();
544
- //return false;
545
- /*if(top.window.opener.document.URL.indexOf('login') > -1)
546
- {
547
- top.window.opener.location.href="<?php echo Mage::getBaseUrl();?>customer/account/edit/";
548
- close();
549
- }
550
- else
551
- {
552
- top.window.opener.location.href="<?php echo Mage::getBaseUrl();?>checkout/onepage/";
553
- close();
554
-
555
- }*/
556
-
557
- /*}, 3000);*/
558
  </script>
559
  <?php
 
 
560
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
561
  $this->getSession()->loginById($customer->getId());
 
 
 
 
 
 
 
 
 
 
 
 
562
  exit;
563
  }
564
  }
@@ -626,13 +608,30 @@ $customer = Mage::getModel("customer/customer");
626
  $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
627
  $is_from='4';
628
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
 
 
 
629
  ?>
630
  <script type="text/javascript">
631
  setTimeout(function(){ opener.location.href="<?php echo $redirect_location; ?>";close(); },1000);
632
  </script>
633
  <?php
 
 
634
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
635
  $this->getSession()->loginById($customer->getId());
 
 
 
 
 
 
 
 
 
 
 
 
636
  exit;
637
  }
638
 
@@ -689,13 +688,29 @@ $customer = Mage::getModel("customer/customer");
689
  $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
690
  $is_from='7';
691
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
 
 
 
692
  ?>
693
  <script type="text/javascript">
694
  setTimeout(function(){ window.location.href="<?php echo $redirect_location; ?>"; },1000);
695
  </script>
696
  <?php
 
697
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
698
  $this->getSession()->loginById($customer->getId());
 
 
 
 
 
 
 
 
 
 
 
 
699
  exit;
700
  }
701
 
41
  require('oauth_client.php');
42
  $client = new oauth_client_class;
43
  $client->server = 'Twitter';
44
+ $client->redirect_uri = ''.Mage::getBaseUrl().'soclever_socialloginsc/index/twlogin';
45
 
46
  $client->client_id = $my_Api[0];
47
  $application_line = __LINE__;
511
  }
512
  $is_from='1';
513
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
514
+ $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
515
+
516
+ if(!$isIosChrome) { ?>
517
+
518
  <script type="text/javascript">
519
 
520
  setTimeout(function(){
521
 
522
+ opener.location.href="<?php echo $redirect_location;?>";
523
+ this.close();
524
 
525
  },1000);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  </script>
527
  <?php
528
+ }
529
+
530
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
531
  $this->getSession()->loginById($customer->getId());
532
+
533
+ if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
534
+ {
535
+ ?>
536
+ <script type="text/javascript">
537
+
538
+ window.location.href="<?php echo $redirect_location; ?>";
539
+ </script>
540
+ <?php
541
+ //header("location:".$redirect_location."");
542
+
543
+ }
544
  exit;
545
  }
546
  }
608
  $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
609
  $is_from='4';
610
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
611
+ $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
612
+ if(!$isIosChrome)
613
+ {
614
  ?>
615
  <script type="text/javascript">
616
  setTimeout(function(){ opener.location.href="<?php echo $redirect_location; ?>";close(); },1000);
617
  </script>
618
  <?php
619
+ }
620
+
621
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
622
  $this->getSession()->loginById($customer->getId());
623
+
624
+ if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
625
+ {
626
+ ?>
627
+ <script type="text/javascript">
628
+
629
+ window.location.href="<?php echo $redirect_location; ?>";
630
+ </script>
631
+ <?php
632
+ //header("location:".$redirect_location."");
633
+
634
+ }
635
  exit;
636
  }
637
 
688
  $redirect_location=($_GET['lc']=='c')?Mage::getBaseUrl()."checkout/onepage/":Mage::getBaseUrl()."customer/account/";
689
  $is_from='7';
690
  Mage::getSingleton('core/session')->setSessionVariable($is_from);
691
+ $isIosChrome = (strpos($_SERVER['HTTP_USER_AGENT'], 'CriOS') !== false) ? true : false;
692
+ if(!$isIosChrome)
693
+ {
694
  ?>
695
  <script type="text/javascript">
696
  setTimeout(function(){ window.location.href="<?php echo $redirect_location; ?>"; },1000);
697
  </script>
698
  <?php
699
+ }
700
  //echo"<img src='https://www.socleversocial.com/dashboard/images/pw.gif' alt='wait!' title='wait!'>";
701
  $this->getSession()->loginById($customer->getId());
702
+
703
+ if(Mage::getSingleton('customer/session')->isLoggedIn() && $isIosChrome)
704
+ {
705
+ ?>
706
+ <script type="text/javascript">
707
+
708
+ window.location.href="<?php echo $redirect_location; ?>";
709
+ </script>
710
+ <?php
711
+ //header("location:".$redirect_location."");
712
+
713
+ }
714
  exit;
715
  }
716
 
app/design/frontend/base/default/template/socialloginsc/socialloginsc_footer.phtml CHANGED
@@ -5,7 +5,7 @@ if(Mage::getStoreConfig('advanced/modules_disable_output/Soclever_Socialsharesc'
5
 
6
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_footer_added',"1");
7
  $footer_code='<script type="text/javascript">var sid=\''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid').'\';(function()
8
- { var u=((\'https:\'==document.location.protocol)?\'http://\':\'http://\')+\'s3.socleversocial.com/\'; var su=u;var s=document.createElement(\'script\'); s.type=\'text/javascript\'; s.defer=true; s.async=true; s.src=su+\'scs.js\'; var p=document.getElementsByTagName(\'script\')[0]; p.parentNode.insertBefore(s,p); }
9
  )();
10
  </script>'.PHP_EOL;
11
 
5
 
6
  Mage::getModel('core/config')->saveConfig('socialloginsc_options/apisettings/scsl_footer_added',"1");
7
  $footer_code='<script type="text/javascript">var sid=\''.Mage::getStoreConfig('socialloginsc_options/apisettings/scsl_siteid').'\';(function()
8
+ { var u=((\'https:\'==document.location.protocol)?\'https://\':\'https://\')+\'s3.socleversocial.com/\'; var su=u;var s=document.createElement(\'script\'); s.type=\'text/javascript\'; s.defer=true; s.async=true; s.src=su+\'scs.js\'; var p=document.getElementsByTagName(\'script\')[0]; p.parentNode.insertBefore(s,p); }
9
  )();
10
  </script>'.PHP_EOL;
11
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soclever_login</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -28,11 +28,11 @@
28
  Send personalised message to your visitors by using our birthday reports. &lt;/p&gt;&#xD;
29
  &lt;p&gt;&lt;strong&gt;Dynamic JavaScript&lt;/strong&gt;&lt;br /&gt;&#xD;
30
  Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.&lt;/p&gt;</description>
31
- <notes>Stable Version 1.2.0</notes>
32
  <authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
33
- <date>2015-04-14</date>
34
- <time>04:59:27</time>
35
- <contents><target name="magelocal"><dir name="Soclever"><dir name="Socialloginsc"><dir name="Block"><file name="Help.php" hash="f1b78eeb8572b294f147100852341b66"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslshow.php" hash="c24f579bd6899fda1b4dfbb745c96f4b"/><file name="Scslfooter.php" hash="be0ebf4b090e0843e8d4c2039babed03"/></dir><dir name="controllers"><file name="IndexController.php" hash="ab66bc3566eb0db768f4373d5191d67e"/><file name="openid.php" hash="421d5936957b8ddda543b679d1876f04"/><file name="http.php" hash="1fe6b6ac5002ed03f3bb5e7f623b8682"/><file name="oauth_client.php" hash="c8b0e317336ba0dce0fee2e384987785"/></dir><dir name="etc"><file name="config.xml" hash="cb074a4803cd4bc99dc8cf6f9496c165"/><file name="system.xml" hash="e3c312194adbf4c6bc23045840812cbe"/></dir><dir name="Helper"><file name="Data.php" hash="ffe3beab121640dedd47db758a93fdaf"/></dir><dir name="Model"><file name="Providers.php" hash="c5398c99a67640139432b902c4ee54e5"/><file name="Info.php" hash="8045d3938a2a8f929f4c61b9b6e2f631"/><file name="Observer.php" hash="6e0bf76cda07e33fd7b0fc59480d6c8a"/></dir></dir><dir name="Sociallogin"><dir name="Block"><file name="Scsltrackpixel.php" hash=""/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="socialloginsc.xml" hash="49234a63b798f35e405ddfa9f603ba4c"/></dir><dir name="template"><dir name="socialloginsc"><file name="scsl_buttons.phtml" hash="8de79bcfad3686c5685636ade252d3b2"/><file name="sociallogin_head.phtml" hash=""/><file name="sociallogin_fb.phtml" hash=""/><file name="sociallogin_trackpixel.phtml" hash=""/><file name="socialloginsc_fb.phtml" hash="718d8596a14d123d83afb0d5d6d6fd96"/><file name="socialloginsc_footer.phtml" hash="355972e94eae985a1ffe8c6e0e9e30d1"/><file name="socialloginsc_head.phtml" hash="8176f3c9c6bfe49db0d51e5f448167be"/><file name="socialloginsc_trackpixel.phtml" hash="4ec45f934b23b5e1961e409530d51672"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="soclever_socialloginsc.xml" hash="4bc33a8062ab5eabf3f3edf1e474c400"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soclever_login</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
28
  Send personalised message to your visitors by using our birthday reports. &lt;/p&gt;&#xD;
29
  &lt;p&gt;&lt;strong&gt;Dynamic JavaScript&lt;/strong&gt;&lt;br /&gt;&#xD;
30
  Our asynchronous javascript loads faster without interfearing with the display or behaviour of the page. Dynamic JavaScript makes it easy to choose/sort social netork buttons for display.&lt;/p&gt;</description>
31
+ <notes>Added Twitter Login Pop up</notes>
32
  <authors><author><name>Soclever Social</name><user>Socleversocial</user><email>hemang@socleversocial.com</email></author></authors>
33
+ <date>2015-06-11</date>
34
+ <time>10:48:24</time>
35
+ <contents><target name="magelocal"><dir name="Soclever"><dir name="Socialloginsc"><dir name="Block"><file name="Help.php" hash="f1b78eeb8572b294f147100852341b66"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslhead.php" hash="f160bb1f3bf06ac3d5529bccbf3eaeb1"/><file name="Scslshow.php" hash="c24f579bd6899fda1b4dfbb745c96f4b"/><file name="Scslfooter.php" hash="be0ebf4b090e0843e8d4c2039babed03"/></dir><dir name="controllers"><file name="IndexController.php" hash="9ab38714af686d97178a9579a94618e6"/><file name="openid.php" hash="421d5936957b8ddda543b679d1876f04"/><file name="http.php" hash="1fe6b6ac5002ed03f3bb5e7f623b8682"/><file name="oauth_client.php" hash="c8b0e317336ba0dce0fee2e384987785"/></dir><dir name="etc"><file name="config.xml" hash="cb074a4803cd4bc99dc8cf6f9496c165"/><file name="system.xml" hash="e3c312194adbf4c6bc23045840812cbe"/></dir><dir name="Helper"><file name="Data.php" hash="ffe3beab121640dedd47db758a93fdaf"/></dir><dir name="Model"><file name="Providers.php" hash="c5398c99a67640139432b902c4ee54e5"/><file name="Info.php" hash="a6af76a1fec277eb2e1d1055e6a447b4"/><file name="Observer.php" hash="270ecaad4d5b460e4f34f64142b5159f"/></dir></dir><dir name="Sociallogin"><dir name="Block"><file name="Scsltrackpixel.php" hash=""/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="socialloginsc.xml" hash="49234a63b798f35e405ddfa9f603ba4c"/></dir><dir name="template"><dir name="socialloginsc"><file name="scsl_buttons.phtml" hash="8de79bcfad3686c5685636ade252d3b2"/><file name="sociallogin_head.phtml" hash=""/><file name="sociallogin_fb.phtml" hash=""/><file name="sociallogin_trackpixel.phtml" hash=""/><file name="socialloginsc_fb.phtml" hash="718d8596a14d123d83afb0d5d6d6fd96"/><file name="socialloginsc_footer.phtml" hash="84220f1f371fcd70cb8aa49d0d19eefe"/><file name="socialloginsc_head.phtml" hash="8176f3c9c6bfe49db0d51e5f448167be"/><file name="socialloginsc_trackpixel.phtml" hash="4ec45f934b23b5e1961e409530d51672"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="soclever_socialloginsc.xml" hash="4bc33a8062ab5eabf3f3edf1e474c400"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>