Janrain_Engage_Plugin - Version 1.2.1

Version Notes

Many MANY bug fixes

Download this release

Release Info

Developer Janrain
Extension Janrain_Engage_Plugin
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2.0 to 1.2.1

app/code/community/Janrain/Engage/.DS_Store ADDED
Binary file
app/code/community/Janrain/Engage/Block/.DS_Store ADDED
Binary file
app/code/community/Janrain/Engage/Block/Accountdata.php CHANGED
@@ -19,8 +19,8 @@ class Janrain_Engage_Block_Accountdata extends Mage_Adminhtml_Block_System_Confi
19
  'realmscheme' => 'Realm Scheme',
20
  'appid' => 'App Id',
21
  'adminurl' => 'Admin URL',
22
- 'socialpub' => 'Social Pub',
23
- 'enabled_providers' => 'Enabled Providers'
24
  );
25
 
26
  if (Mage::helper('engage')->isEngageEnabled() === false)
@@ -37,7 +37,7 @@ class Janrain_Engage_Block_Accountdata extends Mage_Adminhtml_Block_System_Confi
37
  $providers = explode(",", $value);
38
  $value = '<a class="rpx-icons" href="' . Mage::getStoreConfig('engage/vars/adminurl') . '" target="_blank">';
39
  foreach ($providers as $p) {
40
- $value .= '<div class="jn-icon jn-size16 jn-' . $p . '" title="' . htmlentities($p) . '"></div>';
41
  }
42
  $value .= '</a>';
43
  }
19
  'realmscheme' => 'Realm Scheme',
20
  'appid' => 'App Id',
21
  'adminurl' => 'Admin URL',
22
+ 'socialpub' => 'Share Providers',
23
+ 'enabled_providers' => 'Authentication Providers'
24
  );
25
 
26
  if (Mage::helper('engage')->isEngageEnabled() === false)
37
  $providers = explode(",", $value);
38
  $value = '<a class="rpx-icons" href="' . Mage::getStoreConfig('engage/vars/adminurl') . '" target="_blank">';
39
  foreach ($providers as $p) {
40
+ $value .= '<div class="janrain-provider-icon-16 janrain-provider-icon-'.$p.'" title="' . htmlentities($p) . '"></div>';
41
  }
42
  $value .= '</a>';
43
  }
app/code/community/Janrain/Engage/Block/Auth.php CHANGED
@@ -3,35 +3,7 @@
3
  class Janrain_Engage_Block_Auth extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface {
4
 
5
  function rpx_small_buttons() {
6
- $size = $this->getSize();
7
- if ($size == 'inline') {
8
- return '<div id="janrainEngageEmbed"></div>';
9
- }
10
- else {
11
- $providers = Mage::helper('engage')->getRpxProviders();
12
- if (is_array($providers)) {
13
- $size = ($size == 'small') ? "16" : "30";
14
- $wrap_open = '<a class="janrainEngage rpxnow rpx_link_wrap" onclick="return false;" href="'
15
- . Mage::helper('engage')->getRpxAuthUrl()
16
- . '">';
17
- $wrap_close = '</a>';
18
-
19
- $labelText = $this->getLabelText();
20
- if (empty($labelText))
21
- $labelText = 'Or log in with';
22
-
23
- $label = '<span class="rpx_label">' . $labelText . '</span>';
24
- $rpx_buttons = '';
25
- foreach ($providers as $val) {
26
- $rpx_buttons .= '<span class="jn-icon jn-size' . $size . ' jn-' . $val . '" title="' . htmlentities($val) . '"></span>';
27
- }
28
- $buttons = '<span class="rpx_button">' . $rpx_buttons . '</span><span class="rpx_clear"></span>';
29
-
30
- return $wrap_open . $label . $buttons . $wrap_close;
31
-
32
- }
33
-
34
- }
35
  }
36
 
37
  protected function _toHtml() {
3
  class Janrain_Engage_Block_Auth extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface {
4
 
5
  function rpx_small_buttons() {
6
+ return '<div id="janrainEngageEmbed"></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  }
8
 
9
  protected function _toHtml() {
app/code/community/Janrain/Engage/Block/Share.php CHANGED
@@ -2,15 +2,15 @@
2
 
3
  class Janrain_Engage_Block_Share extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface {
4
 
5
- public function rpx_social_icons() {
6
  $social_pub = Mage::getStoreConfig('engage/vars/socialpub');
7
  $social_providers = array_filter(explode(',', $social_pub));
8
  if (is_array($social_providers)) {
9
  $rpx_social_icons = '';
10
  foreach ($social_providers as $val) {
11
- $rpx_social_icons .= '<div class="jn-icon jn-size16 jn-' . $val . '"></div>';
12
  }
13
- $buttons = '<div class="rpx_social_icons">' . $rpx_social_icons . '</div>';
14
  return $buttons;
15
  }
16
  return false;
@@ -23,10 +23,16 @@ class Janrain_Engage_Block_Share extends Mage_Core_Block_Abstract implements Mag
23
  */
24
  protected function _toHtml() {
25
  $link = '';
26
-
27
- if ($icons = $this->rpx_social_icons()) {
28
- $link .= '<div class="rpxsocial rpx_tooltip" id="janrainEngageShare">';
29
- $link .= '<span class="rpxsharebutton">share</span><div class="rpx_share_tip">Share this on:<br />' . $icons . '</div></div>';
 
 
 
 
 
 
30
  }
31
 
32
  return $link;
@@ -35,9 +41,9 @@ class Janrain_Engage_Block_Share extends Mage_Core_Block_Abstract implements Mag
35
  protected function _prepareLayout() {
36
  if ($this->getLayout()->getBlock('janrain_engage_share') == false) {
37
  $block = $this->getLayout()
38
- ->createBlock('core/template', 'janrain_engage_share')
39
- ->setData('message', $this->getShareText())
40
- ->setTemplate('janrain/engage/share.phtml');
41
  $this->getLayout()->getBlock('before_body_end')->insert($block);
42
  }
43
 
2
 
3
  class Janrain_Engage_Block_Share extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface {
4
 
5
+ public function rpx_social_icons($onclick) {
6
  $social_pub = Mage::getStoreConfig('engage/vars/socialpub');
7
  $social_providers = array_filter(explode(',', $social_pub));
8
  if (is_array($social_providers)) {
9
  $rpx_social_icons = '';
10
  foreach ($social_providers as $val) {
11
+ $rpx_social_icons .= '<span class="janrain-provider-icon-16 janrain-provider-icon-'.$val.'" rel="'.$val.'" onclick="'.$onclick.'"></span>';
12
  }
13
+ $buttons = '<span class="rpx_social_icons">' . $rpx_social_icons . '</span>';
14
  return $buttons;
15
  }
16
  return false;
23
  */
24
  protected function _toHtml() {
25
  $link = '';
26
+ $share_url = $this->getShareUrl() ? "'{$this->getShareUrl()}'" : 'document.location.href';
27
+ $share_title = $this->getShareTitle() ? "'{$this->getShareTitle()}'" : 'document.title';
28
+ $share_desc = $this->getShareDesc() ? "'{$this->getShareDesc()}'" : "document.getElementsByName('description')[0].getAttribute('content')";
29
+ $share_img = $this->getShareImg() ? "'{$this->getShareImg()}'" : "document.getElementById('image').getAttribute('src')";
30
+ $share_img = $share_img ? $share_img : 'null';
31
+ $button_text = $this->getButtonText() ? $this->getButtonText() : 'Share on';
32
+ $onclick = "try { setShare($share_url, $share_title, $share_desc, $share_img, this.getAttribute('rel')); } catch (e) { setShare($share_url, $share_title, $share_desc, null, this.getAttribute('rel')) } ";
33
+
34
+ if ($icons = $this->rpx_social_icons($onclick)) {
35
+ $link .= '<div class="janrain-share-container"><span class="janrain-share-text">' . $button_text . '</span>'.$icons.'</div>';
36
  }
37
 
38
  return $link;
41
  protected function _prepareLayout() {
42
  if ($this->getLayout()->getBlock('janrain_engage_share') == false) {
43
  $block = $this->getLayout()
44
+ ->createBlock('core/template', 'janrain_engage_share')
45
+ ->setData('message', $this->getShareText())
46
+ ->setTemplate('janrain/engage/share.phtml');
47
  $this->getLayout()->getBlock('before_body_end')->insert($block);
48
  }
49
 
app/code/community/Janrain/Engage/Block/Xdcomm.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
-
3
- class Janrain_Engage_Block_Xdcomm extends Mage_Core_Block_Abstract {
4
-
5
- protected function _toHtml() {
6
- $html = '
7
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
8
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9
- <html xmlns="http://www.w3.org/1999/xhtml" >
10
- <head>
11
- <title>Cross-Domain Receiver Page</title>
12
- </head>
13
- <body>
14
- <script type="text/javascript">
15
- var rpxJsHost = (("https:" == document.location.protocol) ? "https://" : "http://static.");
16
- document.write(unescape("%3Cscript src=\'" + rpxJsHost + "rpxnow.com/js/lib/xdcomm.js\' type=\'text/javascript\'%3E%3C/script%3E"));
17
- </script>
18
- </body>
19
- </html>
20
- ';
21
-
22
- return $html;
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Janrain/Engage/Helper/Identifiers.php CHANGED
@@ -14,9 +14,10 @@ class Janrain_Engage_Helper_Identifiers extends Mage_Core_Helper_Abstract {
14
  * Make the save
15
  *
16
  */
 
17
  try {
18
  Mage::getModel('engage/identifiers')
19
- ->setIdentifier($profile['identifier'])
20
  ->setProvider($profile['provider'])
21
  ->setProfileName($profile['profile_name'])
22
  ->setCustomerId($customer_id)
@@ -33,11 +34,11 @@ class Janrain_Engage_Helper_Identifiers extends Mage_Core_Helper_Abstract {
33
  * @return Mage_Customer_Model_Customer
34
  */
35
  public function get_customer($identifier) {
 
36
  $customer_id = Mage::getModel('engage/identifiers')
37
  ->getCollection()
38
  ->addFieldToFilter('identifier', $identifier)
39
  ->getFirstItem();
40
-
41
  $customer_id = $customer_id->getCustomerId();
42
  if ((int) $customer_id > 0) {
43
  $customer = Mage::getModel('customer/customer')
@@ -46,7 +47,6 @@ class Janrain_Engage_Helper_Identifiers extends Mage_Core_Helper_Abstract {
46
  ->getFirstItem();
47
  return $customer;
48
  }
49
-
50
  return false;
51
  }
52
 
14
  * Make the save
15
  *
16
  */
17
+ $urlCleanedIdentifier = urlencode($profile['identifier']);
18
  try {
19
  Mage::getModel('engage/identifiers')
20
+ ->setIdentifier($urlCleanedIdentifier)
21
  ->setProvider($profile['provider'])
22
  ->setProfileName($profile['profile_name'])
23
  ->setCustomerId($customer_id)
34
  * @return Mage_Customer_Model_Customer
35
  */
36
  public function get_customer($identifier) {
37
+ $identifier = urlencode($identifier);
38
  $customer_id = Mage::getModel('engage/identifiers')
39
  ->getCollection()
40
  ->addFieldToFilter('identifier', $identifier)
41
  ->getFirstItem();
 
42
  $customer_id = $customer_id->getCustomerId();
43
  if ((int) $customer_id > 0) {
44
  $customer = Mage::getModel('customer/customer')
47
  ->getFirstItem();
48
  return $customer;
49
  }
 
50
  return false;
51
  }
52
 
app/code/community/Janrain/Engage/Helper/Rpxcall.php CHANGED
@@ -15,7 +15,7 @@ class Janrain_Engage_Helper_Rpxcall extends Mage_Core_Helper_Abstract {
15
  ->saveConfig('engage/vars/realmscheme', $lookup_rp->realmScheme)
16
  ->saveConfig('engage/vars/appid', $lookup_rp->appId)
17
  ->saveConfig('engage/vars/adminurl', $lookup_rp->adminUrl)
18
- ->saveConfig('engage/vars/socialpub', $lookup_rp->socialPub)
19
  ->saveConfig('engage/vars/enabled_providers', $lookup_rp->signinProviders)
20
  ->saveConfig('engage/vars/apikey', Mage::getStoreConfig('engage/options/apikey'));
21
  Mage::getConfig()->reinit();
15
  ->saveConfig('engage/vars/realmscheme', $lookup_rp->realmScheme)
16
  ->saveConfig('engage/vars/appid', $lookup_rp->appId)
17
  ->saveConfig('engage/vars/adminurl', $lookup_rp->adminUrl)
18
+ ->saveConfig('engage/vars/socialpub', $lookup_rp->shareProviders)
19
  ->saveConfig('engage/vars/enabled_providers', $lookup_rp->signinProviders)
20
  ->saveConfig('engage/vars/apikey', Mage::getStoreConfig('engage/options/apikey'));
21
  Mage::getConfig()->reinit();
app/code/community/Janrain/Engage/controllers/RpxController.php CHANGED
@@ -31,8 +31,7 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
31
  if (!$this->_getSession()->authenticate($this)) {
32
  $this->setFlag('', 'no-dispatch', true);
33
  }
34
- }
35
- else {
36
  $this->_getSession()->setNoReferer(true);
37
  }
38
  }
@@ -58,13 +57,13 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
58
  $customer = Mage::helper('engage/identifiers')->get_customer($auth_info->profile->identifier);
59
 
60
  if ($customer === false) {
61
- if (isset($auth_info->profile) && isset($auth_info->profile->verifiedEmail))
62
  $email = $auth_info->profile->verifiedEmail;
63
- else if (isset($auth_info->profile) && isset($auth_info->profile->email))
64
  $email = $auth_info->profile->email;
65
- else
66
  $email = '';
67
-
68
  $firstName = Mage::helper('engage/rpxcall')->getFirstName($auth_info);
69
  $lastName = Mage::helper('engage/rpxcall')->getLastName($auth_info);
70
  $profile = Mage::helper('engage')->buildProfile($auth_info);
@@ -75,9 +74,8 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
75
  // ->getCollection()
76
  // ->addFieldToFilter('email', $email)
77
  // ->getFirstItem();
78
-
79
- if (Mage::getStoreConfig('engage/options/seamless') == '1'
80
- && $email && $firstName && $lastName) {
81
  $customer = Mage::getModel('customer/customer')->setId(null);
82
  $customer->getGroupId();
83
  $customer->setFirstname($firstName);
@@ -90,8 +88,7 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
90
  Mage::register('current_customer', $customer);
91
 
92
  $this->_forward('createPost');
93
- }
94
- else {
95
  $this->loadLayout();
96
  $block = Mage::getSingleton('core/layout')->getBlock('customer_form_register');
97
  if ($block !== false) {
@@ -109,8 +106,7 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
109
  Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);
110
  $this->_loginPostRedirect();
111
  }
112
- }
113
- else {
114
  $session->addWarning('Could not retrieve account info. Please try again.');
115
  $this->_redirect('customer/account/login');
116
  }
@@ -139,8 +135,7 @@ class Janrain_Engage_RpxController extends Mage_Customer_AccountController {
139
  Mage::helper('engage/identifiers')->save_identifier($customer_id, $profile);
140
 
141
  $session->addSuccess('New provider successfully added.');
142
- }
143
- else {
144
  $session->addWarning('Could not add Provider. This account is already associated with a user.');
145
  }
146
 
31
  if (!$this->_getSession()->authenticate($this)) {
32
  $this->setFlag('', 'no-dispatch', true);
33
  }
34
+ } else {
 
35
  $this->_getSession()->setNoReferer(true);
36
  }
37
  }
57
  $customer = Mage::helper('engage/identifiers')->get_customer($auth_info->profile->identifier);
58
 
59
  if ($customer === false) {
60
+ if (isset($auth_info->profile) && isset($auth_info->profile->verifiedEmail)) {
61
  $email = $auth_info->profile->verifiedEmail;
62
+ } elseif (isset($auth_info->profile) && isset($auth_info->profile->email)) {
63
  $email = $auth_info->profile->email;
64
+ } else {
65
  $email = '';
66
+ }
67
  $firstName = Mage::helper('engage/rpxcall')->getFirstName($auth_info);
68
  $lastName = Mage::helper('engage/rpxcall')->getLastName($auth_info);
69
  $profile = Mage::helper('engage')->buildProfile($auth_info);
74
  // ->getCollection()
75
  // ->addFieldToFilter('email', $email)
76
  // ->getFirstItem();
77
+ $isSeamless = ('1' == Mage::getStoreConfig('engage/options/seamless'));
78
+ if ($isSeamless && $email && $firstName && $lastName) {
 
79
  $customer = Mage::getModel('customer/customer')->setId(null);
80
  $customer->getGroupId();
81
  $customer->setFirstname($firstName);
88
  Mage::register('current_customer', $customer);
89
 
90
  $this->_forward('createPost');
91
+ } else {
 
92
  $this->loadLayout();
93
  $block = Mage::getSingleton('core/layout')->getBlock('customer_form_register');
94
  if ($block !== false) {
106
  Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);
107
  $this->_loginPostRedirect();
108
  }
109
+ } else {
 
110
  $session->addWarning('Could not retrieve account info. Please try again.');
111
  $this->_redirect('customer/account/login');
112
  }
135
  Mage::helper('engage/identifiers')->save_identifier($customer_id, $profile);
136
 
137
  $session->addSuccess('New provider successfully added.');
138
+ } else {
 
139
  $session->addWarning('Could not add Provider. This account is already associated with a user.');
140
  }
141
 
app/code/community/Janrain/Engage/controllers/XdcommController.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- class Janrain_Engage_XdcommController extends Mage_Core_Controller_Front_Action {
4
-
5
- public function indexAction() {
6
- $this->loadLayout();
7
- $block = $this->getLayout()->createBlock('engage/xdcomm');
8
- $this->getResponse()->setBody($block->toHtml());
9
- }
10
-
11
- }
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Janrain/Engage/etc/widget.xml CHANGED
@@ -3,36 +3,6 @@
3
  <engage_auth type="engage/auth" translate="name description" module="engage">
4
  <name>Janrain Engage Login</name>
5
  <description type="desc">Adds a link to open the Engage authentication dialog</description>
6
- <parameters>
7
- <label_text>
8
- <required>0</required>
9
- <visible>1</visible>
10
- <label>Label Text</label>
11
- <description>The text to display before Provider Icons. Defaults to 'Or log in with'</description>
12
- <type>text</type>
13
- </label_text>
14
- <size>
15
- <required>0</required>
16
- <visible>1</visible>
17
- <label>Widget Style</label>
18
- <type>select</type>
19
- <value>large</value>
20
- <values>
21
- <default translate="label">
22
- <value>large</value>
23
- <label>Large Icons</label>
24
- </default>
25
- <small translate="label">
26
- <value>small</value>
27
- <label>Small Icons</label>
28
- </small>
29
- <inline translate="label">
30
- <value>inline</value>
31
- <label>Inline</label>
32
- </inline>
33
- </values>
34
- </size>
35
- </parameters>
36
  </engage_auth>
37
  <engage_share type="engage/share" translate="name description" module="engage">
38
  <name>Janrain Engage Social Sharing</name>
@@ -45,6 +15,13 @@
45
  <description>The default text to share in the Social Sharing widget (i.e. Check this out!)</description>
46
  <type>text</type>
47
  </share_text>
 
 
 
 
 
 
 
48
  </parameters>
49
  </engage_share>
50
- </widgets>
3
  <engage_auth type="engage/auth" translate="name description" module="engage">
4
  <name>Janrain Engage Login</name>
5
  <description type="desc">Adds a link to open the Engage authentication dialog</description>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  </engage_auth>
7
  <engage_share type="engage/share" translate="name description" module="engage">
8
  <name>Janrain Engage Social Sharing</name>
15
  <description>The default text to share in the Social Sharing widget (i.e. Check this out!)</description>
16
  <type>text</type>
17
  </share_text>
18
+ <button_text>
19
+ <required>0</required>
20
+ <visible>1</visible>
21
+ <label>Button Text</label>
22
+ <description>The text to appear in the share button. Defaults to 'Share on'</description>
23
+ <type>text</type>
24
+ </button_text>
25
  </parameters>
26
  </engage_share>
27
+ </widgets>
app/design/frontend/base/default/layout/engage.xml CHANGED
@@ -1,22 +1,18 @@
1
  <?xml version="1.0"?>
2
-
3
  <layout version="0.1.0">
4
- <!-- Load style on every page. This will be fixed later. -->
5
  <default>
6
  <reference name="head">
7
- <block type="core/template"
8
- name="janrain_engage_styles"
9
- template="janrain/engage/styles.phtml"/>
10
  </reference>
11
  </default>
12
-
13
- <!-- Use our own register.phtml with no password fields and custom action -->
14
  <engage_rpx_token_url>
15
  <label>Customer Account Registration Form</label>
16
  <!-- Mage_Customer -->
17
  <remove name="right"/>
18
  <remove name="left"/>
19
-
20
  <reference name="root">
21
  <action method="setTemplate">
22
  <template>page/1column.phtml</template>
@@ -30,14 +26,12 @@
30
  </block>
31
  </reference>
32
  </engage_rpx_token_url>
33
-
34
- <!-- Ask users what they want to do when they enter an existing customer email address -->
35
  <engage_rpx_duplicate>
36
  <label>Customer Account Registration Form</label>
37
- <!-- Mage_Customer -->
38
  <remove name="right"/>
39
  <remove name="left"/>
40
-
41
  <reference name="root">
42
  <action method="setTemplate">
43
  <template>page/1column.phtml</template>
@@ -51,26 +45,4 @@
51
  </block>
52
  </reference>
53
  </engage_rpx_duplicate>
54
-
55
- <!-- Customer Dashboard block -->
56
- <customer_account_index>
57
- <!-- Scripts/Styles -->
58
- <reference name="before_body_end">
59
- <block type="core/template"
60
- name="janrain_engage_scripts"
61
- template="janrain/engage/scripts_dashboard.phtml"/>
62
- </reference>
63
- <reference name="head">
64
- <block type="core/template"
65
- name="janrain_engage_styles"
66
- template="janrain/engage/styles.phtml"/>
67
- </reference>
68
-
69
- <reference name="content">
70
- <block type="core/template"
71
- name="janrain_engage_dashboard"
72
- after="-"
73
- template="janrain/engage/dashboard.phtml"/>
74
- </reference>
75
- </customer_account_index>
76
  </layout>
1
  <?xml version="1.0"?>
 
2
  <layout version="0.1.0">
3
+ <!-- Load style on every page. This will be fixed later. -->
4
  <default>
5
  <reference name="head">
6
+ <block type="core/template" name="janrain_engage_styles" template="janrain/engage/styles.phtml"/>
7
+ <block type="core/template" name="janrain_engage_share" template="janrain/engage/share.phtml"/>
 
8
  </reference>
9
  </default>
10
+ <!-- Use our own register.phtml with no password fields and custom action -->
 
11
  <engage_rpx_token_url>
12
  <label>Customer Account Registration Form</label>
13
  <!-- Mage_Customer -->
14
  <remove name="right"/>
15
  <remove name="left"/>
 
16
  <reference name="root">
17
  <action method="setTemplate">
18
  <template>page/1column.phtml</template>
26
  </block>
27
  </reference>
28
  </engage_rpx_token_url>
29
+ <!-- Ask users what they want to do when they enter an existing customer email address -->
 
30
  <engage_rpx_duplicate>
31
  <label>Customer Account Registration Form</label>
32
+ <!-- Mage_Customer -->
33
  <remove name="right"/>
34
  <remove name="left"/>
 
35
  <reference name="root">
36
  <action method="setTemplate">
37
  <template>page/1column.phtml</template>
45
  </block>
46
  </reference>
47
  </engage_rpx_duplicate>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  </layout>
app/design/frontend/base/default/template/janrain/engage/auth.phtml CHANGED
@@ -4,9 +4,10 @@
4
  if (typeof janrain.settings !== "object") window.janrain.settings = {};
5
 
6
  janrain.settings.tokenUrl = "<?php echo Mage::getUrl('engage/rpx/token_url') ?>";
7
- janrain.settings.appId = "<?php echo Mage::getStoreConfig('engage/vars/appid') ?>";
8
- janrain.settings.appUrl = "https://<?php echo Mage::getStoreConfig('engage/vars/realm') ?>";
9
- janrain.settings.type = '<?php echo $this->size; ?>';
 
10
 
11
  function isReady() {
12
  janrain.ready = true;
4
  if (typeof janrain.settings !== "object") window.janrain.settings = {};
5
 
6
  janrain.settings.tokenUrl = "<?php echo Mage::getUrl('engage/rpx/token_url') ?>";
7
+ janrain.settings.appId = "<?php echo Mage::getStoreConfig('engage/vars/appid') ?>";
8
+ janrain.settings.appUrl = "https://<?php echo Mage::getStoreConfig('engage/vars/realm') ?>";
9
+ janrain.settings.type = 'embed';
10
+ janrain.settings.format = 'one row';
11
 
12
  function isReady() {
13
  janrain.ready = true;
app/design/frontend/base/default/template/janrain/engage/share.phtml CHANGED
@@ -7,9 +7,6 @@
7
  else janrain.settings.packages.push('share');
8
 
9
  janrain.settings.share.message = "<?php echo $this->message; ?>";
10
- janrain.settings.share.title = "<?php echo Mage::getSingleton('cms/page')->getTitle(); ?>";
11
- janrain.settings.share.url = "<?php echo Mage::helper('core/url')->getCurrentUrl(); ?>";
12
- janrain.settings.share.description = "";
13
 
14
  function isReady() { janrain.ready = true; };
15
  if (document.addEventListener) {
@@ -23,12 +20,21 @@
23
  e.id = 'janrainWidgets';
24
 
25
  if (document.location.protocol === 'https:') {
26
- e.src = 'https://rpxnow.com/js/lib/<?php echo Mage::helper('engage')->rpxRealmName() ?>/share_beta.js';
27
  } else {
28
- e.src = 'http://widget-cdn.rpxnow.com/js/lib/<?php echo Mage::helper('engage')->rpxRealmName() ?>/share_beta.js';
29
  }
30
 
31
  var s = document.getElementsByTagName('script')[0];
32
  s.parentNode.insertBefore(e, s);
33
  })();
 
 
 
 
 
 
 
 
 
34
  </script>
7
  else janrain.settings.packages.push('share');
8
 
9
  janrain.settings.share.message = "<?php echo $this->message; ?>";
 
 
 
10
 
11
  function isReady() { janrain.ready = true; };
12
  if (document.addEventListener) {
20
  e.id = 'janrainWidgets';
21
 
22
  if (document.location.protocol === 'https:') {
23
+ e.src = 'https://rpxnow.com/js/lib/<?php echo Mage::helper('engage')->rpxRealmName() ?>/widget.js';
24
  } else {
25
+ e.src = 'http://widget-cdn.rpxnow.com/js/lib/<?php echo Mage::helper('engage')->rpxRealmName() ?>/widget.js';
26
  }
27
 
28
  var s = document.getElementsByTagName('script')[0];
29
  s.parentNode.insertBefore(e, s);
30
  })();
31
+ function setShare(url, title, desc, img, provider)
32
+ {
33
+ janrain.engage.share.setUrl(url);
34
+ janrain.engage.share.setTitle(title);
35
+ janrain.engage.share.setDescription(desc);
36
+ janrain.engage.share.setImage(img);
37
+ janrain.engage.share.showProvider(provider);
38
+ janrain.engage.share.show();
39
+ }
40
  </script>
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Janrain_Engage_Plugin</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
- <license>ASL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Social Login and Social Sharing</summary>
10
- <description>Speed login and registration, drive referrals and engagement.</description>
11
- <notes>Upgraded widgets to latest all-javascript versions, added seamless registration.</notes>
12
- <authors><author><name>Janrain</name><user>auto-converted</user><email>magento@janrain.com</email></author><author><name>Bryce Hamrick</name><user>auto-converted</user><email>bryce@janrain.com</email></author></authors>
13
- <date>2012-05-16</date>
14
- <time>20:19:15</time>
15
- <contents><target name="magecommunity"><dir name="Janrain"><dir name="Engage"><dir name="Block"><file name="Accountdata.php" hash="13d0a94f22fe6606140a7df0e3bf940f"/><file name="Auth.php" hash="ead05d0daac9aa2af02d207234f2b532"/><file name="Info.php" hash="83bc006b05eba79c576bd495c2e4b7da"/><file name="Share.php" hash="17c1a5dbaa91998d0ba5d4931ae06d75"/><file name="Xdcomm.php" hash="1cf135ad6c7ce1ce10d22d43ffb28ff4"/></dir><dir name="Helper"><file name="Data.php" hash="5fd11f0bb2142d05a854b06ded0350bf"/><file name="Identifiers.php" hash="82df0bf18a9065bb1b9b8e2d7d437f02"/><file name="Rpxcall.php" hash="33c0920753282bc10be42c268bdf66fb"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Identifiers"><file name="Collection.php" hash="55b32ceef6b7264c62833d7ed25bad13"/></dir><file name="Identifiers.php" hash="0caed34306118b774a903df2feb51169"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="797bbf70f12b86487b1cda632e236cfb"/></dir></dir></dir><file name="Identifiers.php" hash="4e996d44faaa79db5cebd8e11b2e0583"/><file name="Observer.php" hash="9639e480dfc1f20f8ffb25035031b71f"/><file name="Session.php" hash="b95af8380dc2b6290fa9597e2ee47e4a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LookupController.php" hash="e3c27cae9aa55ab4a8631296d99bc243"/></dir><file name="RpxController.php" hash="de41c3eac8fcbe4f4e0301f063b629e2"/><file name="XdcommController.php" hash="0ec06d387ca2fac28540901c0d2fff8d"/></dir><dir name="etc"><file name="config.xml" hash="8e3937e2ea8668df4a6583ab240c63e4"/><file name="system.xml" hash="fbb4521b0ac40230c882d567bae187f4"/><file name="widget.xml" hash="45f819c99605e20d3ebf09e2ac52d463"/></dir><dir name="sql"><dir name="engage_setup"><file name="mysql4-install-1.2.0.php" hash="2ce66b0568ed83142c04c2ff03f0db0c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="janrain"><dir name="engage"><file name="auth.phtml" hash="8e61ad42095e824e4adc5ca85616bed8"/><file name="dashboard.phtml" hash="9b793510890bc556f93ea7a5d32c2ac0"/><file name="duplicate.phtml" hash="771e6676b6d1f42283740deacafab4d8"/><file name="register.phtml" hash="9273f30fece25a7cc2503fdfd2d1b891"/><file name="scripts_dashboard.phtml" hash="cb39c9c75df2d30a6a739aa0072be045"/><file name="share.phtml" hash="a037fd0864641e925429057e74c9ce7f"/><file name="styles.phtml" hash="3be45ace87bbb5f498b23458fa6297a3"/></dir></dir></dir><dir name="layout"><file name="engage.xml" hash="5258f3bc17340a6c30818375ff886766"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Janrain_Engage.xml" hash="b13e55afe8a48e56ab57768870cfb7bc"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Janrain_Engage.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="janrain"><file name="jn-icons16.png" hash="b32bc05f1eeeed0b1859141df0d11506"/><file name="jn-icons32.png" hash="ccbef20afccb55f28a3fe2869a91a5f0"/><file name="stylesheet.css" hash="fd4b593c28a2dc87124ba7a488d7db5b"/></dir></dir></target></contents>
 
 
16
  <compatible/>
17
- <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Janrain_Engage_Plugin</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/Apache-2.0">ASL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Janrain Engage Social Login and Sharing</summary>
10
+ <description>Janrain Engage Social Login and Social Sharing Magento extension.&#xD;
11
+ &#xD;
12
+ Formerly RPX.</description>
13
+ <notes>Many MANY bug fixes</notes>
14
+ <authors><author><name>Janrain</name><user>Janrain</user><email>magento@janrain.com</email></author></authors>
15
+ <date>2013-05-31</date>
16
+ <time>23:00:17</time>
17
+ <contents><target name="magecommunity"><dir name="Janrain"><dir name="Engage"><dir name="Block"><file name="Accountdata.php" hash="90a8f7352ba9b1f0e54024aa1cf6ada2"/><file name="Auth.php" hash="f07d9dcf68a6cb7dfb31c8de49f61327"/><file name="Info.php" hash="83bc006b05eba79c576bd495c2e4b7da"/><file name="Share.php" hash="6dcaa98ae70f759829a06be51496082e"/><file name=".DS_Store" hash="77d1c1fbc583448f6e4550b3e5bbddd2"/></dir><dir name="Helper"><file name="Data.php" hash="5fd11f0bb2142d05a854b06ded0350bf"/><file name="Identifiers.php" hash="ae4a867e3451a5cf15e916e3af497864"/><file name="Rpxcall.php" hash="1ca07d0841e06fdddc15a3c18d6b30fc"/></dir><dir name="Model"><file name="Identifiers.php" hash="4e996d44faaa79db5cebd8e11b2e0583"/><dir name="Mysql4"><dir name="Identifiers"><file name="Collection.php" hash="55b32ceef6b7264c62833d7ed25bad13"/></dir><file name="Identifiers.php" hash="0caed34306118b774a903df2feb51169"/></dir><file name="Observer.php" hash="9639e480dfc1f20f8ffb25035031b71f"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="797bbf70f12b86487b1cda632e236cfb"/></dir></dir></dir><file name="Session.php" hash="b95af8380dc2b6290fa9597e2ee47e4a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LookupController.php" hash="e3c27cae9aa55ab4a8631296d99bc243"/></dir><file name="RpxController.php" hash="2f7ff776ab393f31c67f6f12a0b25d30"/></dir><dir name="etc"><file name="config.xml" hash="8e3937e2ea8668df4a6583ab240c63e4"/><file name="system.xml" hash="fbb4521b0ac40230c882d567bae187f4"/><file name="widget.xml" hash="d9cc7143fe792fa2464a0e351b814f2f"/></dir><dir name="sql"><dir name="engage_setup"><file name="mysql4-install-1.2.0.php" hash="2ce66b0568ed83142c04c2ff03f0db0c"/></dir></dir><file name=".DS_Store" hash="fddc4469702e27e0b2d7c0401f127869"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="engage.xml" hash="12267f3a1850fb4657d490304c2a1020"/></dir><dir name="template"><dir name="janrain"><dir name="engage"><file name="auth.phtml" hash="6a8c7ff28f7df0265f7eb474ee699f1b"/><file name="dashboard.phtml" hash="9b793510890bc556f93ea7a5d32c2ac0"/><file name="duplicate.phtml" hash="771e6676b6d1f42283740deacafab4d8"/><file name="register.phtml" hash="9273f30fece25a7cc2503fdfd2d1b891"/><file name="scripts_dashboard.phtml" hash="cb39c9c75df2d30a6a739aa0072be045"/><file name="share.phtml" hash="8da857b28c5e2f84f9ee36472e18882d"/><file name="styles.phtml" hash="3be45ace87bbb5f498b23458fa6297a3"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Janrain_Engage.xml" hash="b13e55afe8a48e56ab57768870cfb7bc"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Janrain_Engage.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="janrain"><file name="stylesheet.css" hash="262fd7545136be7bf014f0b3090cac0f"/></dir></dir></target></contents>
18
  <compatible/>
19
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
skin/frontend/janrain/jn-icons16.png DELETED
Binary file
skin/frontend/janrain/jn-icons32.png DELETED
Binary file
skin/frontend/janrain/stylesheet.css CHANGED
@@ -1,143 +1,27 @@
1
- .rpx_link_wrap {
2
- display:inline-block;
3
- text-decoration:none;
4
- outline:none;
5
- }
6
-
7
- .rpx_link_wrap:hover {
8
- text-decoration:none;
9
- }
10
-
11
- .rpxsocial { /* has dynamic items in head */
12
- display:inline;
13
- font-size:14px;
14
- font-family:sans-serif;
15
- color:#FFF;
16
- background-color:#074764;
17
- background-repeat:no-repeat;
18
- background-position:2px center;
19
- -webkit-border-radius:3px;
20
- -moz-border-radius:3px;
21
- border-radius:3px;
22
- padding:4px 4px 2px 6px;
23
- }
24
- .rpxsocial:hover {cursor:pointer;}
25
-
26
- .rpx_social_icons {
27
- display:block;
28
- position:relative;
29
- width:78px; height:17px;
30
- margin-left:auto; margin-right:auto;
31
- }
32
-
33
-
34
- .rpx_label {
35
- font-size:small;
36
- color:#666;
37
- margin:3px;
38
- padding:0px;
39
- display:block;
40
- }
41
-
42
- .rpx_tooltip {
43
- position:relative;
44
- }
45
-
46
- .rpx_tooltip .rpx_share_tip {
47
- margin:0px;
48
- margin-left:-999em;
49
- position:absolute;
50
- padding:3px;
51
- }
52
 
53
- .rpx_tooltip:hover .rpx_share_tip {
54
- border-radius:5px 5px; -moz-border-radius:5px; -webkit-border-radius:5px;
55
  font-family:sans-serif;
56
- position: absolute;left:12px; top:-50px; z-index:99;
57
- width:90px;
58
- margin-left:0px;
59
- border:1px solid #666;
60
- }
61
-
62
- .rpx_share_tip {
63
- padding:7px;
64
  background: #F0F0F0;
65
  color:#666;
 
 
 
66
  }
67
 
68
- .rpx_clear {
69
- clear:both;
70
- }
71
-
72
- .rpx_button {
73
- margin:4px 6px 16px 0px;
74
- padding:0px 5px 5px 0px;
75
  }
76
 
77
- .jn-icon {
78
- display:inline-block;
79
- background-repeat:no-repeat;
80
- border:0;
81
- margin:0;
82
- float: none;
83
  }
84
 
85
- .jn-icon:hover { cursor:pointer; }
86
-
87
- .jn-size30 {
88
- width:30px;
89
- height:30px;
90
- background-image:url('jn-icons32.png');
91
  }
92
-
93
- .jn-size16 {
94
- width:16px;
95
- height:16px;
96
- background-image:url('jn-icons16.png');
97
- }
98
-
99
- .jn-size16.jn-facebook { background-position:0px 0px; }
100
- .jn-size16.jn-google { background-position:0px -16px; }
101
- .jn-size16.jn-linkedin { background-position:0px -32px; }
102
- .jn-size16.jn-myspace { background-position:0px -48px; }
103
- .jn-size16.jn-twitter { background-position:0px -64px; }
104
- .jn-size16.jn-live_id { background-position:0px -80px; }
105
- .jn-size16.jn-yahoo { background-position:0px -96px; }
106
- .jn-size16.jn-aol { background-position:0px -112px; }
107
- .jn-size16.jn-blogger { background-position:0px -128px; }
108
- .jn-size16.jn-flickr { background-position:0px -144px; }
109
- .jn-size16.jn-hyves { background-position:0px -160px; }
110
- .jn-size16.jn-livejournal { background-position:0px -176px; }
111
- .jn-size16.jn-myopenid { background-position:0px -192px; }
112
- .jn-size16.jn-netlog { background-position:0px -208px; }
113
- .jn-size16.jn-openid { background-position:0px -224px; }
114
- .jn-size16.jn-verisign { background-position:0px -240px; }
115
- .jn-size16.jn-wordpress { background-position:0px -256px; }
116
- .jn-size16.jn-paypal { background-position:0px -272px; }
117
- .jn-size16.jn-orkut { background-position:0px -288px; }
118
- .jn-size16.jn-vzn { background-position:0px -304px; }
119
- .jn-size16.jn-salesforce { background-position:0px -320px; }
120
- .jn-size16.jn-foursquare { background-position:0px -336px; }
121
-
122
- .jn-size30.jn-facebook { background-position:0px 0px; }
123
- .jn-size30.jn-google { background-position:0px -30px; }
124
- .jn-size30.jn-linkedin { background-position:0px -60px; }
125
- .jn-size30.jn-myspace { background-position:0px -90px; }
126
- .jn-size30.jn-twitter { background-position:0px -120px; }
127
- .jn-size30.jn-live_id { background-position:0px -150px; }
128
- .jn-size30.jn-yahoo { background-position:0px -180px; }
129
- .jn-size30.jn-aol { background-position:0px -210px; }
130
- .jn-size30.jn-blogger { background-position:0px -240px; }
131
- .jn-size30.jn-flickr { background-position:0px -270px; }
132
- .jn-size30.jn-hyves { background-position:0px -300px; }
133
- .jn-size30.jn-livejournal { background-position:0px -330px; }
134
- .jn-size30.jn-myopenid { background-position:0px -360px; }
135
- .jn-size30.jn-netlog { background-position:0px -390px; }
136
- .jn-size30.jn-openid { background-position:0px -420px; }
137
- .jn-size30.jn-verisign { background-position:0px -450px; }
138
- .jn-size30.jn-wordpress { background-position:0px -480px; }
139
- .jn-size30.jn-paypal { background-position:0px -510px; }
140
- .jn-size30.jn-orkut { background-position:0px -540px; }
141
- .jn-size30.jn-vzn { background-position:0px -570px; }
142
- .jn-size30.jn-salesforce { background-position:0px -600px; }
143
- .jn-size30.jn-foursquare { background-position:0px -630px; }
1
+ @import url('http://cdn.quilt.janrain.com/2.0.9/providers.css');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ .janrain-share-container {
4
+ display:inline-block;
5
  font-family:sans-serif;
6
+ margin-left: 0px;
7
+ padding:5px;
 
 
 
 
 
 
8
  background: #F0F0F0;
9
  color:#666;
10
+ -moz-border-radius: 3px;
11
+ -webkit-border-radius: 3px;
12
+ border-radius: 3px 3px;
13
  }
14
 
15
+ .janrain-share-text{
16
+ position: relative;
17
+ top: 1px;
 
 
 
 
18
  }
19
 
20
+ .janrain-provider-icon-16, .janrain-provider-icon-32 {
21
+ margin-left: 5px;
22
+ margin-bottom: 1px;
 
 
 
23
  }
24
 
25
+ .janrain-provider-icon-16:hover, .janrain-provider-icon-32:hover {
26
+ cursor:pointer;
 
 
 
 
27
  }