Gigya_Socialize - Version 2.0.0

Version Notes

This version includes the following Gigya plugins:
Social Login
Gigya Share + Share Bar
Gigya Reactions
Game Mechanics
Activity Feed
Rating & Reviews
Comments

Download this release

Release Info

Developer Yaniv Aran-Shamir
Extension Gigya_Socialize
Version 2.0.0
Comparing to
See all releases


Version 2.0.0

Files changed (61) hide show
  1. app/code/community/Gigya/Social/Block/Emailform.php +15 -0
  2. app/code/community/Gigya/Social/Block/Gamification/Notifications.php +20 -0
  3. app/code/community/Gigya/Social/Block/Gamification/Plugins.php +25 -0
  4. app/code/community/Gigya/Social/Block/Gamification/php_errors.log +1 -0
  5. app/code/community/Gigya/Social/Block/Html/Head.php +121 -0
  6. app/code/community/Gigya/Social/Block/Login.php +24 -0
  7. app/code/community/Gigya/Social/Block/Logout.php +19 -0
  8. app/code/community/Gigya/Social/Block/Ordersharebar.php +36 -0
  9. app/code/community/Gigya/Social/Block/Ratings.php +35 -0
  10. app/code/community/Gigya/Social/Block/Reviews.php +42 -0
  11. app/code/community/Gigya/Social/Block/Share.php +38 -0
  12. app/code/community/Gigya/Social/Block/php_errors.log +8 -0
  13. app/code/community/Gigya/Social/Helper/Data.php +177 -0
  14. app/code/community/Gigya/Social/Helper/php_errors.log +1 -0
  15. app/code/community/Gigya/Social/Model/Cart/Observer.php +36 -0
  16. app/code/community/Gigya/Social/Model/Cart/php_errors.log +5 -0
  17. app/code/community/Gigya/Social/Model/Config/Source/AllwaysShare.php +18 -0
  18. app/code/community/Gigya/Social/Model/Config/Source/Buttons.php +16 -0
  19. app/code/community/Gigya/Social/Model/Config/Source/CountType.php +16 -0
  20. app/code/community/Gigya/Social/Model/Config/Source/Counts.php +17 -0
  21. app/code/community/Gigya/Social/Model/Config/Source/Imageb.php +17 -0
  22. app/code/community/Gigya/Social/Model/Config/Source/Languages.php +45 -0
  23. app/code/community/Gigya/Social/Model/Config/Source/Layout.php +16 -0
  24. app/code/community/Gigya/Social/Model/Config/Source/Leaderboard.php +16 -0
  25. app/code/community/Gigya/Social/Model/Config/Source/Loginb.php +16 -0
  26. app/code/community/Gigya/Social/Model/Config/Source/Privacy.php +17 -0
  27. app/code/community/Gigya/Social/Model/Config/Source/Scope.php +16 -0
  28. app/code/community/Gigya/Social/Model/Customer/Observer.php +53 -0
  29. app/code/community/Gigya/Social/controllers/AdminController.php +34 -0
  30. app/code/community/Gigya/Social/controllers/LoginController.php +382 -0
  31. app/code/community/Gigya/Social/controllers/ReviewsController.php +94 -0
  32. app/code/community/Gigya/Social/controllers/php_errors.log +2 -0
  33. app/code/community/Gigya/Social/etc/config.xml +254 -0
  34. app/code/community/Gigya/Social/etc/system.xml +870 -0
  35. app/code/community/Gigya/Social/php_errors.log +17 -0
  36. app/code/community/Gigya/Social/sdk/GSSDK.php +1033 -0
  37. app/design/frontend/base/default/layout/gigya.xml +132 -0
  38. app/design/frontend/base/default/template/gigya/activityfeed.phtml +8 -0
  39. app/design/frontend/base/default/template/gigya/comments.phtml +18 -0
  40. app/design/frontend/base/default/template/gigya/form/emailForm.phtml +12 -0
  41. app/design/frontend/base/default/template/gigya/form/login.phtml +94 -0
  42. app/design/frontend/base/default/template/gigya/form/mini.login.phtml +14 -0
  43. app/design/frontend/base/default/template/gigya/gamification.phtml +11 -0
  44. app/design/frontend/base/default/template/gigya/login/link_accounts.phtml +8 -0
  45. app/design/frontend/base/default/template/gigya/login/social_login.phtml +8 -0
  46. app/design/frontend/base/default/template/gigya/login/social_login_login_page.phtml +15 -0
  47. app/design/frontend/base/default/template/gigya/php_errors.log +5 -0
  48. app/design/frontend/base/default/template/gigya/ratings.phtml +7 -0
  49. app/design/frontend/base/default/template/gigya/ratings/summary.phtml +27 -0
  50. app/design/frontend/base/default/template/gigya/ratings/summary_short.phtml +22 -0
  51. app/design/frontend/base/default/template/gigya/share/ordersharebar.phtml +11 -0
  52. app/design/frontend/base/default/template/gigya/share/reactions.phtml +25 -0
  53. app/design/frontend/base/default/template/gigya/share/sharebar.phtml +23 -0
  54. app/etc/modules/Gigya_Social.xml +8 -0
  55. js/gigya/gigya.js +345 -0
  56. package.xml +28 -0
  57. skin/frontend/base/default/css/gigya.css +33 -0
  58. skin/frontend/base/default/images/gigya/RateIcon_13.png +0 -0
  59. skin/frontend/base/default/images/gigya/RateIcon_13_pressed.png +0 -0
  60. skin/frontend/base/default/images/gigya/RateIcon_21.png +0 -0
  61. skin/frontend/base/default/images/gigya/RateIcon_21_pressed.png +0 -0
app/code/community/Gigya/Social/Block/Emailform.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Emailform
4
+ * @author
5
+ */
6
+ class Gigya_Social_Emailform extends Mage_Core_Block_Template
7
+ {
8
+ public function test()
9
+ {
10
+ Mage::log('test test');
11
+ return null;
12
+ }
13
+
14
+ }
15
+
app/code/community/Gigya/Social/Block/Gamification/Notifications.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Gamification_notifications
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Gamification_notifications extends Mage_Core_Block_Text_Tag_Js
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_gamification/gigya_gamification_conf') && $this->helper('customer')->isLoggedIn()) {
11
+ if (Mage::getStoreConfig('gigya_gamification/gigya_gamification_conf/notifications')) {
12
+ $js = 'var gigyaSettings = gigyaSettings || {}; gigyaSettings.gm = gigyaSettings.gm || {}; gigyaSettings.gm.notifications = true;';
13
+ $this->setContents($js);
14
+ return parent::_toHtml();
15
+ }
16
+ }
17
+ }
18
+ }
19
+
20
+
app/code/community/Gigya/Social/Block/Gamification/Plugins.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Gamification_Plugins
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Gamification_Plugins extends Mage_Core_Block_Template
7
+ {
8
+
9
+ protected function _beforeToHtml()
10
+ {
11
+ $validPlugins = array('Achievements', 'ChallengeStatus', 'UserStatus', 'Leaderboard');
12
+ $layout = $this->getData('layout');
13
+ $html = '';
14
+ foreach ($layout as $plugin => $divId) {
15
+ if (in_array($plugin, $validPlugins)) {
16
+ $html .= '<div id="' . $divId . '" class="gigya-' . $plugin . '"></div>' . PHP_EOL;
17
+ }
18
+ else {
19
+ unset($layout['$plugin']);
20
+ }
21
+ }
22
+ $this->setHtml($html);
23
+ $this->setJs(Mage::helper('core')->jsonEncode($layout));
24
+ }
25
+ }
app/code/community/Gigya/Social/Block/Gamification/php_errors.log ADDED
@@ -0,0 +1 @@
 
1
+ [31-Oct-2012 15:23:25 UTC] PHP Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in Plugins.php on line 8
app/code/community/Gigya/Social/Block/Html/Head.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class Gigya_Social_Block_Html_Head extends Mage_Page_Block_Html_Head
6
+ {
7
+
8
+ protected function _construct()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_global/gigya_global_conf')) {
11
+ $this->setTemplate('page/html/head.phtml');
12
+ $uriPrefix = !empty($_SERVER['HTTPS']) ? 'https://cdns' : 'http://cdn';
13
+ $gigyaApiKey = trim(Mage::getStoreConfig('gigya_global/gigya_global_conf/apikey'));
14
+ $name = $uriPrefix . '.gigya.com/JS/socialize.js?apikey=' . $gigyaApiKey;
15
+ $jsParams = array(
16
+ 'enabledProviders' => (Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') !== '') ? Mage::getStoreConfig('gigya_global/gigya_global_conf/providers') : '*',
17
+ 'lang' => Mage::getStoreConfig('gigya_global/gigya_global_conf/laguages'),
18
+ 'sessionExpiration' => (int)Mage::getStoreConfig('web/cookie/cookie_lifetime'),
19
+ 'connectWithoutLoginBehavior' => Mage::getStoreConfig('gigya_login/gigya_login_conf/loginBehavior'),
20
+ );
21
+ $this->_data['items']['js/gigya'] = array(
22
+ 'type' => 'external_js',
23
+ 'name' => $name,
24
+ 'if' => '',
25
+ 'cond' => '',
26
+ 'params' => Mage::helper('core')->jsonEncode($jsParams),
27
+ );
28
+ if (Mage::getStoreConfig('gigya_global/gigya_global_conf/google_sa')) {
29
+ $ga = $uriPrefix . '.gigya.com/js/gigyaGAIntegration.js';
30
+ $this->_data['items']['js/gigyaGA'] = array(
31
+ 'type' => 'external_js',
32
+ 'name' => $ga,
33
+ 'if' => '',
34
+ 'cond' => '',
35
+ );
36
+
37
+ }
38
+ }
39
+ }
40
+ protected function _separateOtherHtmlHeadElements(&$lines, $itemIf, $itemType, $itemParams, $itemName, $itemThe)
41
+ {
42
+ $params = $itemParams ? ' ' . $itemParams : '';
43
+ $href = $itemName;
44
+ switch ($itemType) {
45
+ case 'rss':
46
+ $lines[$itemIf]['other'][] = sprintf('<link href="%s"%s rel="alternate" type="application/rss+xml" />',
47
+ $href, $params
48
+ );
49
+ break;
50
+ case 'link_rel':
51
+ $lines[$itemIf]['other'][] = sprintf('<link%s href="%s" />', $params, $href);
52
+ break;
53
+
54
+ case 'external_js':
55
+ $lines[$itemIf]['other'][] = sprintf('<script type="text/javascript" src="%s">%s</script>', $href, $params);
56
+ break;
57
+
58
+ }
59
+ }
60
+
61
+ public function getCssJsHtml()
62
+ {
63
+ // separate items by types
64
+ $lines = array();
65
+ foreach ($this->_data['items'] as $item) {
66
+ if (!is_null($item['cond']) && !$this->getData($item['cond']) || !isset($item['name'])) {
67
+ continue;
68
+ }
69
+ $if = !empty($item['if']) ? $item['if'] : '';
70
+ $params = !empty($item['params']) ? $item['params'] : '';
71
+ switch ($item['type']) {
72
+ case 'js': // js/*.js
73
+ case 'skin_js': // skin/*/*.js
74
+ case 'js_css': // js/*.css
75
+ case 'skin_css': // skin/*/*.css
76
+ $lines[$if][$item['type']][$params][$item['name']] = $item['name'];
77
+ break;
78
+ default:
79
+ $this->_separateOtherHtmlHeadElements($lines, $if, $item['type'], $params, $item['name'], $item);
80
+ break;
81
+ }
82
+ }
83
+
84
+ // prepare HTML
85
+ $shouldMergeJs = Mage::getStoreConfigFlag('dev/js/merge_files');
86
+ $shouldMergeCss = Mage::getStoreConfigFlag('dev/css/merge_css_files');
87
+ $html = '';
88
+ foreach ($lines as $if => $items) {
89
+ if (empty($items)) {
90
+ continue;
91
+ }
92
+ if (!empty($if)) {
93
+ $html .= '<!--[if '.$if.']>'."\n";
94
+ }
95
+
96
+ // static and skin css
97
+ $html .= $this->_prepareStaticAndSkinElements('<link rel="stylesheet" type="text/css" href="%s"%s />' . "\n",
98
+ empty($items['js_css']) ? array() : $items['js_css'],
99
+ empty($items['skin_css']) ? array() : $items['skin_css'],
100
+ $shouldMergeCss ? array(Mage::getDesign(), 'getMergedCssUrl') : null
101
+ );
102
+ // other stuff
103
+ if (!empty($items['other'])) {
104
+ $html .= $this->_prepareOtherHtmlHeadElements($items['other']) . "\n";
105
+ }
106
+
107
+ // static and skin javascripts
108
+ $html .= $this->_prepareStaticAndSkinElements('<script type="text/javascript" src="%s"%s></script>' . "\n",
109
+ empty($items['js']) ? array() : $items['js'],
110
+ empty($items['skin_js']) ? array() : $items['skin_js'],
111
+ $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : null
112
+ );
113
+
114
+
115
+ if (!empty($if)) {
116
+ $html .= '<![endif]-->'."\n";
117
+ }
118
+ }
119
+ return $html;
120
+ }
121
+ }
app/code/community/Gigya/Social/Block/Login.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Block_Login extends Mage_Core_Block_Template
3
+ {
4
+ protected function _prepareLayout(){
5
+ return parent::_prepareLayout();
6
+
7
+ }
8
+ protected function _getLoginConfig() {
9
+ $conf = array();
10
+ $conf['containerID'] = Mage::getStoreConfig('gigya_login/gigya_login_conf/loginContainerId');
11
+ $conf['buttonsStyle'] = Mage::getStoreConfig('gigya_login/gigya_login_conf/buttonStyle');
12
+ $conf['showTermsLink'] = Mage::getStoreConfig('gigya_login/gigya_login_conf/showTerms');
13
+ $conf['width'] = Mage::getStoreConfig('gigya_login/gigya_login_conf/loginWidth');
14
+ $conf['height'] = Mage::getStoreConfig('gigya_login/gigya_login_conf/loginHeight');
15
+ return json_encode($conf);
16
+ }
17
+ protected function _getContainerId() {
18
+ return Mage::getStoreConfig('gigya_login/gigya_login_conf/loginContainerId');
19
+ }
20
+ protected function _toHtml(){
21
+ return parent::_toHtml();
22
+ }
23
+
24
+ }
app/code/community/Gigya/Social/Block/Logout.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_logout
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_logout extends Mage_Core_Block_Text_Tag_Js
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_login/gigya_login_conf')) {
11
+ $js = 'var gigyaSettings = gigyaSettings || {}; gigyaSettings.logout = true;';
12
+ Mage::log($js);
13
+ $this->setContents($js);
14
+ return parent::_toHtml();
15
+ }
16
+ }
17
+ }
18
+
19
+
app/code/community/Gigya/Social/Block/Ordersharebar.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Ordersharebar
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Ordersharebar extends Mage_Core_Block_Template
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isShareBarEnabled('order')) {
11
+ if ($share = Mage::getSingleton('checkout/session')->getData('gigyaShareOrder')) {
12
+ $config = Mage::helper('Gigya_Social')->getPluginConfig('gigya_share/gigya_sharebar');
13
+ $product = Mage::getModel('catalog/product')->load($share['pid']);
14
+ $desc = ($product->getShortDescription() !== NULL) ? $product->getShortDescription() : $product->getDescription();
15
+ $ua = Mage::helper('core')->jsonEncode(array(
16
+ 'title' => $product->getName(),
17
+ 'description' => $this->stripTags($desc),
18
+ 'linkBack' => $product->getProductUrl(),
19
+ 'imageUrl' => $product->getImageUrl(),
20
+ ));
21
+
22
+ $js = '
23
+ var gigyaSettings = gigyaSettings || {};
24
+ gigyaSettings.sharebar = ' . $config . ';
25
+ gigyaSettings.sharebar.ua = ' . $ua .';
26
+ ';
27
+ $this->setContents($js);
28
+ Mage::getSingleton('checkout/session')->unsetData('gigyaShareOrder');
29
+ return parent::_toHtml();
30
+ }
31
+ }
32
+ }
33
+
34
+ }
35
+
36
+
app/code/community/Gigya/Social/Block/Ratings.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Ratings
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Ratings extends Mage_Catalog_Block_Product_View
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_r_and_r/gigya_r_and_r_conf')) {
11
+ $product = $this->getProduct();
12
+ $parms = Mage::helper('Gigya_Social')->getPluginConfig('gigya_r_and_r/gigya_r_and_r_conf', 'php');
13
+ unset($parms['enable']);
14
+ $parms['streamID'] = $product->getSku();
15
+ $parms['context']['reviewUrl'] = $this->getReviewsUrl();
16
+ $js = '<script type="text/javascript">//<![CDATA[
17
+ var gigyaSettings = gigyaSettings || {};
18
+ gigyaSettings.ratings = gigyaSettings.ratings || [];
19
+ gigyaSettings.ratings.push(' . Mage::helper('core')->jsonEncode($parms) . ');
20
+ //]]>
21
+ </script>';
22
+ return $js;
23
+ }
24
+ }
25
+ public function getReviewsUrl()
26
+ {
27
+ return Mage::getUrl('review/product/list', array(
28
+ 'id' => $this->getProduct()->getId(),
29
+ 'category' => $this->getProduct()->getCategoryId()
30
+ ));
31
+ }
32
+
33
+ }
34
+
35
+
app/code/community/Gigya/Social/Block/Reviews.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Reviews
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Reviews extends Mage_Catalog_Block_Product_View
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_r_and_r/gigya_r_and_r_conf')) {
11
+ $product = $this->getProduct();
12
+ $desc = ($product->getShortDescription() !== NULL) ? $product->getShortDescription() : $product->getDescription();
13
+ $ua = array(
14
+ 'title' => $product->getName(),
15
+ 'description' => $this->stripTags($desc),
16
+ 'linkBack' => $product->getProductUrl(),
17
+ 'imageUrl' => $product->getImageUrl(),
18
+ 'action' => $this->__('Reviewed'),
19
+ );
20
+ $parms = Mage::helper('Gigya_Social')->getPluginConfig('gigya_r_and_r/gigya_r_and_r_conf', 'php', TRUE);
21
+ unset($parms['enable']);
22
+ $parms['streamID'] = $product->getSku();
23
+ $parms['ua'] = $ua;
24
+ $js = '<script type="text/javascript">//<![CDATA[
25
+ var gigyaSettings = gigyaSettings || {};
26
+ gigyaSettings.RnR = ' . Mage::helper('core')->jsonEncode($parms) . '
27
+ //]]>
28
+ </script>';
29
+ return $js;
30
+ }
31
+ }
32
+ public function getReviewsUrl()
33
+ {
34
+ return Mage::getUrl('review/product/list', array(
35
+ 'id' => $this->getProduct()->getId(),
36
+ 'category' => $this->getProduct()->getCategoryId()
37
+ ));
38
+ }
39
+
40
+ }
41
+
42
+
app/code/community/Gigya/Social/Block/Share.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Block_Share
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Block_Share extends Mage_Core_Block_Text_Tag_Js
7
+ {
8
+ protected function _toHtml()
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_share/gigya_share_action')) {
11
+ if ($share = Mage::getSingleton('checkout/session')->getData('gigyaShare')) {
12
+ $config = Mage::helper('Gigya_Social')->getPluginConfig('gigya_share/gigya_share_action', 'json', TRUE);
13
+ $product = Mage::getModel('catalog/product')->load($share['pid']);
14
+ $desc = ($product->getShortDescription() !== NULL) ? $product->getShortDescription() : $product->getDescription();
15
+ $action = ($share['op'] === 'cart') ? $this->__('Added to cart') : $this->__('Ordered');
16
+ $ua = Mage::helper('core')->jsonEncode(array(
17
+ 'title' => $product->getName(),
18
+ 'description' => $this->stripTags($desc),
19
+ 'linkBack' => $product->getProductUrl(),
20
+ 'imageUrl' => $product->getImageUrl(),
21
+ 'action' => $action,
22
+ ));
23
+
24
+ $js = '
25
+ var gigyaSettings = gigyaSettings || {};
26
+ gigyaSettings.shareAction = ' . $config . ';
27
+ gigyaSettings.shareAction.ua = ' . $ua .';
28
+ ';
29
+ $this->setContents($js);
30
+ Mage::getSingleton('checkout/session')->unsetData('gigyaShare');
31
+ return parent::_toHtml();
32
+ }
33
+ }
34
+ }
35
+
36
+ }
37
+
38
+
app/code/community/Gigya/Social/Block/php_errors.log ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ [29-Oct-2012 14:03:59 UTC] PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in Share.php on line 8
2
+ [29-Oct-2012 14:39:16 UTC] PHP Parse error: syntax error, unexpected T_RETURN in Share.php on line 27
3
+ [31-Oct-2012 14:27:56 UTC] PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in Gamification/notifications.php on line 8
4
+ [31-Oct-2012 14:40:51 UTC] PHP Fatal error: Can't use function return value in write context in Gamification/Notifications.php on line 11
5
+ [05-Nov-2012 12:32:39 UTC] PHP Parse error: syntax error, unexpected '}' in Ratings.php on line 12
6
+ [05-Dec-2012 14:08:16 UTC] PHP Parse error: syntax error, unexpected ',' in Share.php on line 17
7
+ [05-Dec-2012 14:13:02 UTC] PHP Parse error: syntax error, unexpected ',' in Share.php on line 17
8
+ [10-Dec-2012 15:29:48 UTC] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in Share.php on line 12
app/code/community/Gigya/Social/Helper/Data.php ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once __DIR__ . '/../sdk/GSSDK.php';
4
+ class Gigya_Social_Helper_Data extends Mage_Core_Helper_Abstract
5
+ {
6
+ public function _getPassword($length = 8)
7
+ {
8
+ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
9
+ $str = '';
10
+ for ($p = 0; $p < $length; $p++) {
11
+ $str .= $characters[mt_rand(0, strlen($characters))];
12
+ }
13
+ return 'Gigya_' . $str;
14
+ }
15
+
16
+ public function notifyRegistration($gigyaUid, $siteUid)
17
+ {
18
+ $params = array(
19
+ 'UID' => $gigyaUid,
20
+ 'siteUID' => $siteUid,
21
+ );
22
+ try {
23
+ $this->_gigya_api('notifyRegistration', $params);
24
+ }
25
+ catch (Exception $e) {
26
+ $code = $e->getCode();
27
+ $message = $e->getMessage();
28
+ Mage::logException($e);
29
+ }
30
+ }
31
+
32
+ public function notifyLogin($siteUid, $newUser = 'false', $userInfo = array())
33
+ {
34
+ $params = array(
35
+ 'siteUID' => $siteUid,
36
+ 'newUser' => $newUser,
37
+ );
38
+ if (!empty($userInfo)) {
39
+ $params['userInfo'] = Mage::helper('core')->jsonEncode($userInfo);
40
+ }
41
+ try {
42
+ $res = $this->_gigya_api('notifyLogin', $params);
43
+ if (is_object($res) && $res->getErrorCode() === 0) {
44
+ setcookie($res->getString("cookieName"), $res->getString("cookieValue"), 0, $res->getString("cookiePath"), $res->getString("cookieDomain"));
45
+ }
46
+ else {
47
+ Mage::logException($res);
48
+ }
49
+ }
50
+ catch (Exception $e) {
51
+ $code = $e->getCode();
52
+ $message = $e->getMessage();
53
+ Mage::logException($e);
54
+ }
55
+ }
56
+
57
+ public function notifyLogout($siteUid)
58
+ {
59
+ $params = array(
60
+ 'siteUID' => $siteUid,
61
+ );
62
+ try {
63
+ $this->_gigya_api('logout', $params);
64
+ }
65
+ catch (Exception $e) {
66
+ $code = $e->getCode();
67
+ $message = $e->getMessage();
68
+ Mage::logException($e);
69
+ }
70
+ }
71
+
72
+ public function deleteAccount($gigyaUid)
73
+ {
74
+ $params = array(
75
+ 'UID' => $gigyaUid,
76
+ );
77
+ try {
78
+ $res = $this->_gigya_api('deleteAccount', $params);
79
+ Mage::log($res);
80
+
81
+ }
82
+ catch (Exception $e) {
83
+ $code = $e->getCode();
84
+ $message = $e->getMessage();
85
+ Mage::logException($e);
86
+ }
87
+ }
88
+
89
+
90
+ /**
91
+ * Helper function that handles Gigya API calls.
92
+ *
93
+ * @param mixed $method
94
+ * The Gigya API method.
95
+ * @param mixed $params
96
+ * The method parameters.
97
+ *
98
+ * @return array
99
+ * The Gigya response.
100
+ */
101
+ public function _gigya_api($method, $params) {
102
+ $apiKey = Mage::getStoreConfig('gigya_global/gigya_global_conf/apikey');
103
+ $secretkey = Mage::getStoreConfig('gigya_global/gigya_global_conf/secretkey');
104
+ $request = new GSRequest($apiKey, $secretkey, 'socialize.' . $method);
105
+ $params['format'] = 'json';
106
+ foreach ($params as $param => $val) {
107
+ $request->setParam($param, $val);
108
+ }
109
+ try {
110
+ $response = $request->send();
111
+ }
112
+ catch (Exception $e) {
113
+ $code = $e->getCode();
114
+ $message = $e->getMessage();
115
+ Mage::log($message);
116
+ return $code;
117
+ }
118
+
119
+ return $response;
120
+ }
121
+
122
+ public function getPluginConfig($pluginName, $format = 'json', $feed = FALSE)
123
+ {
124
+ $config = Mage::getStoreConfig($pluginName);
125
+ foreach ($config as $key => $value){
126
+ //fix the magento yes/no as 1 or 0 so it would work in as true/false in javascript
127
+ if ($value === '0' || $value === '1') {
128
+ $config[$key] = ($value) ? true : false;
129
+ }
130
+ }
131
+ if (!empty($config['advancedConfig'])) {
132
+ $advConfig = $this->_confStringToArry($config['advancedConfig']);
133
+ $config = $config + $advConfig;
134
+ }
135
+ unset($config['advancedConfig']);
136
+ if ($feed === TRUE) {
137
+ $config['privacy'] = Mage::getStoreConfig('gigya_activityfeed/gigya_activityfeed_conf/privacy');
138
+ }
139
+ if ($format === 'php') {
140
+ return $config;
141
+ }
142
+ return Mage::helper('core')->jsonEncode($config);
143
+ }
144
+
145
+ public function getPluginContainerID($pluginName)
146
+ {
147
+ return Mage::getStoreConfig($pluginName . '/containerID');
148
+ }
149
+
150
+ public function isPluginEnabled($pluginName)
151
+ {
152
+ return Mage::getStoreConfig($pluginName . '/enable');
153
+ }
154
+ public function isShareBarEnabled($place)
155
+ {
156
+ return Mage::getStoreConfig('gigya_share/gigya_sharebar/enable_' . $place);
157
+ }
158
+ public function isShareActionEnabled($place)
159
+ {
160
+ return Mage::getStoreConfig('gigya_share/gigya_share_action/enable_' . $place);
161
+ }
162
+
163
+ public function _confStringToArry($str)
164
+ {
165
+ $lines = array();
166
+ $values = explode(PHP_EOL, $str);
167
+ //some clean up
168
+ $values = array_map('trim', $values);
169
+ $values = array_filter($values, 'strlen');
170
+ foreach ($values as $value) {
171
+ preg_match('/(.*)\|(.*)/', $value, $matches);
172
+ $lines[$matches[1]] = $matches[2];
173
+ }
174
+ return $lines;
175
+
176
+ }
177
+ }
app/code/community/Gigya/Social/Helper/php_errors.log ADDED
@@ -0,0 +1 @@
 
1
+ [30-Oct-2012 15:42:13 UTC] PHP Parse error: syntax error, unexpected '}' in Data.php on line 118
app/code/community/Gigya/Social/Model/Cart/Observer.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Model_Cart_Observer
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ class Gigya_Social_Model_Cart_Observer
7
+ {
8
+ public function addShareUi($observer)
9
+ {
10
+ if (Mage::helper('Gigya_Social')->isShareActionEnabled('cart')) {
11
+ $productId = $observer->getProduct()->getId();
12
+ Mage::getSingleton('checkout/session')->setData('gigyaShare', array('pid' => $productId, 'op' => 'cart'));
13
+ }
14
+ }
15
+
16
+ public function addOrderShareUi(Varien_Event_Observer $observer)
17
+ {
18
+ $orderIds = $observer->getEvent()->getOrderIds();
19
+ if (empty($orderIds) || !is_array($orderIds)) {
20
+ return;
21
+ }
22
+ $order = Mage::getModel('sales/order')->load(reset($orderIds));
23
+ $items = $order->getAllItems();
24
+ $prod = reset($items);
25
+ $pid = $prod->getProductId();
26
+ if (Mage::helper('Gigya_Social')->isShareBarEnabled('order')) {
27
+ Mage::getSingleton('checkout/session')->setData('gigyaShareOrder', array('pid' => $pid));
28
+ }
29
+ if (Mage::helper('Gigya_Social')->isShareActionEnabled('order')) {
30
+ Mage::getSingleton('checkout/session')->setData('gigyaShare', array('pid' => $pid, 'op' => 'order'));
31
+ }
32
+ }
33
+
34
+ }
35
+
36
+
app/code/community/Gigya/Social/Model/Cart/php_errors.log ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ [28-Oct-2012 14:29:51 UTC] PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
2
+ [28-Oct-2012 14:33:16 UTC] PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
3
+ [28-Oct-2012 14:33:16 UTC] PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
4
+ [28-Oct-2012 15:46:52 UTC] PHP Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in Observer.php on line 15
5
+ [28-Oct-2012 15:46:53 UTC] PHP Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in Observer.php on line 15
app/code/community/Gigya/Social/Model/Config/Source/AllwaysShare.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ class Gigya_Social_Model_Config_Source_allwaysShare
4
+ {
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ public function toOptionArray()
11
+ {
12
+ return array(
13
+ array('value' => 'hide', 'label'=>Mage::helper('adminhtml')->__('do not display the "Always share" checkbox')),
14
+ array('value' => 'checked', 'label'=>Mage::helper('adminhtml')->__('the "Always share" checkbox is displayed and checked by default')),
15
+ array('value' => 'unchecked', 'label'=>Mage::helper('adminhtml')->__('the "Always share" checkbox is displayed and unchecked by default')),
16
+ );
17
+ }
18
+ }
app/code/community/Gigya/Social/Model/Config/Source/Buttons.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_buttons
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'standart', 'label'=>Mage::helper('adminhtml')->__('Icons')),
13
+ array('value' => 'fullLogo', 'label'=>Mage::helper('adminhtml')->__('Full logos')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Config/Source/CountType.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_countType
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'number', 'label'=>Mage::helper('adminhtml')->__('Number')),
13
+ array('value' => 'percentage', 'label'=>Mage::helper('adminhtml')->__('Percentage')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Config/Source/Counts.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_counts
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'right', 'label'=>Mage::helper('adminhtml')->__('Right')),
13
+ array('value' => 'top', 'label'=>Mage::helper('adminhtml')->__('Top')),
14
+ array('value' => 'none', 'label'=>Mage::helper('adminhtml')->__('None')),
15
+ );
16
+ }
17
+ }
app/code/community/Gigya/Social/Model/Config/Source/Imageb.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_imageb
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'default', 'label'=>Mage::helper('adminhtml')->__('Use image tag if exists, product image otherwise.')),
13
+ array('value' => 'product', 'label'=>Mage::helper('adminhtml')->__('Product image')),
14
+ array('value' => 'url', 'label'=>Mage::helper('adminhtml')->__('Specify an image URL')),
15
+ );
16
+ }
17
+ }
app/code/community/Gigya/Social/Model/Config/Source/Languages.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_Languages
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'en', 'label'=>Mage::helper('adminhtml')->__('English')),
13
+ array('value' => 'zh-cn', 'label'=>Mage::helper('adminhtml')->__('Chinese')),
14
+ array('value' => 'zh-hk', 'label'=>Mage::helper('adminhtml')->__('Chinese(HongKong)')),
15
+ array('value' => 'zh-tw', 'label'=>Mage::helper('adminhtml')->__('Chinese(Taiwan)')),
16
+ array('value' => 'cs', 'label'=>Mage::helper('adminhtml')->__('Czech')),
17
+ array('value' => 'da', 'label'=>Mage::helper('adminhtml')->__('Danish')),
18
+ array('value' => 'nl', 'label'=>Mage::helper('adminhtml')->__('Dutch')),
19
+ array('value' => 'fi', 'label'=>Mage::helper('adminhtml')->__('Finnish')),
20
+ array('value' => 'fr', 'label'=>Mage::helper('adminhtml')->__('French')),
21
+ array('value' => 'de', 'label'=>Mage::helper('adminhtml')->__('German')),
22
+ array('value' => 'el', 'label'=>Mage::helper('adminhtml')->__('Greek')),
23
+ array('value' => 'hu', 'label'=>Mage::helper('adminhtml')->__('Hungarian')),
24
+ array('value' => 'id', 'label'=>Mage::helper('adminhtml')->__('Indonesian')),
25
+ array('value' => 'it', 'label'=>Mage::helper('adminhtml')->__('Italian')),
26
+ array('value' => 'ja', 'label'=>Mage::helper('adminhtml')->__('Japanese')),
27
+ array('value' => 'ko', 'label'=>Mage::helper('adminhtml')->__('Korean')),
28
+ array('value' => 'ms', 'label'=>Mage::helper('adminhtml')->__('Malay')),
29
+ array('value' => 'no', 'label'=>Mage::helper('adminhtml')->__('Norwegian')),
30
+ array('value' => 'pl', 'label'=>Mage::helper('adminhtml')->__('Polish')),
31
+ array('value' => 'pt', 'label'=>Mage::helper('adminhtml')->__('Portuguese')),
32
+ array('value' => 'pt-br', 'label'=>Mage::helper('adminhtml')->__('Portuguese(Brazil)')),
33
+ array('value' => 'ro', 'label'=>Mage::helper('adminhtml')->__('Romanian')),
34
+ array('value' => 'ru', 'label'=>Mage::helper('adminhtml')->__('Russian')),
35
+ array('value' => 'es', 'label'=>Mage::helper('adminhtml')->__('Spanish')),
36
+ array('value' => 'es-mx', 'label'=>Mage::helper('adminhtml')->__('Spanish(Mexican)')),
37
+ array('value' => 'sv', 'label'=>Mage::helper('adminhtml')->__('Swedish')),
38
+ array('value' => 'tl', 'label'=>Mage::helper('adminhtml')->__('Tagalog(Philippines)')),
39
+ array('value' => 'th', 'label'=>Mage::helper('adminhtml')->__('Thai')),
40
+ array('value' => 'tr', 'label'=>Mage::helper('adminhtml')->__('Turkish')),
41
+ array('value' => 'uk', 'label'=>Mage::helper('adminhtml')->__('Ukrainian')),
42
+ array('value' => 'vi', 'label'=>Mage::helper('adminhtml')->__('Vietnamese')),
43
+ );
44
+ }
45
+ }
app/code/community/Gigya/Social/Model/Config/Source/Layout.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_layout
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'horizontal', 'label'=>Mage::helper('adminhtml')->__('Horizontal')),
13
+ array('value' => 'vertical', 'label'=>Mage::helper('adminhtml')->__('Vertical')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Config/Source/Leaderboard.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_leaderboard
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'all', 'label'=>Mage::helper('adminhtml')->__('All')),
13
+ array('value' => '7days', 'label'=>Mage::helper('adminhtml')->__('7 Days')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Config/Source/Loginb.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_Loginb
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'loginExistingUser', 'label'=>Mage::helper('adminhtml')->__('Login existing user')),
13
+ array('value' => 'alwaysLogin', 'label'=>Mage::helper('adminhtml')->__('Always login')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Config/Source/Privacy.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_privacy
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'private', 'label'=>Mage::helper('adminhtml')->__('Private')),
13
+ array('value' => 'friends', 'label'=>Mage::helper('adminhtml')->__('Friends')),
14
+ array('value' => 'public', 'label'=>Mage::helper('adminhtml')->__('Public')),
15
+ );
16
+ }
17
+ }
app/code/community/Gigya/Social/Model/Config/Source/Scope.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gigya_Social_Model_Config_Source_scope
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 'external', 'label'=>Mage::helper('adminhtml')->__('External')),
13
+ array('value' => 'both', 'label'=>Mage::helper('adminhtml')->__('Both')),
14
+ );
15
+ }
16
+ }
app/code/community/Gigya/Social/Model/Customer/Observer.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_Modle_Customer_Observer
4
+ * @author
5
+ */
6
+ class Gigya_Social_Model_Customer_Observer
7
+ {
8
+ public function notify_registration($observer)
9
+ {
10
+ $customer_data = $observer['customer']->getData();
11
+ if (!empty($customer_data['gigyaUser'])) {
12
+ Mage::helper('Gigya_Social')->notifyRegistration($customer_data['gigyaUser']['UID'], $customer_data['entity_id']);
13
+ }
14
+ else {
15
+ Mage::helper('Gigya_Social')->notifyLogin($id, 'true');
16
+ }
17
+ }
18
+
19
+ public function notify_delete($observer)
20
+ {
21
+ $id = $observer->getEvent()->getCustomer()->getId();
22
+ Mage::helper('Gigya_Social')->deleteAccount($id);
23
+ }
24
+
25
+ public function notify_login($observer)
26
+ {
27
+ $action = Mage::getSingleton('customer/session')->getData('gigyaAction');
28
+ $id = $observer->getEvent()->getCustomer()->getId();
29
+ $gigya_uid = Mage::getSingleton('customer/session')->getData('gigyaUid');
30
+ if (!empty($action)) {
31
+ if ($action === 'linkAccount' && !empty($gigya_uid)) {
32
+ Mage::helper('Gigya_Social')->notifyRegistration($gigya_uid, $id);
33
+ }
34
+ }
35
+ else {
36
+ $magInfo = $observer->getEvent()->getCustomer()->getData();
37
+ $userInfo = array(
38
+ 'firstName' => $magInfo['firstname'],
39
+ 'lastName' => $magInfo['lastname'],
40
+ 'email' => $magInfo['email'],
41
+ );
42
+ Mage::helper('Gigya_Social')->notifyLogin($id, 'false', $userInfo);
43
+ }
44
+ }
45
+
46
+ public function notify_logout($observer)
47
+ {
48
+ $id = $observer->getEvent()->getCustomer()->getId();
49
+ Mage::getSingleton('core/session')->setData('logout', 'true');
50
+ Mage::helper('Gigya_Social')->notifyLogout($id);
51
+ }
52
+ }
53
+
app/code/community/Gigya/Social/controllers/AdminController.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gigya_Social_AdminController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+
6
+ public function indexAction()
7
+ {
8
+ $this->loadLayout();
9
+ $this->_setActiveMenu('gigya');
10
+ $block = $this->getLayout()
11
+ ->createBlock('core/text', 'Giyag Gloabl Configuration')
12
+ ->setText('<h1>Gigya global configuration</h1>');
13
+ $this->_addContent($block);
14
+ $this->_addBreadcrumb(Mage::helper('Gigya_Social')->__('Form'), Mage::helper('Gigya_Social')->__('Form'));
15
+ Mage::log(var_export($this, TRUE));
16
+ // "Output" display
17
+ $this->renderLayout();
18
+ }
19
+ public function shareAction()
20
+ {
21
+ // "Fetch" display
22
+ $this->loadLayout();
23
+ $this->_setActiveMenu('gigya');
24
+
25
+ // "Inject" into display
26
+ // THe below example will not actualy show anything since the core/template is empty
27
+ $this->_addContent($this->getLayout()->createBlock('core/template'));
28
+
29
+ echo "Hello developer...";
30
+
31
+ // "Output" display
32
+ $this->renderLayout();
33
+ }
34
+ }
app/code/community/Gigya/Social/controllers/LoginController.php ADDED
@@ -0,0 +1,382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ include_once __DIR__ . '/../sdk/GSSDK.php';
3
+ require_once ('Mage/Customer/controllers/AccountController.php');
4
+ /**
5
+ * Class Gigya_Social_IndexController
6
+ * @author
7
+ */
8
+ class Gigya_Social_LoginController extends Mage_Customer_AccountController
9
+ {
10
+
11
+ public function indexAction()
12
+ {
13
+ $this->loadLayout();
14
+ $this->renderLayout();
15
+ }
16
+ /**
17
+ * Action predispatch
18
+ *
19
+ * Check customer authentication for some actions
20
+ */
21
+ public function preDispatch()
22
+ {
23
+ // a brute-force protection here would be nice
24
+
25
+ parent::preDispatch();
26
+
27
+ if (!$this->getRequest()->isDispatched()) {
28
+ return;
29
+ }
30
+
31
+ $action = $this->getRequest()->getActionName();
32
+ $openActions = array(
33
+ 'create',
34
+ 'login',
35
+ 'loginPost',
36
+ 'logoutsuccess',
37
+ 'forgotpassword',
38
+ 'forgotpasswordpost',
39
+ 'resetpassword',
40
+ 'resetpasswordpost',
41
+ 'confirm',
42
+ 'confirmation'
43
+ );
44
+ $pattern = '/^(' . implode('|', $openActions) . ')/i';
45
+
46
+ if (!preg_match($pattern, $action)) {
47
+ if (!$this->_getSession()->authenticate($this)) {
48
+ $this->setFlag('', 'no-dispatch', true);
49
+ }
50
+ } else {
51
+ $this->_getSession()->setNoReferer(true);
52
+ }
53
+ }
54
+
55
+ public function loginAction()
56
+ {
57
+ $session = $this->_getSession();
58
+ $req = $this->getRequest()->getPost('json');
59
+ $post = json_decode($req, TRUE);
60
+ if (!empty($post) && isset($post['signature'])) {
61
+ $secret = Mage::getStoreConfig('gigya_global/gigya_global_conf/secretkey');
62
+ $valid = SigUtils::validateUserSignature($post['UID'], $post['timestamp'], $secret, $post['signature']);
63
+ $firstName = $post['user']['firstName'];
64
+ $lastName = $post['user']['lastName'];
65
+ $email = $post['user']['email'];
66
+ if ($valid == TRUE) {
67
+ //see if user is a site user
68
+ if ($post['isSiteUID'] && is_numeric($post['UID'])) {
69
+ $cust_session = Mage::getSingleton('customer/session');
70
+ $cust_session->setData('gigyaAction', 'login');
71
+ $cust_session->loginById($post['user']['UID']);
72
+ $this->getResponse()->setHeader('Content-type', 'application/json');
73
+ //$url = Mage::getUrl('customer/account');
74
+ $url = Mage::getUrl('*/*/*', array('_current' => true));
75
+ $res = array(
76
+ 'result' => 'login',
77
+ 'redirect' => $url
78
+ );
79
+ $this->getResponse()->setHeader('Content-type', 'application/json');
80
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
81
+ }
82
+ else {
83
+ //no email
84
+ if (empty($post['user']['email'])) {
85
+ //return email form
86
+ $block = $this->getLayout()->createBlock(
87
+ 'Mage_Core_Block_Template',
88
+ 'Emailform',
89
+ array('template' => 'gigya/form/emailForm.phtml')
90
+ );
91
+ $form = $block->renderView();
92
+ $res = array(
93
+ 'result' => 'noEmail',
94
+ 'html' => $form,
95
+ 'id' => Mage::helper('Gigya_Social')->getPluginContainerId('gigya_login/gigya_login_conf'),
96
+ 'headline' => $this->__('Fill-in missing required info'),
97
+ );
98
+ $this->getResponse()->setHeader('Content-type', 'application/json');
99
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
100
+ }
101
+ else {
102
+ //check if we have the email on the system
103
+ $customer = $this->_customerExists($post['user']['email']);
104
+ if ($customer === FALSE) {
105
+ $this->_createCustomer($post['user']['email'], $firstName, $lastName, $post['user']);
106
+ $this->getResponse()->setHeader('Content-type', 'application/json');
107
+ }
108
+ else {
109
+ //email exsites
110
+ try {
111
+ //return login form
112
+ $block = $this->getLayout()->createBlock(
113
+ 'Mage_Core_Block_Template',
114
+ 'Loginform',
115
+ array('template' => 'gigya/form/mini.login.phtml')
116
+ );
117
+ $form = $block->renderView();
118
+ $res = array(
119
+ 'result' => 'emailExsists',
120
+ 'html' => $form,
121
+ 'id' => Mage::helper('Gigya_Social')->getPluginContainerId('gigya_login/gigya_login_conf'),
122
+ 'headline' => $this->__('Link Accounts'),
123
+ );
124
+ Mage::getSingleton('customer/session')->setData('gigyaAction', 'linkAccount');
125
+ Mage::getSingleton('customer/session')->setData('gigyaUid', $post['UID']);
126
+ $this->getResponse()->setHeader('Content-type', 'application/json');
127
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
128
+ }
129
+ catch (Exception $e) {
130
+ //TODO:add error handeling
131
+ Mage::log($e);
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ else {
138
+ //not valid
139
+ Mage::log('Not Valid');
140
+ }
141
+ }
142
+
143
+ }
144
+ protected function _createCustomer($email, $firstName = NULL, $lastName = NULL, $gigyaUser)
145
+ {
146
+ $customer = Mage::getModel('customer/customer')->setId(null);
147
+ $customer->getGroupId();
148
+ $customer->setFirstname($firstName);
149
+ $customer->setLastname($lastName);
150
+ $customer->setEmail($email);
151
+ $password = Mage::helper('Gigya_Social')->_getPassword();
152
+ $_POST['password'] = $password;
153
+ $_POST['confirmation'] = $password;
154
+ $customer->setData('gigyaUser', $gigyaUser);
155
+ Mage::register('current_customer', $customer);
156
+ $this->_forward('createPost');
157
+ }
158
+
159
+ protected function _customerExists($email, $websiteId = null)
160
+ {
161
+ $customer = Mage::getModel('customer/customer');
162
+ if ($websiteId) {
163
+ $customer->setWebsiteId($websiteId);
164
+ }
165
+ else {
166
+ $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
167
+ }
168
+ $customer->loadByEmail($email);
169
+ if ($customer->getId()) {
170
+ return $customer;
171
+ }
172
+ return FALSE;
173
+ }
174
+
175
+ protected function _isSiteUser($info)
176
+ {
177
+ return null;
178
+ }
179
+
180
+
181
+ public function createPostAction()
182
+ {
183
+ //TODO: Deal with logedin user
184
+ $session = $this->_getSession();
185
+ if ($session->isLoggedIn()) {
186
+ Mage::log('loggedIn');
187
+ echo '{bla: ok}';
188
+ //$this->_redirect('*/*/');
189
+ return;
190
+ }
191
+ $session->setEscapeMessages(true); // prevent XSS injection in user input
192
+ if ($this->getRequest()->isPost()) {
193
+ $errors = array();
194
+
195
+ if (!$customer = Mage::registry('current_customer')) {
196
+ $customer = Mage::getModel('customer/customer')->setId(null);
197
+ }
198
+
199
+ /* @var $customerForm Mage_Customer_Model_Form */
200
+ $customerForm = Mage::getModel('customer/form');
201
+ $customerForm->setFormCode('customer_account_create')
202
+ ->setEntity($customer);
203
+
204
+ $customerData = $customerForm->extractData($this->getRequest());
205
+
206
+ if ($this->getRequest()->getParam('is_subscribed', false)) {
207
+ $customer->setIsSubscribed(1);
208
+ }
209
+
210
+ /**
211
+ * Initialize customer group id
212
+ */
213
+ $customer->getGroupId();
214
+
215
+ if ($this->getRequest()->getPost('create_address')) {
216
+ /* @var $address Mage_Customer_Model_Address */
217
+ $address = Mage::getModel('customer/address');
218
+ /* @var $addressForm Mage_Customer_Model_Form */
219
+ $addressForm = Mage::getModel('customer/form');
220
+ $addressForm->setFormCode('customer_register_address')
221
+ ->setEntity($address);
222
+
223
+ $addressData = $addressForm->extractData($this->getRequest(), 'address', false);
224
+ $addressErrors = $addressForm->validateData($addressData);
225
+ if ($addressErrors === true) {
226
+ $address->setId(null)
227
+ ->setIsDefaultBilling($this->getRequest()->getParam('default_billing', false))
228
+ ->setIsDefaultShipping($this->getRequest()->getParam('default_shipping', false));
229
+ $addressForm->compactData($addressData);
230
+ $customer->addAddress($address);
231
+
232
+ $addressErrors = $address->validate();
233
+ if (is_array($addressErrors)) {
234
+ $errors = array_merge($errors, $addressErrors);
235
+ }
236
+ } else {
237
+ $errors = array_merge($errors, $addressErrors);
238
+ }
239
+ }
240
+
241
+ try {
242
+ $customerErrors = $customerForm->validateData($customerData);
243
+ if ($customerErrors !== true) {
244
+ $errors = array_merge($customerErrors, $errors);
245
+ } else {
246
+ $customerForm->compactData($customerData);
247
+ $customer->setPassword($this->getRequest()->getPost('password'));
248
+ $customer->setConfirmation($this->getRequest()->getPost('confirmation'));
249
+ $customerErrors = $customer->validate();
250
+ if (is_array($customerErrors)) {
251
+ $errors = array_merge($customerErrors, $errors);
252
+ }
253
+ }
254
+
255
+ $validationResult = count($errors) == 0;
256
+ Mage::log($errors);
257
+
258
+ if (true === $validationResult) {
259
+ $customer->save();
260
+ Mage::dispatchEvent('customer_register_success',
261
+ array('account_controller' => $this, 'customer' => $customer)
262
+ );
263
+
264
+ if ($customer->isConfirmationRequired()) {
265
+ $customer->sendNewAccountEmail(
266
+ 'confirmation',
267
+ $session->getBeforeAuthUrl(),
268
+ Mage::app()->getStore()->getId()
269
+ );
270
+ $session->addSuccess($this->__('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href="%s">click here</a>.', Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail())));
271
+ return;
272
+ } else {
273
+ $session->setCustomerAsLoggedIn($customer);
274
+ $url = $this->_welcomeCustomer($customer);
275
+ //$url = Mage::getUrl('customer/account');
276
+ //$this->_redirectSuccess($url);
277
+ $res = array(
278
+ 'result' => 'newUser',
279
+ 'redirect' => $url
280
+ );
281
+ $this->getResponse()->setHeader('Content-type', 'application/json');
282
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
283
+ }
284
+ } else {
285
+ $session->setCustomerFormData($this->getRequest()->getPost());
286
+ if (is_array($errors)) {
287
+ foreach ($errors as $errorMessage) {
288
+ $session->addError($errorMessage);
289
+ }
290
+ $res['result'] = 'error';
291
+ $res['message'] = $error;
292
+ } else {
293
+ $res['result'] = 'error';
294
+ $res['message'] = $this->__('Invalid customer data');
295
+ }
296
+ }
297
+ $this->getResponse()->setHeader('Content-type', 'application/json');
298
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
299
+ } catch (Mage_Core_Exception $e) {
300
+ $session->setCustomerFormData($this->getRequest()->getPost());
301
+ if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
302
+ $message = $this->__('There is already an account with this email address.');
303
+ } else {
304
+ $message = $e->getMessage();
305
+ }
306
+ $res['result'] = 'error';
307
+ $res['message'] = $message;
308
+ $this->getResponse()->setHeader('Content-type', 'application/json');
309
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
310
+ } catch (Exception $e) {
311
+ $session->setCustomerFormData($this->getRequest()->getPost())
312
+ ->addException($e, $this->__('Cannot save the customer.'));
313
+ $message = $this->__('Cannot save the customer.');
314
+ $res['result'] = 'error';
315
+ $res['message'] = $message;
316
+ $this->getResponse()->setHeader('Content-type', 'application/json');
317
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
318
+ }
319
+ }
320
+
321
+ Mage::log('error');
322
+ //$this->_redirectError(Mage::getUrl('*/*/create', array('_secure' => true)));
323
+ }
324
+
325
+ /**
326
+ * Login post action
327
+ */
328
+ public function loginPostAction()
329
+ {
330
+ if ($this->_getSession()->isLoggedIn()) {
331
+ $res['result'] = 'error';
332
+ $res['message'] = $this->__('User is logged in.');
333
+ $this->getResponse()->setHeader('Content-type', 'application/json');
334
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
335
+ return;
336
+ }
337
+ $session = $this->_getSession();
338
+
339
+ if ($this->getRequest()->isPost()) {
340
+ $login = Mage::helper('core')->jsonDecode($this->getRequest()->getPost('login'));
341
+ if (!empty($login['username']) && !empty($login['password'])) {
342
+ $res = array();
343
+ try {
344
+ $session->login($login['username'], $login['password']);
345
+ if ($session->getCustomer()->getIsJustConfirmed()) {
346
+ $this->_welcomeCustomer($session->getCustomer(), true);
347
+ }
348
+ $res['result'] = 'success';
349
+ $this->getResponse()->setHeader('Content-type', 'application/json');
350
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
351
+ } catch (Mage_Core_Exception $e) {
352
+ switch ($e->getCode()) {
353
+ case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
354
+ $value = Mage::helper('customer')->getEmailConfirmationUrl($login['username']);
355
+ $message = Mage::helper('customer')->__('This account is not confirmed. <a href="%s">Click here</a> to resend confirmation email.', $value);
356
+ break;
357
+ case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
358
+ $message = $e->getMessage();
359
+ break;
360
+ default:
361
+ $message = $e->getMessage();
362
+ }
363
+ $res['result'] = 'error';
364
+ $res['message'] = $message;
365
+ $this->getResponse()->setHeader('Content-type', 'application/json');
366
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
367
+ } catch (Exception $e) {
368
+ // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
369
+ }
370
+ } else {
371
+ $res['result'] = 'error';
372
+ $res['message'] = $this->__('Login and password are required.');
373
+ $this->getResponse()->setHeader('Content-type', 'application/json');
374
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
375
+ }
376
+ }
377
+ $this->getResponse()->setHeader('Content-type', 'application/json');
378
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
379
+ }
380
+
381
+ }
382
+
app/code/community/Gigya/Social/controllers/ReviewsController.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Gigya_Social_ReviewsController
4
+ * @author Yaniv Aran-Shamir
5
+ */
6
+ require_once ('Mage/Review/controllers/ProductController.php');
7
+ class Gigya_Social_ReviewsController extends Mage_Review_ProductController
8
+ {
9
+
10
+ public function indexAction()
11
+ {
12
+ $this->loadLayout();
13
+ $this->renderLayout();
14
+ }
15
+ /**
16
+ * Submit new review action
17
+ *
18
+ */
19
+ public function postAction()
20
+ {
21
+ if ($data = Mage::getSingleton('review/session')->getFormData(true)) {
22
+ $rating = array();
23
+ if (isset($data['ratings']) && is_array($data['ratings'])) {
24
+ $rating = $data['ratings'];
25
+ }
26
+ } else {
27
+ $data = $this->getRequest()->getPost();
28
+ $data = Mage::helper('core')->jsonDecode($data['json']);
29
+ $rating = array_filter($data['ratings']);
30
+ }
31
+ if (($product = $this->_initProduct()) && !empty($data)) {
32
+ $session = Mage::getSingleton('core/session');
33
+ /* @var $session Mage_Core_Model_Session */
34
+ $review = Mage::getModel('review/review')->setData($data);
35
+ /* @var $review Mage_Review_Model_Review */
36
+
37
+ $res = array();
38
+ $validate = $review->validate();
39
+ if ($validate === true) {
40
+ try {
41
+ $review->setEntityId($review->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE))
42
+ ->setEntityPkValue($product->getId())
43
+ ->setStatusId(Mage_Review_Model_Review::STATUS_PENDING)
44
+ ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())
45
+ ->setStoreId(Mage::app()->getStore()->getId())
46
+ ->setStores(array(Mage::app()->getStore()->getId()))
47
+ ->save();
48
+
49
+ foreach ($rating as $ratingId => $optionId) {
50
+ Mage::getModel('rating/rating')
51
+ ->setRatingId($ratingId)
52
+ ->setReviewId($review->getId())
53
+ ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())
54
+ ->addOptionVote($optionId, $product->getId());
55
+ }
56
+
57
+ $review->aggregate();
58
+ $res['result'] = 'ok';
59
+ $res['message'] = $this->__('Your review has been accepted for moderation.');
60
+ }
61
+ catch (Exception $e) {
62
+ $session->setFormData($data);
63
+ $res['result'] = 'error';
64
+ $res['message'] = $this->__('Unable to post the review.');
65
+ }
66
+ }
67
+ else {
68
+ $session->setFormData($data);
69
+ if (is_array($validate)) {
70
+ foreach ($validate as $errorMessage) {
71
+ $res['message'][] = $errorMessage;
72
+ }
73
+ }
74
+ else {
75
+ $session->addError($this->__('Unable to post the review.'));
76
+ $res['message'] = $this->__('Unable to post the review.');
77
+ }
78
+ $res['result'] = 'error';
79
+ }
80
+ }
81
+ else {
82
+ $res = array(
83
+ 'result' => 'error',
84
+ 'message' => $this->__('No post data.'),
85
+ );
86
+
87
+ }
88
+
89
+ $this->getResponse()->setHeader('Content-type', 'application/json');
90
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($res));
91
+ }
92
+ }
93
+
94
+
app/code/community/Gigya/Social/controllers/php_errors.log ADDED
@@ -0,0 +1,2 @@
 
 
1
+ [22-Nov-2012 16:21:01 UTC] PHP Parse error: syntax error, unexpected T_IF in LoginController.php on line 342
2
+ [27-Nov-2012 08:31:49 UTC] PHP Parse error: syntax error, unexpected T_IF in LoginController.php on line 342
app/code/community/Gigya/Social/etc/config.xml ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Gigya_Social>
5
+ <version>0.1.0</version>
6
+ </Gigya_Social>
7
+ </modules>
8
+ <frontend>
9
+ <events>
10
+ <customer_register_success>
11
+ <observers>
12
+ <gigya_registration_observer>
13
+ <type>singleton</type>
14
+ <class>Gigya_Social_Model_Customer_Observer</class>
15
+ <method>notify_registration</method>
16
+ </gigya_registration_observer>
17
+ </observers>
18
+ </customer_register_success>
19
+ <customer_delete_after>
20
+ <observers>
21
+ <gigya_customer_delete>
22
+ <class>Gigya_Social_Model_Customer_Observer</class>
23
+ <method>notify_delete</method>
24
+ </gigya_customer_delete>
25
+ </observers>
26
+ </customer_delete_after>
27
+ <customer_login>
28
+ <observers>
29
+ <gigya_login>
30
+ <type>singleton</type>
31
+ <class>Gigya_Social_Model_Customer_Observer</class>
32
+ <method>notify_login</method>
33
+ </gigya_login>
34
+ </observers>
35
+ </customer_login>
36
+ <customer_logout>
37
+ <observers>
38
+ <gigya_logout>
39
+ <type>singleton</type>
40
+ <class>Gigya_Social_Model_Customer_Observer</class>
41
+ <method>notify_logout</method>
42
+ </gigya_logout>
43
+ </observers>
44
+ </customer_logout>
45
+ <checkout_cart_product_add_after>
46
+ <observers>
47
+ <gigya_share_action>
48
+ <class>Gigya_Social_Model_Cart_Observer</class>
49
+ <method>addShareUi</method>
50
+ </gigya_share_action>
51
+ </observers>
52
+ </checkout_cart_product_add_after>
53
+ <checkout_onepage_controller_success_action>
54
+ <observers>
55
+ <gigya_share_action>
56
+ <type>singleton</type>
57
+ <class>Gigya_Social_Model_Cart_Observer</class>
58
+ <method>addOrderShareUi</method>
59
+ </gigya_share_action>
60
+ </observers>
61
+ </checkout_onepage_controller_success_action>
62
+ </events>
63
+ <routers>
64
+ <gigyalogin>
65
+ <use>standard</use>
66
+ <args>
67
+ <module>Gigya_Social</module>
68
+ <frontName>gigyalogin</frontName>
69
+ </args>
70
+ </gigyalogin>
71
+ <reviews>
72
+ <use>standard</use>
73
+ <args>
74
+ <module>Gigya_Social</module>
75
+ <frontName>gigyareviews</frontName>
76
+ </args>
77
+ </reviews>
78
+ </routers>
79
+ <layout>
80
+ <updates>
81
+ <Gigya_Social>
82
+ <file>gigya.xml</file>
83
+ </Gigya_Social>
84
+ </updates>
85
+ </layout>
86
+ </frontend>
87
+ <global>
88
+ <helpers>
89
+ <Gigya_Social>
90
+ <class>Gigya_Social_Helper</class>
91
+ </Gigya_Social>
92
+ </helpers>
93
+ <blocks>
94
+ <Gigya_Social>
95
+ <class>Gigya_Social_Block</class>
96
+ </Gigya_Social>
97
+ <page>
98
+ <rewrite>
99
+ <html_head>Gigya_Social_Block_Html_Head</html_head>
100
+ </rewrite>
101
+ </page>
102
+ </blocks>
103
+ <events>
104
+ </events>
105
+ </global>
106
+ <adminhtml>
107
+ <events>
108
+ <customer_delete_after>
109
+ <observers>
110
+ <gigya_customer_delete>
111
+ <class>Gigya_Social_Model_Customer_Observer</class>
112
+ <method>notify_delete</method>
113
+ </gigya_customer_delete>
114
+ </observers>
115
+ </customer_delete_after>
116
+ </events>
117
+ <acl>
118
+ <resources>
119
+ <admin>
120
+ <children>
121
+ <system>
122
+ <children>
123
+ <config>
124
+ <children>
125
+ <gigya_global>
126
+ <title>Gigya global config</title>
127
+ </gigya_global>
128
+ <gigya_login>
129
+ <title>Gigya Social login</title>
130
+ </gigya_login>
131
+ <gigya_share>
132
+ <title>Gigya Share configuration</title>
133
+ </gigya_share>
134
+ <gigya_reactions>
135
+ <title>Gigya Reactions configuration</title>
136
+ </gigya_reactions>
137
+ <gigya_comments>
138
+ <title>Gigya Comments configuration</title>
139
+ </gigya_comments>
140
+ <gigya_activityfeed>
141
+ <title>Gigya Comments configuration</title>
142
+ </gigya_activityfeed>
143
+ <gigya_gamification>
144
+ <title>Gigya Comments configuration</title>
145
+ </gigya_gamification>
146
+ <gigya_r_and_r>
147
+ <title>Gigya Rating &amp; Reviews configuration</title>
148
+ </gigya_r_and_r>
149
+ </children>
150
+ </config>
151
+ </children>
152
+ </system>
153
+ </children>
154
+ </admin>
155
+ </resources>
156
+ </acl>
157
+ </adminhtml>
158
+ <!--default values from admin sections-->
159
+ <default>
160
+ <gigya_global>
161
+ <gigya_global_conf>
162
+ <enable>1</enable>
163
+ <providers>*</providers>
164
+ <laguages>en</laguages>
165
+ <google_sa>0</google_sa>
166
+ </gigya_global_conf>
167
+ </gigya_global>
168
+ <gigya_login>
169
+ <gigya_login_conf>
170
+ <enable>1</enable>
171
+ <buttonsStyle>standart</buttonsStyle>
172
+ <showTermsLink>0</showTermsLink>
173
+ <loginBehavior>loginExistingUser</loginBehavior>
174
+ <containerID>gigyaLogin</containerID>
175
+ <width>210</width>
176
+ <height>110</height>
177
+ </gigya_login_conf>
178
+ <gigya_link_accounts>
179
+ <enable>0</enable>
180
+ <containerID>gigyAaddConnections</containerID>
181
+ <width>210</width>
182
+ <height>110</height>
183
+ <showTermsLink>0</showTermsLink>
184
+ <showEditLink>1</showEditLink>
185
+ </gigya_link_accounts>
186
+ </gigya_login>
187
+ <gigya_share>
188
+ <gigya_sharebar>
189
+ <enable_cart>1</enable_cart>
190
+ <enable_order>1</enable_order>
191
+ <containerID>gigyaSharebar</containerID>
192
+ <shareButtons>share,facebook-like,twitter-tweet</shareButtons>
193
+ <layout>horizontal</layout>
194
+ <showCounts>right</showCounts>
195
+ <imageBehavior>defualt</imageBehavior>
196
+ </gigya_sharebar>
197
+ <gigya_share_action>
198
+ <enable_cart>1</enable_cart>
199
+ <enable_order>1</enable_order>
200
+ <showAlwaysShare>hide</showAlwaysShare>
201
+ <showNeverShare>1</showNeverShare>
202
+ <enabledProviders>facebook,twitter,linkedin,myspace,yahoo</enabledProviders>
203
+ <moreEnabledProviders>*</moreEnabledProviders>
204
+ <scope>both</scope>
205
+ </gigya_share_action>
206
+ </gigya_share>
207
+ <gigya_reactions>
208
+ <gigya_reactions_conf>
209
+ <enable>1</enable>
210
+ <containerID>gigyaReactions</containerID>
211
+ <layout>horizontal</layout>
212
+ <showCounts>right</showCounts>
213
+ <countType>number</countType>
214
+ <enabledProviders>facebook,twitter,linkedin,myspace,yahoo</enabledProviders>
215
+ <multipleReactions>1</multipleReactions>
216
+ <imageBehavior>defualt</imageBehavior>
217
+ <scope>both</scope>
218
+ </gigya_reactions_conf>
219
+ </gigya_reactions>
220
+ <gigya_coments>
221
+ <gigya_comments_conf>
222
+ <enable>0</enable>
223
+ <containerID>gigyaComments</containerID>
224
+ <scope>both</scope>
225
+ </gigya_comments_conf>
226
+ </gigya_coments>
227
+ <gigya_activityfeed>
228
+ <gigya_activityfeed_conf>
229
+ <enable>1</enable>
230
+ <containerID>gigyaActivityfeed</containerID>
231
+ <tabOrder>everyone,friends,me</tabOrder>
232
+ <privacy>private</privacy>
233
+ <siteName>My Store</siteName>
234
+ <width>195</width>
235
+ <height>250</height>
236
+ </gigya_activityfeed_conf>
237
+ </gigya_activityfeed>
238
+ <gigya_gamification>
239
+ <gigya_gamification_conf>
240
+ <enable>1</enable>
241
+ <notifications>0</notifications>
242
+ <period>7days</period>
243
+ <totalCount>12</totalCount>
244
+ </gigya_gamification_conf>
245
+ </gigya_gamification>
246
+ <gigya_r_and_r>
247
+ <gigya_r_and_r_conf>
248
+ <enable>1</enable>
249
+ <containerID>gigyaRatings</containerID>
250
+ <scope>both</scope>
251
+ </gigya_r_and_r_conf>
252
+ </gigya_r_and_r>
253
+ </default>
254
+ </config>
app/code/community/Gigya/Social/etc/system.xml ADDED
@@ -0,0 +1,870 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <gigya translate="label">
5
+ <label>Gigya</label>
6
+ <sort_order>250</sort_order>
7
+ </gigya>
8
+ </tabs>
9
+ <sections>
10
+ <gigya_global translate="label" module="Gigya_Social">
11
+ <label>Gigya Global</label>
12
+ <tab>gigya</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <gigya_global_conf translate="label">
20
+ <label>Gigya global configuration</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>100</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+ <fields>
27
+ <enable translate="label">
28
+ <label>Enable</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>10</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </enable>
36
+ <apikey translate="label">
37
+ <label>Gigya API key</label>
38
+ <frontend_type>text</frontend_type>
39
+ <comment><![CDATA[Specify the Gigya API key for this domain]]></comment>
40
+ <sort_order>11</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>0</show_in_store>
44
+ </apikey>
45
+ <secretkey translate="label">
46
+ <label>Gigya Secret key</label>
47
+ <frontend_type>text</frontend_type>
48
+ <comment><![CDATA[Specify the Gigya Secret (Base64 encoded) key for this domain]]></comment>
49
+ <sort_order>12</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>0</show_in_store>
53
+ </secretkey>
54
+ <providers translate="label">
55
+ <label>Providers</label>
56
+ <frontend_type>text</frontend_type>
57
+ <comment><![CDATA[Comma separated list of networks that would be included. For example: "Facebook, Twitter, Yahoo". <br/>
58
+ * means all networks. See list of available <a href="http://developers.gigya.com/020_Client_API/020_Methods/Socialize.showLoginUI" target="_blank">providers.</a>]]></comment>
59
+ <sort_order>13</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>0</show_in_store>
63
+ </providers>
64
+ <laguages translate="label">
65
+ <label>Interface language</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>Gigya_Social_Model_config_source_languages</source_model>
68
+ <sort_order>14</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </laguages>
73
+ <google_sa translate="label">
74
+ <label>Enable Google Social Analytics</label>
75
+ <frontend_type>select</frontend_type>
76
+ <source_model>adminhtml/system_config_source_yesno</source_model>
77
+ <sort_order>15</sort_order>
78
+ <show_in_default>1</show_in_default>
79
+ <show_in_website>1</show_in_website>
80
+ <show_in_store>1</show_in_store>
81
+ </google_sa>
82
+ <advancedConfig translate="label">
83
+ <label>Advanced configuration</label>
84
+ <frontend_type>Textarea</frontend_type>
85
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
86
+ <sort_order>17</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ </advancedConfig>
91
+ </fields>
92
+ </gigya_global_conf>
93
+ </groups>
94
+ </gigya_global>
95
+ <gigya_login translate="label" module="Gigya_Social">
96
+ <label>Gigya Social login</label>
97
+ <tab>gigya</tab>
98
+ <frontend_type>text</frontend_type>
99
+ <sort_order>100</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ <groups>
104
+ <gigya_login_conf translate="label">
105
+ <label>Gigya Social login configuration</label>
106
+ <frontend_type>text</frontend_type>
107
+ <sort_order>100</sort_order>
108
+ <show_in_default>1</show_in_default>
109
+ <show_in_website>1</show_in_website>
110
+ <show_in_store>0</show_in_store>
111
+ <fields>
112
+ <enable translate="label">
113
+ <label>Enable Gigya Social login</label>
114
+ <frontend_type>select</frontend_type>
115
+ <source_model>adminhtml/system_config_source_yesno</source_model>
116
+ <sort_order>10</sort_order>
117
+ <show_in_default>1</show_in_default>
118
+ <show_in_website>1</show_in_website>
119
+ <show_in_store>1</show_in_store>
120
+ </enable>
121
+ <buttonsStyle translate="label">
122
+ <label>Button style</label>
123
+ <frontend_type>select</frontend_type>
124
+ <source_model>Gigya_Social_Model_config_source_buttons</source_model>
125
+ <sort_order>11</sort_order>
126
+ <show_in_default>1</show_in_default>
127
+ <show_in_website>1</show_in_website>
128
+ <show_in_store>1</show_in_store>
129
+ </buttonsStyle>
130
+ <showTermsLink translate="label">
131
+ <label>Show terms link</label>
132
+ <frontend_type>select</frontend_type>
133
+ <source_model>adminhtml/system_config_source_yesno</source_model>
134
+ <sort_order>12</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>1</show_in_website>
137
+ <show_in_store>1</show_in_store>
138
+ </showTermsLink>
139
+ <loginBehavior translate="label">
140
+ <label>Login behavior</label>
141
+ <frontend_type>select</frontend_type>
142
+ <source_model>Gigya_Social_Model_config_source_loginb</source_model>
143
+ <sort_order>13</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </loginBehavior>
148
+ <containerID translate="label">
149
+ <label>Gigya login container id</label>
150
+ <frontend_type>text</frontend_type>
151
+ <comment><![CDATA[div ID for loginUI]]></comment>
152
+ <sort_order>14</sort_order>
153
+ <show_in_default>1</show_in_default>
154
+ <show_in_website>1</show_in_website>
155
+ <show_in_store>0</show_in_store>
156
+ </containerID>
157
+ <width translate="label">
158
+ <label>Width</label>
159
+ <frontend_type>text</frontend_type>
160
+ <sort_order>15</sort_order>
161
+ <show_in_default>1</show_in_default>
162
+ <show_in_website>1</show_in_website>
163
+ <show_in_store>0</show_in_store>
164
+ </width>
165
+ <height translate="label">
166
+ <label>Height</label>
167
+ <frontend_type>text</frontend_type>
168
+ <sort_order>16</sort_order>
169
+ <show_in_default>1</show_in_default>
170
+ <show_in_website>1</show_in_website>
171
+ <show_in_store>0</show_in_store>
172
+ </height>
173
+ <advancedConfig translate="label">
174
+ <label>Advanced configuration</label>
175
+ <frontend_type>Textarea</frontend_type>
176
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
177
+ <sort_order>17</sort_order>
178
+ <show_in_default>1</show_in_default>
179
+ <show_in_website>1</show_in_website>
180
+ <show_in_store>1</show_in_store>
181
+ </advancedConfig>
182
+ </fields>
183
+ </gigya_login_conf>
184
+ <gigya_link_accounts translate="lable">
185
+ <label>Gigya Add Connections configuration</label>
186
+ <frontend_type>text</frontend_type>
187
+ <sort_order>101</sort_order>
188
+ <show_in_default>1</show_in_default>
189
+ <show_in_website>1</show_in_website>
190
+ <show_in_store>0</show_in_store>
191
+ <fields>
192
+ <enable translate="label">
193
+ <label>Enable Gigya add connections</label>
194
+ <frontend_type>select</frontend_type>
195
+ <source_model>adminhtml/system_config_source_yesno</source_model>
196
+ <sort_order>10</sort_order>
197
+ <show_in_default>1</show_in_default>
198
+ <show_in_website>1</show_in_website>
199
+ <show_in_store>1</show_in_store>
200
+ </enable>
201
+ <containerID translate="label">
202
+ <label>Gigya add connections container id</label>
203
+ <frontend_type>text</frontend_type>
204
+ <comment><![CDATA[div ID for add connections]]></comment>
205
+ <sort_order>11</sort_order>
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>0</show_in_store>
209
+ </containerID>
210
+ <width translate="label">
211
+ <label>Width</label>
212
+ <frontend_type>text</frontend_type>
213
+ <sort_order>12</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>0</show_in_store>
217
+ </width>
218
+ <height translate="label">
219
+ <label>Height</label>
220
+ <frontend_type>text</frontend_type>
221
+ <sort_order>13</sort_order>
222
+ <show_in_default>1</show_in_default>
223
+ <show_in_website>1</show_in_website>
224
+ <show_in_store>0</show_in_store>
225
+ </height>
226
+ <showTermsLink translate="label">
227
+ <label>Show terms link</label>
228
+ <frontend_type>select</frontend_type>
229
+ <source_model>adminhtml/system_config_source_yesno</source_model>
230
+ <sort_order>14</sort_order>
231
+ <show_in_default>1</show_in_default>
232
+ <show_in_website>1</show_in_website>
233
+ <show_in_store>1</show_in_store>
234
+ </showTermsLink>
235
+ <showEditLink translate="label">
236
+ <label>Show edit link</label>
237
+ <frontend_type>select</frontend_type>
238
+ <source_model>adminhtml/system_config_source_yesno</source_model>
239
+ <sort_order>14</sort_order>
240
+ <show_in_default>1</show_in_default>
241
+ <show_in_website>1</show_in_website>
242
+ <show_in_store>1</show_in_store>
243
+ </showEditLink>
244
+ <advancedConfig translate="label">
245
+ <label>Advanced configuration</label>
246
+ <frontend_type>Textarea</frontend_type>
247
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
248
+ <sort_order>17</sort_order>
249
+ <show_in_default>1</show_in_default>
250
+ <show_in_website>1</show_in_website>
251
+ <show_in_store>1</show_in_store>
252
+ </advancedConfig>
253
+ </fields>
254
+ </gigya_link_accounts>
255
+ </groups>
256
+ </gigya_login>
257
+ <gigya_share translate="label" module="Gigya_Social">
258
+ <label>Gigya Share</label>
259
+ <tab>gigya</tab>
260
+ <frontend_type>text</frontend_type>
261
+ <sort_order>101</sort_order>
262
+ <show_in_default>1</show_in_default>
263
+ <show_in_website>1</show_in_website>
264
+ <show_in_store>1</show_in_store>
265
+ <groups>
266
+ <gigya_sharebar translate="label">
267
+ <label>Gigya Sharebar configuration</label>
268
+ <frontend_type>text</frontend_type>
269
+ <sort_order>101</sort_order>
270
+ <show_in_default>1</show_in_default>
271
+ <show_in_website>1</show_in_website>
272
+ <show_in_store>0</show_in_store>
273
+ <fields>
274
+ <enable_cart translate="label">
275
+ <label>Enable Gigya Share Bar on product pages</label>
276
+ <frontend_type>select</frontend_type>
277
+ <source_model>adminhtml/system_config_source_yesno</source_model>
278
+ <sort_order>10</sort_order>
279
+ <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
+ <show_in_store>1</show_in_store>
282
+ </enable_cart>
283
+ <enable_order translate="label">
284
+ <label>Enable Gigya Share Bar on order complete page</label>
285
+ <frontend_type>select</frontend_type>
286
+ <source_model>adminhtml/system_config_source_yesno</source_model>
287
+ <sort_order>10</sort_order>
288
+ <show_in_default>1</show_in_default>
289
+ <show_in_website>1</show_in_website>
290
+ <show_in_store>1</show_in_store>
291
+ </enable_order>
292
+ <containerID translate="label">
293
+ <label>Gigya Share Bar container id</label>
294
+ <frontend_type>text</frontend_type>
295
+ <comment><![CDATA[div ID for Share Bar]]></comment>
296
+ <sort_order>11</sort_order>
297
+ <show_in_default>1</show_in_default>
298
+ <show_in_website>1</show_in_website>
299
+ <show_in_store>0</show_in_store>
300
+ </containerID>
301
+ <shareButtons translate="label">
302
+ <label>Providers</label>
303
+ <frontend_type>text</frontend_type>
304
+ <comment><![CDATA[List of relevant values is available <a href="http://developers.gigya.com/020_Client_API/020_Methods/socialize.showShareBarUI" target="_blank">here </a>under the "shareButtons" parameter']]></comment>
305
+ <sort_order>12</sort_order>
306
+ <show_in_default>1</show_in_default>
307
+ <show_in_website>1</show_in_website>
308
+ <show_in_store>0</show_in_store>
309
+ </shareButtons>
310
+ <layout translate="label">
311
+ <label>Share Bar layout</label>
312
+ <frontend_type>select</frontend_type>
313
+ <source_model>Gigya_Social_Model_config_source_layout</source_model>
314
+ <sort_order>13</sort_order>
315
+ <show_in_default>1</show_in_default>
316
+ <show_in_website>1</show_in_website>
317
+ <show_in_store>1</show_in_store>
318
+ </layout>
319
+ <showCounts translate="label">
320
+ <label>Show counts</label>
321
+ <frontend_type>select</frontend_type>
322
+ <source_model>Gigya_Social_Model_config_source_counts</source_model>
323
+ <sort_order>14</sort_order>
324
+ <show_in_default>1</show_in_default>
325
+ <show_in_website>1</show_in_website>
326
+ <show_in_store>1</show_in_store>
327
+ </showCounts>
328
+ <imageBehavior translate="label">
329
+ <label>Image</label>
330
+ <frontend_type>select</frontend_type>
331
+ <source_model>Gigya_Social_Model_config_source_imageb</source_model>
332
+ <sort_order>15</sort_order>
333
+ <show_in_default>1</show_in_default>
334
+ <show_in_website>1</show_in_website>
335
+ <show_in_store>1</show_in_store>
336
+ </imageBehavior>
337
+ <imageUrl translate="label">
338
+ <label>Image url</label>
339
+ <frontend_type>text</frontend_type>
340
+ <comment><![CDATA[Default URL of the image to share.]]></comment>
341
+ <sort_order>16</sort_order>
342
+ <show_in_default>1</show_in_default>
343
+ <show_in_website>1</show_in_website>
344
+ <show_in_store>0</show_in_store>
345
+ <depends>
346
+ <imageBehavior>url</imageBehavior>
347
+ </depends>
348
+ </imageUrl>
349
+ <advancedConfig translate="label">
350
+ <label>Advanced configuration</label>
351
+ <frontend_type>Textarea</frontend_type>
352
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
353
+ <sort_order>17</sort_order>
354
+ <show_in_default>1</show_in_default>
355
+ <show_in_website>1</show_in_website>
356
+ <show_in_store>1</show_in_store>
357
+ </advancedConfig>
358
+ </fields>
359
+ </gigya_sharebar>
360
+ <gigya_share_action translate="label">
361
+ <label>Gigya Share action configuration</label>
362
+ <frontend_type>text</frontend_type>
363
+ <sort_order>102</sort_order>
364
+ <show_in_default>1</show_in_default>
365
+ <show_in_website>1</show_in_website>
366
+ <show_in_store>0</show_in_store>
367
+ <fields>
368
+ <enable_cart translate="label">
369
+ <label>Enable Gigya Share on add to cart</label>
370
+ <frontend_type>select</frontend_type>
371
+ <source_model>adminhtml/system_config_source_yesno</source_model>
372
+ <sort_order>10</sort_order>
373
+ <show_in_default>1</show_in_default>
374
+ <show_in_website>1</show_in_website>
375
+ <show_in_store>1</show_in_store>
376
+ </enable_cart>
377
+ <enable_order translate="label">
378
+ <label>Enable Gigya Share on order complete</label>
379
+ <frontend_type>select</frontend_type>
380
+ <source_model>adminhtml/system_config_source_yesno</source_model>
381
+ <sort_order>10</sort_order>
382
+ <show_in_default>1</show_in_default>
383
+ <show_in_website>1</show_in_website>
384
+ <show_in_store>1</show_in_store>
385
+ </enable_order>
386
+ <showAlwaysShare translate="label">
387
+ <label>Show Always Share</label>
388
+ <frontend_type>select</frontend_type>
389
+ <source_model>Gigya_Social_Model_config_source_allwaysShare</source_model>
390
+ <sort_order>11</sort_order>
391
+ <show_in_default>1</show_in_default>
392
+ <show_in_website>1</show_in_website>
393
+ <show_in_store>1</show_in_store>
394
+ </showAlwaysShare>
395
+ <showNeverShare translate="label">
396
+ <label>Show Never Share</label>
397
+ <frontend_type>select</frontend_type>
398
+ <source_model>adminhtml/system_config_source_yesno</source_model>
399
+ <sort_order>12</sort_order>
400
+ <show_in_default>1</show_in_default>
401
+ <show_in_website>1</show_in_website>
402
+ <show_in_store>1</show_in_store>
403
+ </showNeverShare>
404
+ <enabledProviders translate="label">
405
+ <label>Providers</label>
406
+ <frontend_type>text</frontend_type>
407
+ <comment><![CDATA[List of relevant values is available <a href="http://developers.gigya.com/020_Client_API/010_Socialize/socialize.showShareUI" target="_blank">here </a>under the "enabledProviders" parameter']]></comment>
408
+ <sort_order>13</sort_order>
409
+ <show_in_default>1</show_in_default>
410
+ <show_in_website>1</show_in_website>
411
+ <show_in_store>0</show_in_store>
412
+ </enabledProviders>
413
+ <moreEnabledProviders translate="label">
414
+ <label>more screen providers</label>
415
+ <frontend_type>text</frontend_type>
416
+ <comment><![CDATA[A comma separated string of destination names that defines which destination sites buttons will be displayed on the "More" screen, and also determine the order, possible values can be found <a href="http://developers.gigya.com/010_Developer_Guide/18_Plugins/032_Share/030_Adding_More_Destinations" target="_blank">here</a>. <br \> "*" means all providers. ]]></comment>
417
+ <sort_order>13</sort_order>
418
+ <show_in_default>1</show_in_default>
419
+ <show_in_website>1</show_in_website>
420
+ <show_in_store>0</show_in_store>
421
+ </moreEnabledProviders>
422
+ <scope translate="label">
423
+ <label>Scope for publishing to Activity Feed</label>
424
+ <frontend_type>select</frontend_type>
425
+ <source_model>Gigya_Social_Model_config_source_scope</source_model>
426
+ <comment><![CDATA[When publishing feed items, by default the feed items are published to social networks only and will not appear on the site's Activity Feed plugin. To change this behavior, you must change the publish scope to "Both"]]></comment>
427
+ <sort_order>14</sort_order>
428
+ <show_in_default>1</show_in_default>
429
+ <show_in_website>1</show_in_website>
430
+ <show_in_store>1</show_in_store>
431
+ </scope>
432
+ <advancedConfig translate="label">
433
+ <label>Advanced configuration</label>
434
+ <frontend_type>Textarea</frontend_type>
435
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
436
+ <sort_order>17</sort_order>
437
+ <show_in_default>1</show_in_default>
438
+ <show_in_website>1</show_in_website>
439
+ <show_in_store>1</show_in_store>
440
+ </advancedConfig>
441
+ </fields>
442
+ </gigya_share_action>
443
+ </groups>
444
+ </gigya_share>
445
+ <gigya_reactions translate="label" module="Gigya_Social">
446
+ <label>Gigya Reactions</label>
447
+ <tab>gigya</tab>
448
+ <frontend_type>text</frontend_type>
449
+ <sort_order>102</sort_order>
450
+ <show_in_default>1</show_in_default>
451
+ <show_in_website>1</show_in_website>
452
+ <show_in_store>0</show_in_store>
453
+ <groups>
454
+ <gigya_reactions_conf translate="label">
455
+ <label>Gigya Reactions configuration</label>
456
+ <frontend_type>text</frontend_type>
457
+ <sort_order>102</sort_order>
458
+ <show_in_default>1</show_in_default>
459
+ <show_in_website>1</show_in_website>
460
+ <show_in_store>0</show_in_store>
461
+ <fields>
462
+ <enable translate="label">
463
+ <label>Enable Gigya reactions</label>
464
+ <frontend_type>select</frontend_type>
465
+ <source_model>adminhtml/system_config_source_yesno</source_model>
466
+ <sort_order>10</sort_order>
467
+ <show_in_default>1</show_in_default>
468
+ <show_in_website>1</show_in_website>
469
+ <show_in_store>1</show_in_store>
470
+ </enable>
471
+ <containerID translate="label">
472
+ <label>Gigya reactions container id</label>
473
+ <frontend_type>text</frontend_type>
474
+ <comment><![CDATA[div ID for Reactions Bar]]></comment>
475
+ <sort_order>11</sort_order>
476
+ <show_in_default>1</show_in_default>
477
+ <show_in_website>1</show_in_website>
478
+ <show_in_store>0</show_in_store>
479
+ </containerID>
480
+ <reactions translate="label">
481
+ <label>Reactions</label>
482
+ <frontend_type>textarea</frontend_type>
483
+ <cols>20</cols>
484
+ <sort_order>12</sort_order>
485
+ <show_in_default>1</show_in_default>
486
+ <show_in_website>1</show_in_website>
487
+ <show_in_store>1</show_in_store>
488
+ </reactions>
489
+ <enabledProviders translate="label">
490
+ <label>Providers</label>
491
+ <frontend_type>text</frontend_type>
492
+ <comment><![CDATA[List of relevant values is available <a href="http://developers.gigya.com/020_Client_API/010_Socialize/socialize.showReactionsBarUI" target="_blank">here </a>under the "enabledProviders" parameter']]></comment>
493
+ <sort_order>13</sort_order>
494
+ <show_in_default>1</show_in_default>
495
+ <show_in_website>1</show_in_website>
496
+ <show_in_store>0</show_in_store>
497
+ </enabledProviders>
498
+ <layout translate="label">
499
+ <label>Reactions Bar layout</label>
500
+ <frontend_type>select</frontend_type>
501
+ <source_model>Gigya_Social_Model_config_source_layout</source_model>
502
+ <sort_order>14</sort_order>
503
+ <show_in_default>1</show_in_default>
504
+ <show_in_website>1</show_in_website>
505
+ <show_in_store>1</show_in_store>
506
+ </layout>
507
+ <showCounts translate="label">
508
+ <label>Show counts</label>
509
+ <frontend_type>select</frontend_type>
510
+ <source_model>Gigya_Social_Model_config_source_counts</source_model>
511
+ <sort_order>15</sort_order>
512
+ <show_in_default>1</show_in_default>
513
+ <show_in_website>1</show_in_website>
514
+ <show_in_store>1</show_in_store>
515
+ </showCounts>
516
+ <countType translate="label">
517
+ <label>Count type</label>
518
+ <frontend_type>select</frontend_type>
519
+ <source_model>Gigya_Social_Model_config_source_countType</source_model>
520
+ <sort_order>15</sort_order>
521
+ <show_in_default>1</show_in_default>
522
+ <show_in_website>1</show_in_website>
523
+ <show_in_store>1</show_in_store>
524
+ </countType>
525
+ <multipleReactions translate="label">
526
+ <label>Use multiple reactions</label>
527
+ <frontend_type>select</frontend_type>
528
+ <comment><![CDATA[whether the user is permitted to click on multiple reaction buttons on the same reaction bar, or click on one reaction button only]]></comment>
529
+ <source_model>adminhtml/system_config_source_yesno</source_model>
530
+ <sort_order>16</sort_order>
531
+ <show_in_default>1</show_in_default>
532
+ <show_in_website>1</show_in_website>
533
+ <show_in_store>1</show_in_store>
534
+ </multipleReactions>
535
+ <scope translate="label">
536
+ <label>Scope for publishing to Activity Feed</label>
537
+ <frontend_type>select</frontend_type>
538
+ <source_model>Gigya_Social_Model_config_source_scope</source_model>
539
+ <comment><![CDATA[When publishing feed items, by default the feed items are published to social networks only and will not appear on the site's Activity Feed plugin. To change this behavior, you must change the publish scope to "Both"]]></comment>
540
+ <sort_order>17</sort_order>
541
+ <show_in_default>1</show_in_default>
542
+ <show_in_website>1</show_in_website>
543
+ <show_in_store>1</show_in_store>
544
+ </scope>
545
+ <imageBehavior translate="label">
546
+ <label>Image</label>
547
+ <frontend_type>select</frontend_type>
548
+ <source_model>Gigya_Social_Model_config_source_imageb</source_model>
549
+ <sort_order>18</sort_order>
550
+ <show_in_default>1</show_in_default>
551
+ <show_in_website>1</show_in_website>
552
+ <show_in_store>1</show_in_store>
553
+ </imageBehavior>
554
+ <imageUrl translate="label">
555
+ <label>Image url</label>
556
+ <frontend_type>text</frontend_type>
557
+ <comment><![CDATA[Default URL of the image to share.]]></comment>
558
+ <sort_order>19</sort_order>
559
+ <show_in_default>1</show_in_default>
560
+ <show_in_website>1</show_in_website>
561
+ <show_in_store>0</show_in_store>
562
+ <depends>
563
+ <imageBehavior>url</imageBehavior>
564
+ </depends>
565
+ </imageUrl>
566
+ <advancedConfig translate="label">
567
+ <label>Advanced configuration</label>
568
+ <frontend_type>Textarea</frontend_type>
569
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
570
+ <sort_order>20</sort_order>
571
+ <show_in_default>1</show_in_default>
572
+ <show_in_website>1</show_in_website>
573
+ <show_in_store>1</show_in_store>
574
+ </advancedConfig>
575
+ </fields>
576
+ </gigya_reactions_conf>
577
+ </groups>
578
+ </gigya_reactions>
579
+ <gigya_comments translate="label" module="Gigya_Social">
580
+ <label>Gigya Comments</label>
581
+ <tab>gigya</tab>
582
+ <frontend_type>text</frontend_type>
583
+ <sort_order>102</sort_order>
584
+ <show_in_default>1</show_in_default>
585
+ <show_in_website>1</show_in_website>
586
+ <show_in_store>0</show_in_store>
587
+ <groups>
588
+ <gigya_comments_conf translate="label">
589
+ <label>Gigya Comments configuration</label>
590
+ <frontend_type>text</frontend_type>
591
+ <sort_order>102</sort_order>
592
+ <show_in_default>1</show_in_default>
593
+ <show_in_website>1</show_in_website>
594
+ <show_in_store>0</show_in_store>
595
+ <fields>
596
+ <enable translate="label">
597
+ <label>Enable Gigya Comments</label>
598
+ <frontend_type>select</frontend_type>
599
+ <source_model>adminhtml/system_config_source_yesno</source_model>
600
+ <sort_order>10</sort_order>
601
+ <show_in_default>1</show_in_default>
602
+ <show_in_website>1</show_in_website>
603
+ <show_in_store>1</show_in_store>
604
+ </enable>
605
+ <containerID translate="label">
606
+ <label>Gigya Comments container id</label>
607
+ <frontend_type>text</frontend_type>
608
+ <comment><![CDATA[div ID for Comments]]></comment>
609
+ <sort_order>11</sort_order>
610
+ <show_in_default>1</show_in_default>
611
+ <show_in_website>1</show_in_website>
612
+ <show_in_store>0</show_in_store>
613
+ </containerID>
614
+ <categoryID translate="label">
615
+ <label>Gigya Comments Category id</label>
616
+ <frontend_type>text</frontend_type>
617
+ <comment><![CDATA[Category as set up in the Gigya admin site.]]></comment>
618
+ <sort_order>12</sort_order>
619
+ <show_in_default>1</show_in_default>
620
+ <show_in_website>1</show_in_website>
621
+ <show_in_store>0</show_in_store>
622
+ </categoryID>
623
+ <scope translate="label">
624
+ <label>Scope for publishing to Activity Feed</label>
625
+ <frontend_type>select</frontend_type>
626
+ <source_model>Gigya_Social_Model_config_source_scope</source_model>
627
+ <comment><![CDATA[When publishing feed items, by default the feed items are published to social networks only and will not appear on the site's Activity Feed plugin. To change this behavior, you must change the publish scope to "Both"]]></comment>
628
+ <sort_order>13</sort_order>
629
+ <show_in_default>1</show_in_default>
630
+ <show_in_website>1</show_in_website>
631
+ <show_in_store>1</show_in_store>
632
+ </scope>
633
+ <advancedConfig translate="label">
634
+ <label>Advanced configuration</label>
635
+ <frontend_type>Textarea</frontend_type>
636
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
637
+ <sort_order>17</sort_order>
638
+ <show_in_default>1</show_in_default>
639
+ <show_in_website>1</show_in_website>
640
+ <show_in_store>1</show_in_store>
641
+ </advancedConfig>
642
+ </fields>
643
+ </gigya_comments_conf>
644
+ </groups>
645
+ </gigya_comments>
646
+ <gigya_activityfeed translate="label" module="Gigya_Social">
647
+ <label>Gigya Activity Feed</label>
648
+ <tab>gigya</tab>
649
+ <frontend_type>text</frontend_type>
650
+ <sort_order>102</sort_order>
651
+ <show_in_default>1</show_in_default>
652
+ <show_in_website>1</show_in_website>
653
+ <show_in_store>0</show_in_store>
654
+ <groups>
655
+ <gigya_activityfeed_conf translate="label">
656
+ <label>Gigya Activity Feed configuration</label>
657
+ <frontend_type>text</frontend_type>
658
+ <sort_order>102</sort_order>
659
+ <show_in_default>1</show_in_default>
660
+ <show_in_website>1</show_in_website>
661
+ <show_in_store>0</show_in_store>
662
+ <fields>
663
+ <enable translate="label">
664
+ <label>Enable Gigya Activity Feed</label>
665
+ <frontend_type>select</frontend_type>
666
+ <source_model>adminhtml/system_config_source_yesno</source_model>
667
+ <sort_order>10</sort_order>
668
+ <show_in_default>1</show_in_default>
669
+ <show_in_website>1</show_in_website>
670
+ <show_in_store>1</show_in_store>
671
+ </enable>
672
+ <containerID translate="label">
673
+ <label>Gigya Activity Feed container id</label>
674
+ <frontend_type>text</frontend_type>
675
+ <comment><![CDATA[div ID for Activity Feed]]></comment>
676
+ <sort_order>11</sort_order>
677
+ <show_in_default>1</show_in_default>
678
+ <show_in_website>1</show_in_website>
679
+ <show_in_store>0</show_in_store>
680
+ </containerID>
681
+ <siteName translate="label">
682
+ <label>Site name</label>
683
+ <frontend_type>text</frontend_type>
684
+ <comment><![CDATA[Your site name. This string will be planted into various headers of the plugin (for more information read the <a title="020 Developer Guide/65 The Newsfeed Widget" rel="internal" href="http://developers.gigya.com/010_Developer_Guide/18_Plugins/060_Activity_Feed_Plugin" target="_blank">Activity <span>Feed </span>Plugin</a><span> documentation</span>).]]></comment>
685
+ <sort_order>12</sort_order>
686
+ <show_in_default>1</show_in_default>
687
+ <show_in_website>1</show_in_website>
688
+ <show_in_store>0</show_in_store>
689
+ </siteName>
690
+ <tabOrder translate="label">
691
+ <label>Tabs and order</label>
692
+ <frontend_type>text</frontend_type>
693
+ <comment><![CDATA[A comma delimited list of tabs names that defines which tabs to show and the tabs order. The optional tabs names are: "everyone", "friends", "me".]]></comment>
694
+ <sort_order>13</sort_order>
695
+ <show_in_default>1</show_in_default>
696
+ <show_in_website>1</show_in_website>
697
+ <show_in_store>0</show_in_store>
698
+ </tabOrder>
699
+ <privacy translate="label">
700
+ <label>Privacy</label>
701
+ <frontend_type>select</frontend_type>
702
+ <source_model>Gigya_Social_Model_config_source_privacy</source_model>
703
+ <sort_order>14</sort_order>
704
+ <show_in_default>1</show_in_default>
705
+ <show_in_website>1</show_in_website>
706
+ <show_in_store>1</show_in_store>
707
+ </privacy>
708
+ <width translate="label">
709
+ <label>Width</label>
710
+ <frontend_type>text</frontend_type>
711
+ <sort_order>15</sort_order>
712
+ <show_in_default>1</show_in_default>
713
+ <show_in_website>1</show_in_website>
714
+ <show_in_store>0</show_in_store>
715
+ </width>
716
+ <height translate="label">
717
+ <label>Height</label>
718
+ <frontend_type>text</frontend_type>
719
+ <sort_order>16</sort_order>
720
+ <show_in_default>1</show_in_default>
721
+ <show_in_website>1</show_in_website>
722
+ <show_in_store>0</show_in_store>
723
+ </height>
724
+ <advancedConfig translate="label">
725
+ <label>Advanced configuration</label>
726
+ <frontend_type>Textarea</frontend_type>
727
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
728
+ <sort_order>17</sort_order>
729
+ <show_in_default>1</show_in_default>
730
+ <show_in_website>1</show_in_website>
731
+ <show_in_store>1</show_in_store>
732
+ </advancedConfig>
733
+ </fields>
734
+ </gigya_activityfeed_conf>
735
+ </groups>
736
+ </gigya_activityfeed>
737
+ <gigya_gamification translate="label" module="Gigya_Social">
738
+ <label>Gigya Gamification</label>
739
+ <tab>gigya</tab>
740
+ <frontend_type>text</frontend_type>
741
+ <sort_order>102</sort_order>
742
+ <show_in_default>1</show_in_default>
743
+ <show_in_website>1</show_in_website>
744
+ <show_in_store>0</show_in_store>
745
+ <groups>
746
+ <gigya_gamification_conf translate="label">
747
+ <label>Gigya Gamification configuration</label>
748
+ <frontend_type>text</frontend_type>
749
+ <sort_order>102</sort_order>
750
+ <show_in_default>1</show_in_default>
751
+ <show_in_website>1</show_in_website>
752
+ <show_in_store>0</show_in_store>
753
+ <fields>
754
+ <enable translate="label">
755
+ <label>Enable Gigya Gamification</label>
756
+ <frontend_type>select</frontend_type>
757
+ <source_model>adminhtml/system_config_source_yesno</source_model>
758
+ <sort_order>10</sort_order>
759
+ <show_in_default>1</show_in_default>
760
+ <show_in_website>1</show_in_website>
761
+ <show_in_store>1</show_in_store>
762
+ </enable>
763
+ <notifications translate="label">
764
+ <label>Enable Gamification notifications</label>
765
+ <frontend_type>select</frontend_type>
766
+ <source_model>adminhtml/system_config_source_yesno</source_model>
767
+ <sort_order>11</sort_order>
768
+ <show_in_default>1</show_in_default>
769
+ <show_in_website>1</show_in_website>
770
+ <show_in_store>1</show_in_store>
771
+ </notifications>
772
+ <period translate="label">
773
+ <label>Leaderboard Time Period</label>
774
+ <frontend_type>select</frontend_type>
775
+ <source_model>Gigya_Social_Model_config_source_leaderboard</source_model>
776
+ <sort_order>12</sort_order>
777
+ <show_in_default>1</show_in_default>
778
+ <show_in_website>1</show_in_website>
779
+ <show_in_store>1</show_in_store>
780
+ </period>
781
+ <totalCount translate="label">
782
+ <label>Leaderboard User Count</label>
783
+ <frontend_type>text</frontend_type>
784
+ <comment><![CDATA[The total number of users to display in the Leaderboard plugin. values between 1 - 36]]></comment>
785
+ <sort_order>13</sort_order>
786
+ <show_in_default>1</show_in_default>
787
+ <show_in_website>1</show_in_website>
788
+ <show_in_store>0</show_in_store>
789
+ </totalCount>
790
+ <advancedConfig translate="label">
791
+ <label>Advanced configuration</label>
792
+ <frontend_type>Textarea</frontend_type>
793
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
794
+ <sort_order>17</sort_order>
795
+ <show_in_default>1</show_in_default>
796
+ <show_in_website>1</show_in_website>
797
+ <show_in_store>1</show_in_store>
798
+ </advancedConfig>
799
+ </fields>
800
+ </gigya_gamification_conf>
801
+ </groups>
802
+ </gigya_gamification>
803
+ <gigya_r_and_r translate="label" module="Gigya_Social">
804
+ <label>Gigya Rating &amp; Reviews</label>
805
+ <tab>gigya</tab>
806
+ <frontend_type>text</frontend_type>
807
+ <sort_order>106</sort_order>
808
+ <show_in_default>1</show_in_default>
809
+ <show_in_website>1</show_in_website>
810
+ <show_in_store>0</show_in_store>
811
+ <groups>
812
+ <gigya_r_and_r_conf translate="label">
813
+ <label>Gigya Rating &amp; Reviews configuration</label>
814
+ <frontend_type>text</frontend_type>
815
+ <sort_order>102</sort_order>
816
+ <show_in_default>1</show_in_default>
817
+ <show_in_website>1</show_in_website>
818
+ <show_in_store>0</show_in_store>
819
+ <fields>
820
+ <enable translate="label">
821
+ <label>Enable Gigya Rating &amp; Reviews</label>
822
+ <frontend_type>select</frontend_type>
823
+ <source_model>adminhtml/system_config_source_yesno</source_model>
824
+ <sort_order>10</sort_order>
825
+ <show_in_default>1</show_in_default>
826
+ <show_in_website>1</show_in_website>
827
+ <show_in_store>1</show_in_store>
828
+ </enable>
829
+ <containerID translate="label">
830
+ <label>Div ID</label>
831
+ <frontend_type>text</frontend_type>
832
+ <comment><![CDATA[The ratings continer div ID]]></comment>
833
+ <sort_order>11</sort_order>
834
+ <show_in_default>1</show_in_default>
835
+ <show_in_website>1</show_in_website>
836
+ <show_in_store>0</show_in_store>
837
+ </containerID>
838
+ <categoryID translate="label">
839
+ <label>The identifier of the Comments Category.</label>
840
+ <frontend_type>text</frontend_type>
841
+ <sort_order>12</sort_order>
842
+ <show_in_default>1</show_in_default>
843
+ <show_in_website>1</show_in_website>
844
+ <show_in_store>0</show_in_store>
845
+ </categoryID>
846
+ <scope translate="label">
847
+ <label>Scope for publishing to Activity Feed</label>
848
+ <frontend_type>select</frontend_type>
849
+ <source_model>Gigya_Social_Model_config_source_scope</source_model>
850
+ <comment><![CDATA[When publishing feed items, by default the feed items are published to social networks only and will not appear on the site's Activity Feed plugin. To change this behavior, you must change the publish scope to "Both"]]></comment>
851
+ <sort_order>13</sort_order>
852
+ <show_in_default>1</show_in_default>
853
+ <show_in_website>1</show_in_website>
854
+ <show_in_store>1</show_in_store>
855
+ </scope>
856
+ <advancedConfig translate="label">
857
+ <label>Advanced configuration</label>
858
+ <frontend_type>Textarea</frontend_type>
859
+ <comment><![CDATA[Add configuration in key|value convention one per a line]]></comment>
860
+ <sort_order>14</sort_order>
861
+ <show_in_default>1</show_in_default>
862
+ <show_in_website>1</show_in_website>
863
+ <show_in_store>1</show_in_store>
864
+ </advancedConfig>
865
+ </fields>
866
+ </gigya_r_and_r_conf>
867
+ </groups>
868
+ </gigya_r_and_r>
869
+ </sections>
870
+ </config>
app/code/community/Gigya/Social/php_errors.log ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [17-Oct-2012 13:04:31 UTC] PHP Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in controllers/LoginController.php on line 38
2
+ [17-Oct-2012 14:56:48 UTC] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in controllers/LoginController.php on line 40
3
+ [17-Oct-2012 14:57:26 UTC] PHP Parse error: syntax error, unexpected T_VARIABLE in controllers/LoginController.php on line 52
4
+ [28-Oct-2012 13:10:46 UTC] PHP Parse error: syntax error, unexpected T_STRING in Model/Cart/Observer.php on line 26
5
+ [28-Oct-2012 13:11:01 UTC] PHP Parse error: syntax error, unexpected T_STRING in Model/Cart/Observer.php on line 26
6
+ [28-Oct-2012 14:27:56 UTC] PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
7
+ [28-Oct-2012 14:28:37 UTC] PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
8
+ [01-Nov-2012 08:22:21 UTC] PHP Parse error: syntax error, unexpected '=', expecting T_VARIABLE in Block/Gamification/Plugins.php on line 9
9
+ [01-Nov-2012 08:22:59 UTC] PHP Parse error: syntax error, unexpected '=', expecting T_VARIABLE in Block/Gamification/Plugins.php on line 9
10
+ [01-Nov-2012 15:58:56 UTC] PHP Parse error: syntax error, unexpected ')', expecting T_VARIABLE in Model/Cart/Observer.php on line 24
11
+ [11-Dec-2012 07:22:31 UTC] PHP Parse error: syntax error, unexpected ':', expecting ')' in Block/Share.php on line 20
12
+ [11-Dec-2012 07:22:58 UTC] PHP Parse error: syntax error, unexpected ':', expecting ')' in Block/Share.php on line 20
13
+ [11-Dec-2012 07:22:59 UTC] PHP Parse error: syntax error, unexpected ':', expecting ')' in Block/Share.php on line 20
14
+ [11-Dec-2012 07:25:57 UTC] PHP Parse error: syntax error, unexpected ':' in Block/Share.php on line 15
15
+ [11-Dec-2012 07:25:57 UTC] PHP Parse error: syntax error, unexpected ':' in Block/Share.php on line 15
16
+ [19-Dec-2012 11:53:29 UTC] PHP Parse error: syntax error, unexpected T_ELSEIF in Model/Customer/Observer.php on line 33
17
+ [24-Dec-2012 14:45:17 UTC] PHP Fatal error: Can't use function return value in write context in Block/Html/Head.php on line 16
app/code/community/Gigya/Social/sdk/GSSDK.php ADDED
@@ -0,0 +1,1033 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright (C) 2011 Gigya, Inc.
4
+ * Version 2.15.0
5
+ *
6
+ * Gigya PHP SDK
7
+ * @author Shachar Bar-David
8
+ */
9
+
10
+ if (!function_exists('curl_init')) {
11
+ throw new Exception('Gigya.Socialize needs the CURL PHP extension.');
12
+ }
13
+ if (!function_exists('json_decode')) {
14
+ throw new Exception('Gigya.Socialize needs the JSON PHP extension.');
15
+ }
16
+
17
+
18
+ /**
19
+ * Gigya Socialize Exception
20
+ *
21
+ */
22
+ class GSException extends Exception{
23
+
24
+ public $errorMessage;
25
+ }
26
+
27
+ /**
28
+ * Gigya Socialize Key Not Found Exception
29
+ *
30
+ */
31
+ class GSKeyNotFoundException extends GSException{
32
+
33
+ public function __construct($key){
34
+ $this->errorMessage = "GSObject does not contain a value for key ".$key;
35
+ }
36
+ }
37
+
38
+
39
+ /**
40
+ * A Request to Gigya Socialize API
41
+ *
42
+ */
43
+
44
+ class GSRequest {
45
+ private static $cafile;
46
+ const version = "2.15";
47
+ private $domain;
48
+ private $path;
49
+ private $traceLog = array();
50
+ protected $method;
51
+ private $proxy;
52
+
53
+ private $apiKey;
54
+ private $secretKey;
55
+ private $params; //GSObject
56
+ private $useHTTPS;
57
+
58
+ /**
59
+ * Constructs a request using an apiKey and secretKey.
60
+ * You must provide a user ID (UID) of the tage user.
61
+ * Suitable for calling our old REST API
62
+ * @param apiKey
63
+ * @param secretKey
64
+ * @param apiMethod the api method (including namespace) to call. for example: socialize.getUserInfo
65
+ * If namespaces is not supplied "socialize" is assumed
66
+ * @param params the request parameters
67
+ * @param useHTTPS useHTTPS set this to true if you want to use HTTPS.
68
+ */
69
+ public function __construct($apiKey, $secretKey, $apiMethod, $params = null, $useHTTPS = false )
70
+ {
71
+ if (!isset($apiMethod) || $apiMethod == null || strlen($apiMethod)==0)
72
+ return;
73
+
74
+ if (substr($apiMethod,0,1) == "/")
75
+ $apiMethod = substr($apiMethod,1);
76
+
77
+ if (strrpos($apiMethod,".")==0)
78
+ {
79
+
80
+ $this->domain = "socialize.gigya.com";
81
+ $this->path = "/socialize." . $apiMethod;
82
+ } else
83
+ {
84
+
85
+ $tokens = explode(".",$apiMethod);
86
+ $this->domain = $tokens[0].".gigya.com";
87
+ $this->path = "/".$apiMethod;
88
+ }
89
+
90
+ $this->method = $apiMethod;
91
+
92
+ if (empty($params))
93
+ $this->params = new GSObject();
94
+ else
95
+ $this->params = clone $params;
96
+
97
+ // use "_host" to override domain, if available
98
+ $this->domain = $this->params->getString("_host", $this->domain);
99
+
100
+ $this->useHTTPS = $useHTTPS;
101
+
102
+ $this->apiKey = $apiKey;
103
+ $this->secretKey = $secretKey;
104
+
105
+ $this->traceField("apiMethod",$apiMethod);
106
+ $this->traceField("apiKey",$apiKey);
107
+
108
+
109
+
110
+ }
111
+
112
+ public function setParam($param, $val) {
113
+ $this->params->put($param, $val);
114
+ }
115
+
116
+ public function getParams()
117
+ {
118
+ return $this->params;
119
+ }
120
+
121
+ public static function setCAFile($filename)
122
+ {
123
+ GSRequest::$cafile = $filename;
124
+ }
125
+
126
+ public function setProxy($proxy)
127
+ {
128
+ $this->proxy = $proxy;
129
+ $this->traceField("proxy",$proxy);
130
+ }
131
+
132
+ /**
133
+ * Send the request synchronously
134
+ */
135
+ public function send($timeout=null)
136
+ {
137
+ $format = $this->params->getString("format",null);
138
+ //set json as default format.
139
+ if (empty($format))
140
+ {
141
+ $format = "json";
142
+ $this->setParam("format", $format);
143
+ }
144
+ if(!empty($timeout))
145
+ {
146
+ $this->traceField("timeout",$timeout);
147
+ }
148
+
149
+ if ( (empty($this->apiKey))
150
+ || (empty($this->method))
151
+ )
152
+ {
153
+ return new GSResponse($this->method,null,$this->params,400002,null,$this->traceLog);
154
+ }
155
+
156
+ try
157
+ {
158
+ $this->setParam("httpStatusCodes", "false");
159
+ $this->traceField("params",$this->params);
160
+
161
+ $responseStr = $this->sendRequest("POST", $this->domain, $this->path, $this->params, $this->apiKey, $this->secretKey, $this->useHTTPS,$timeout);
162
+ return new GSResponse($this->method,$responseStr,null,0,null,$this->traceLog);
163
+ }
164
+ catch (Exception $ex) {
165
+ $errcode = 500000;
166
+ $errMsg = $ex->getMessage();
167
+ $length = strlen("Operation timed out");
168
+ if((substr($ex->getMessage(), 0, $length) === "Operation timed out"))
169
+ {
170
+ $errcode = 504002;
171
+ $errMsg = "Request Timeout";
172
+ }
173
+
174
+ return new GSResponse($this->method,null,$this->params,$errcode,$errMsg, $this->traceLog);
175
+ }
176
+ }
177
+
178
+ private function sendRequest($method,$domain,$path,$params,$token,$secret,$useHTTPS=false,$timeout=null)
179
+ {
180
+ $params->put("sdk", "php_".GSRequest::version);
181
+ //prepare query params
182
+ $protocol = $useHTTPS || empty($secret) ? "https" : "http";
183
+ $resourceURI = $protocol."://".$domain.$path;
184
+
185
+ //UTC timestamp.
186
+ $timestamp = (string) time();
187
+
188
+ //timestamp in milliseconds
189
+ $nonce = (string)SigUtils::currentTimeMillis();
190
+ $httpMethod = "POST";
191
+
192
+
193
+ if (!empty($secret))
194
+ {
195
+ $params->put("apiKey", $token);
196
+
197
+ if ($useHTTPS)
198
+ {
199
+ $params->put("secret", $secret);
200
+ } else
201
+ {
202
+ $params->put("timestamp", $timestamp);
203
+ $params->put("nonce", $nonce);
204
+
205
+ //signature
206
+ $signature = self::getOAuth1Signature($secret, $httpMethod, $resourceURI, $useHTTPS, $params);
207
+ $params->put("sig", $signature);
208
+ }
209
+ }
210
+ else {
211
+
212
+ $params->put("oauth_token", $token);
213
+ }
214
+
215
+ //get rest response.
216
+ $res = $this->curl($resourceURI, $params, $timeout);
217
+ return $res;
218
+ }
219
+
220
+
221
+ private function curl($url, $params, $timeout=null, $options = array())
222
+ {
223
+ foreach($params->getKeys() as $key)
224
+ {
225
+ $value = $params->getString($key);
226
+ $postData[$key] = $value;
227
+ }
228
+
229
+ $qs = http_build_query($postData);
230
+ $this->traceField("URL",$url);
231
+ $this->traceField("postData",$qs);
232
+
233
+ /* POST */
234
+ $defaults = array(
235
+ CURLOPT_URL => $url,
236
+ CURLOPT_POST=>1,
237
+ CURLOPT_HEADER => 1,
238
+ CURLOPT_POSTFIELDS=>$postData,
239
+ CURLOPT_HTTPHEADER => array( 'Expect:'),
240
+ CURLOPT_RETURNTRANSFER => TRUE,
241
+ //CURLOPT_TIMEOUT => 10,
242
+ CURLOPT_SSL_VERIFYPEER => TRUE,
243
+ CURLOPT_SSL_VERIFYHOST => 2,
244
+ CURLOPT_CAINFO => GSRequest::$cafile ,
245
+ CURLOPT_PROXY => $this->proxy,
246
+ CURLOPT_TIMEOUT_MS => $timeout
247
+ );
248
+
249
+ $ch = curl_init();
250
+ curl_setopt_array($ch, ($options + $defaults));
251
+
252
+ if(!$result = curl_exec($ch))
253
+ {
254
+ $err = curl_error($ch) ;
255
+ throw new Exception($err);
256
+ }
257
+ curl_close($ch);
258
+
259
+
260
+ list($header, $body) = explode("\r\n\r\n", $result, 2);
261
+ $headers = explode("\r\n", $header);
262
+ foreach($headers as $value)
263
+ {
264
+ $kvp = explode(":", $value);
265
+ if($kvp[0] == "x-server")
266
+ {
267
+ $this->traceField("server",$kvp[1]);
268
+ break;
269
+ }
270
+ }
271
+
272
+ return $body;
273
+ }
274
+
275
+ /**
276
+ * Converts a GSObject to a query string
277
+ * @param params
278
+ * @return
279
+ */
280
+ public static function buildQS($params)
281
+ {
282
+ $val;
283
+ $ret = "";
284
+ foreach($params->getKeys() as $key)
285
+ {
286
+ $val = $params->getString($key);
287
+ if (isset($val))
288
+ {
289
+ $ret .="$key=".$val;
290
+ }
291
+ $ret .='&';
292
+ }
293
+ return $ret;
294
+ }
295
+
296
+ private static function getOAuth1Signature($key, $httpMethod, $url, $isSecureConnection, $requestParams)
297
+ {
298
+ // Create the BaseString.
299
+ $baseString = self::calcOAuth1BaseString($httpMethod, $url, $isSecureConnection, $requestParams);
300
+ return SigUtils::calcSignature($baseString,$key);
301
+ }
302
+
303
+ private static function calcOAuth1BaseString($httpMethod, $url, $isSecureConnection, $requestParams)
304
+ {
305
+
306
+
307
+ $normalizedUrl = "";
308
+ $u = parse_url($url);
309
+ $protocol = strtolower($u["scheme"]);
310
+
311
+ if(array_key_exists('port',$u))
312
+ {
313
+ $port = $u['port'];
314
+ }
315
+ else
316
+ $port = null;
317
+
318
+ $normalizedUrl .= $protocol."://";
319
+ $normalizedUrl .= strtolower($u["host"]);
320
+
321
+ if ( $port != "" && (($protocol=="http" && $port!=80) || ($protocol=="https" && $port!=443)))
322
+ {
323
+ $normalizedUrl .= ':'.$port;
324
+ }
325
+ $normalizedUrl .= $u["path"];
326
+
327
+ // Create a sorted list of query parameters
328
+ $amp = "";
329
+ $queryString = "";
330
+ $keys = $requestParams->getKeys();
331
+ sort($keys);
332
+ foreach($keys as $key)
333
+ {
334
+ $value = $requestParams->getString($key);
335
+ if ($value !== false && $value != "0" && empty($value))
336
+ {
337
+ $value = "";
338
+ }
339
+
340
+ //curl is sending 1 and 0 when the value is boolean.
341
+ //so in order to create a valid signature we're changing false to 0 and true to 1.
342
+ if($value === false)$value = "0";
343
+ if($value === true)$value = "1";
344
+ $queryString .= $amp.$key."=".self::UrlEncode($value);
345
+ $amp = "&";
346
+ }
347
+
348
+ // Construct the base string from the HTTP method, the URL and the parameters
349
+ $baseString = strtoupper($httpMethod)."&".self::UrlEncode($normalizedUrl)."&".self::UrlEncode($queryString);
350
+ return $baseString;
351
+
352
+ }
353
+
354
+ public static function UrlEncode($value)
355
+ {
356
+ if ($value === false)
357
+ {
358
+ return $value;
359
+ }
360
+ else
361
+ {
362
+ return str_replace('%7E', '~', rawurlencode($value));
363
+ }
364
+ }
365
+
366
+ private function traceField($name,$value)
367
+ {
368
+ array_push($this->traceLog,$name."=". $value);
369
+ }
370
+
371
+ }
372
+
373
+
374
+ /**
375
+ * Wraps the server's response.
376
+ * If the request was sent with the format set to "xml", the getData() will return null and you should use getResponseText() instead.
377
+ * We only parse response text into GSObject if request format is set "json" which is the default.
378
+ *
379
+ */
380
+ class GSResponse
381
+ {
382
+ private $errorCode = 0;
383
+ private $errorMessage = null;
384
+ private $rawData = "";
385
+ private $data; //GSObject
386
+ private static $errorMsgDic;
387
+ private $params = null;
388
+ private $method = null;
389
+ private $traceLog = null;
390
+
391
+ public static function Init(){
392
+ self::$errorMsgDic = new GSObject();
393
+ self::$errorMsgDic->put(400002, "Required parameter is missing");
394
+ self::$errorMsgDic->put(500000, "General server error");
395
+ }
396
+
397
+
398
+ public function getErrorCode()
399
+ {
400
+ return $this->errorCode;
401
+ }
402
+
403
+ public function getErrorMessage() {
404
+ if (isset($this->errorMessage))
405
+ return $this->errorMessage;
406
+ else
407
+ {
408
+
409
+ if ($this->errorCode==0 || !self::$errorMsgDic->containsKey((int)$this->errorCode))
410
+ return "";
411
+ else
412
+ return self::$errorMsgDic->getString($this->errorCode);
413
+ }
414
+ }
415
+
416
+ public function getResponseText()
417
+ {
418
+ return $this->rawData;
419
+ }
420
+
421
+ public function getData()
422
+ {
423
+ return $this->data;
424
+ }
425
+
426
+ /* GET BOOLEAN */
427
+ public function getBool($key, $defaultValue=GSObject::DEFAULT_VALUE)
428
+ {
429
+ return $this->data->getBool($key,$defaultValue);
430
+ }
431
+
432
+ /* GET INTEGER */
433
+ public function getInt($key, $defaultValue=GSObject::DEFAULT_VALUE)
434
+ {
435
+ return $this->data->getInt($key,$defaultValue);
436
+ }
437
+
438
+ /* GET LONG */
439
+ public function getLong($key, $defaultValue=GSObject::DEFAULT_VALUE)
440
+ {
441
+ return $this->data->getLong($key,$defaultValue);
442
+ }
443
+ /* GET INTEGER */
444
+ public function getDouble($key, $defaultValue=GSObject::DEFAULT_VALUE)
445
+ {
446
+ return $this->data->getDouble($key,$defaultValue);
447
+ }
448
+
449
+ /* GET STRING */
450
+ public function getString($key, $defaultValue=GSObject::DEFAULT_VALUE)
451
+ {
452
+ return $this->data->getString($key,$defaultValue);
453
+ }
454
+
455
+ /* GET GSOBJECT */
456
+ public function getObject($key)
457
+ {
458
+ return $this->data->getObject($key);
459
+ }
460
+
461
+ /* GET GSOBJECT[] */
462
+ public function getArray($key)
463
+ {
464
+ return $this->data->getArray($key);
465
+ }
466
+
467
+
468
+ /* C'tor */
469
+ public function __construct($method,$responseText=null,$params=null,$errorCode=null,$errorMessage=null,$traceLog=null)
470
+ {
471
+
472
+ $this->traceLog = $traceLog;
473
+ $this->method = $method;
474
+ if(empty($params))
475
+ $this->params = new GSObject();
476
+ else
477
+ $this->params=$params;
478
+
479
+ if(!empty($responseText))
480
+ {
481
+ $this->rawData = $responseText;
482
+ if(strpos(ltrim($responseText),"{") !== false)
483
+ {
484
+
485
+ $this->data = new GSObject($responseText);
486
+ if(isset($this->data))
487
+ {
488
+ if ($this->data->containsKey("errorCode"))
489
+ {
490
+ $this->errorCode = $this->data->getInt("errorCode");
491
+ }
492
+ if ($this->data->containsKey("errorMessage"))
493
+ {
494
+ $this->errorMessage = $this->data->getString("errorMessage");
495
+ }
496
+ }
497
+ }
498
+ else
499
+ {
500
+ $matches= array();
501
+ preg_match("~<errorCode\s*>([^<]+)~", $this->rawData, $matches);
502
+ if(sizeof($matches)>0)
503
+ {
504
+ $errCodeStr = $matches[1];
505
+ if ($errCodeStr!=null)
506
+ {
507
+ $this->errorCode = (int)$errCodeStr;
508
+
509
+ $matches= array();
510
+ preg_match("~<errorMessage\s*>([^<]+)~", $this->rawData, $matches);
511
+ if(sizeof($matches)>0){
512
+ $this->errorMessage = $matches[1];
513
+ }
514
+ }
515
+ }
516
+ }
517
+
518
+ }
519
+ else{
520
+
521
+ $this->errorCode = $errorCode;
522
+ $this->errorMessage = $errorMessage != null ? $errorMessage : self::getErrorMessage();
523
+ $this->populateClientResponseText();
524
+ }
525
+ }
526
+
527
+ private function populateClientResponseText()
528
+ {
529
+ if ($this->params->getString("format","json"))
530
+ {
531
+ $this->rawData = "{errorCode:" . $this->errorCode . ",errorMessage:\"" . $this->errorMessage . "\"}";
532
+ }
533
+ else
534
+ {
535
+ $sb = array(
536
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
537
+ ,"<".$this->method."Response xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:com:gigya:api http://socialize-api.gigya.com/schema\" xmlns=\"urn:com:gigya:api\">"
538
+ ,"<errorCode>".$this->errorCode."</errorCode>"
539
+ ,"<errorMessage>".$this->errorMessage."</errorMessager>"
540
+ ,"</".$this->method."Response>"
541
+ );
542
+
543
+
544
+ $this->rawData = implode("\r\n",$sb);
545
+ }
546
+ }
547
+
548
+ public function getLog()
549
+ {
550
+ return implode("\r\n",$this->traceLog);
551
+ }
552
+
553
+
554
+ public function __toString()
555
+ {
556
+ $sb = "";
557
+ $sb .= "\terrorCode:";
558
+ $sb .= $this->errorCode;
559
+ $sb .= "\n\terrorMessage:";
560
+ $sb .= $this->errorMessage;
561
+ $sb .= "\n\tdata:";
562
+ $sb .= $this->data;
563
+ return $sb;
564
+ }
565
+ }
566
+ GSResponse::Init();
567
+
568
+
569
+ /**
570
+ * Used for passing parameters when issueing requests e.g. GSRequest.send
571
+ * As well as returning response data e.g. GSResponse.getData
572
+ * @version 1.0
573
+ */
574
+
575
+ class GSObject {
576
+ private $map;
577
+
578
+ /* PUBLIC INTERFACE */
579
+ /**
580
+ * Construct a GSObject from json string, throws excpetion.
581
+ * @param json the json formatted string
582
+ * @throws Exception if unable to parse json
583
+ */
584
+ public function __construct($json=null)
585
+ {
586
+ $this->map = array();
587
+ if(!empty($json)){
588
+
589
+ //parse json string.
590
+ if(gettype($json) == 'string')
591
+ {
592
+ $obj = json_decode($json,false);
593
+ if($obj == null){
594
+ throw new GSException();
595
+ }
596
+ }
597
+ else
598
+ {
599
+ $obj = $json;
600
+ }
601
+
602
+ self::processJsonObject($obj,$this);
603
+ }
604
+ }
605
+
606
+ public function serialize()
607
+ {
608
+ $arr = Array();
609
+ if(empty($this->map))return $arr;
610
+
611
+ $arr = $this->serializeGSObject($this);
612
+
613
+ return $arr;
614
+ }
615
+
616
+ public static function serializeGSObject($gsd)
617
+ {
618
+ $arr = Array();
619
+ foreach ($gsd->map as $name=>$value) {
620
+
621
+ $val = GSObject::serializeValue($value);
622
+ $arr[$name] = $val;
623
+ }
624
+ return $arr;
625
+ }
626
+
627
+
628
+
629
+ public static function serializeValue($value)
630
+ {
631
+
632
+ //GSDictionary
633
+ if($value instanceof GSObject){
634
+ return GSObject::serializeGSObject($value);
635
+ }
636
+
637
+ //array
638
+ else if($value instanceof GSArray){
639
+ return GSArray::serializeGSArray($value);
640
+ }
641
+
642
+ //else just add
643
+ else{
644
+ return $value;
645
+ }
646
+ }
647
+
648
+
649
+ /* Put */
650
+ const DEFAULT_VALUE = '@@EMPTY@@';
651
+
652
+ public function put($key,$value)
653
+ {
654
+ $this->map[$key] = $value;
655
+ }
656
+
657
+
658
+ private function get($key,$defaultValue)
659
+ {
660
+ if (array_key_exists($key, $this->map)) {
661
+ return $this->map[$key];
662
+ }
663
+
664
+ if($defaultValue !== GSObject::DEFAULT_VALUE)
665
+ {
666
+ return $defaultValue;
667
+ }
668
+ throw new GSKeyNotFoundException($key);
669
+ }
670
+
671
+ /* GET BOOLEAN */
672
+ public function getBool($key, $defaultValue=GSObject::DEFAULT_VALUE)
673
+ {
674
+ return (bool)$this->get($key,$defaultValue);
675
+ }
676
+
677
+ /* GET INTEGER */
678
+ public function getInt($key, $defaultValue=GSObject::DEFAULT_VALUE)
679
+ {
680
+ return (int)$this->get($key,$defaultValue);
681
+ }
682
+
683
+ /* GET LONG */
684
+ public function getLong($key, $defaultValue=GSObject::DEFAULT_VALUE)
685
+ {
686
+ return (float)$this->get($key,$defaultValue);
687
+ }
688
+
689
+ /* GET DOUBLE */
690
+ public function getDouble($key, $defaultValue=GSObject::DEFAULT_VALUE)
691
+ {
692
+ return (double)$this->get($key,$defaultValue);
693
+ }
694
+
695
+ /* GET STRING */
696
+ public function getString($key, $defaultValue=GSObject::DEFAULT_VALUE)
697
+ {
698
+ $obj = $this->get($key,$defaultValue);
699
+ return $obj;
700
+ }
701
+
702
+ /* GET GSOBJECT */
703
+ public function getObject($key)
704
+ {
705
+ return (object)$this->get($key,null);
706
+ }
707
+
708
+ /* GET GSOBJECT[] */
709
+ public function getArray($key)
710
+ {
711
+ return $this->get($key,null);
712
+ }
713
+
714
+ /**
715
+ * Parse parameters from URL into the dictionary
716
+ * @param url
717
+ */
718
+ public function parseURL($url)
719
+ {
720
+ try {
721
+ $u = parse_url($url);
722
+ if(isset($u["query"]))
723
+ $this->parseQueryString($u["query"]);
724
+ if(isset($u["fragment"]))
725
+ $this->parseQueryString($u["fragment"]);
726
+ } catch (Exception $e) {
727
+ }
728
+ }
729
+
730
+
731
+ /**
732
+ * Parse parameters from query string
733
+ * @param qs
734
+ */
735
+ public function parseQueryString($qs)
736
+ {
737
+ if (!isset($qs)) return;
738
+ parse_str($qs, $this->map);
739
+ }
740
+
741
+ public function containsKey($key)
742
+ {
743
+ return array_key_exists($key, $this->map);
744
+ }
745
+
746
+ public function remove($key)
747
+ {
748
+ unset($this->map[$key]);
749
+ }
750
+
751
+ public function clear()
752
+ {
753
+ unset($this->map);
754
+ $this->map = array();
755
+ }
756
+
757
+ public function getKeys(){
758
+ return array_keys($this->map);
759
+ }
760
+
761
+ public function __toString() {
762
+ return $this->toJsonString();
763
+ }
764
+
765
+ public function toString() {
766
+ return $this->toJsonString();
767
+ }
768
+
769
+ public function toJsonString()
770
+ {
771
+ try {
772
+ return json_encode($this->serialize());
773
+ } catch (Exception $e)
774
+ {
775
+ return null;
776
+ }
777
+ }
778
+
779
+ private static function processJsonObject($jo, $parentObj)
780
+ {
781
+ if(!empty($jo))
782
+ foreach ($jo as $name=>$value) {
783
+
784
+
785
+ //array
786
+ if(is_array(($value)))
787
+ {
788
+ $parentObj->put($name, new GSArray($value));
789
+ }
790
+ //object
791
+ elseif (is_object($value))
792
+ {
793
+
794
+ $childObj = new GSObject();
795
+ $parentObj->put($name, $childObj);
796
+ self::processJsonObject($value, $childObj);
797
+
798
+
799
+ }
800
+ //primitive
801
+ else{
802
+ $parentObj->put($name, $value);
803
+ }
804
+ }
805
+
806
+ return $parentObj;
807
+
808
+ }
809
+
810
+ }
811
+
812
+
813
+ class GSArray{
814
+ private $map;
815
+ const NO_INDEX_EX = "GSArray does not contain a value at index ";
816
+
817
+ public function __construct($value=null)
818
+ {
819
+ $this->map = array();
820
+ if(!empty($value)){
821
+ $obj = $value;
822
+
823
+ //parse json string.
824
+ if(gettype($value) == 'string')
825
+ {
826
+ $obj = json_decode($value,false);
827
+
828
+ if($obj == null){
829
+ throw new GSException();
830
+ }
831
+ }
832
+
833
+ $this->processJsonObject($obj,$this);
834
+ }
835
+ }
836
+
837
+ private static function processJsonObject($value,$gsarr)
838
+ {
839
+ if(!empty($value)){
840
+ foreach($value as $val)
841
+ {
842
+ if ($val == null)
843
+ {
844
+ $gsarr->add($val);
845
+ }
846
+ elseif (is_object($val))
847
+ {
848
+ $gsobj = new GSObject($val);
849
+ $gsarr->add($gsobj);
850
+ }
851
+ else if(is_array(($val)))
852
+ {
853
+ $newGsarr = new GSArray($val);
854
+ $gsarr->add($newGsarr);
855
+ }
856
+ else
857
+ {
858
+ $gsarr->add($val);
859
+ }
860
+ }
861
+ }
862
+ }
863
+
864
+ public function add($value){
865
+ array_push($this->map, $value);
866
+ }
867
+
868
+ public function getString($inx){
869
+ $obj = $this->map[$inx];
870
+ if ($obj === null)
871
+ return null;
872
+ else
873
+ return strval($obj);
874
+ }
875
+
876
+ public function getBool($inx){
877
+ $obj = $this->map[$inx];
878
+ if ($obj === null)
879
+ throw new Exception(GSArray::NO_INDEX_EX+$inx);
880
+
881
+ if (is_bool($obj))
882
+ {
883
+ return (Boolean)$obj;
884
+ } else
885
+ {
886
+ $val = strtolower(strval($obj));
887
+ return $val == "true" || $val == "1";
888
+ }
889
+ }
890
+
891
+ public function getInt($inx){
892
+
893
+ $obj = $this->map[$inx];
894
+ if ($obj === null)
895
+ throw new Exception(GSArray::NO_INDEX_EX+$inx);
896
+
897
+ if (is_int($obj))
898
+ {
899
+ return (int)$obj;
900
+ } else
901
+ {
902
+ return intval($this->getString($inx));
903
+ }
904
+ }
905
+
906
+ public function getLong($inx){
907
+ $obj = $this->map[$inx];
908
+ if ($obj === null)
909
+ throw new Exception(GSArray::NO_INDEX_EX+$inx);
910
+
911
+ if (is_float($obj))
912
+ {
913
+ return (float)$obj;
914
+ } else
915
+ {
916
+ return floatval($this->getString($inx));
917
+ }
918
+ }
919
+
920
+ public function getDouble($inx){
921
+ $obj = $this->map[$inx];
922
+ if ($obj === null)
923
+ throw new Exception(GSArray::NO_INDEX_EX+$inx);
924
+
925
+ if (is_double($obj))
926
+ {
927
+ return (double)$obj;
928
+ } else
929
+ {
930
+ return doubleval($this->getString($inx));
931
+ }
932
+ }
933
+
934
+ public function getObject($inx){
935
+ return $this->map[$inx];
936
+ }
937
+
938
+ public function getArray($inx){
939
+ return $this->map[$inx];
940
+ }
941
+
942
+ public function length(){
943
+ return sizeof($this->map);
944
+ }
945
+
946
+
947
+ public function __toString() {
948
+ return $this->toJsonString();
949
+ }
950
+
951
+ public function toString() {
952
+ return $this->toJsonString();
953
+ }
954
+
955
+ public function toJsonString()
956
+ {
957
+ try {
958
+ return json_encode($this->serialize());
959
+ } catch (Exception $e)
960
+ {
961
+ return null;
962
+ }
963
+ }
964
+ public function serialize()
965
+ {
966
+ $arr = Array();
967
+ if(empty($this->map))return $arr;
968
+
969
+ $arr = GSArray::serializeGSArray($this);
970
+
971
+ return $arr;
972
+ }
973
+
974
+ public static function serializeGSArray($gsarr){
975
+ $arr = Array();
976
+ for($i=0; $i < $gsarr->length(); $i++) {
977
+
978
+ $val = $gsarr->getObject($i);
979
+ $val = GSObject::serializeValue($val);
980
+ array_push($arr,$val);
981
+ }
982
+ return $arr;
983
+ }
984
+ }
985
+
986
+
987
+
988
+ class SigUtils
989
+ {
990
+ public static function validateUserSignature($UID, $timestamp, $secret, $signature)
991
+ {
992
+ $baseString = $timestamp."_".$UID;
993
+ $expectedSig = self::calcSignature($baseString, $secret);
994
+ return $expectedSig == $signature;
995
+ }
996
+
997
+ public static function validateFriendSignature($UID, $timestamp, $friendUID, $secret, $signature)
998
+ {
999
+ $baseString = $timestamp."_".$friendUID."_".$UID;
1000
+ $expectedSig = self::calcSignature($baseString, $secret);
1001
+ return $expectedSig == $signature;
1002
+ }
1003
+
1004
+ static function currentTimeMillis()
1005
+ {
1006
+ // get utc time in ms
1007
+ list( $msecs, $uts ) = explode( ' ', microtime());
1008
+ return floor(($uts+$msecs)*1000);
1009
+ }
1010
+
1011
+ public static function getDynamicSessionSignature($glt_cookie, $timeoutInSeconds, $secret)
1012
+ {
1013
+ // cookie format:
1014
+ // <expiration time in unix time format>_BASE64(HMACSHA1(secret key, <login token>_<expiration time in unix time format>))
1015
+ $expirationTimeUnixMS = (SigUtils::currentTimeMillis()/1000) + $timeoutInSeconds;
1016
+ $expirationTimeUnix = (string)floor($expirationTimeUnixMS);
1017
+ $unsignedExpString = $glt_cookie . "_" . $expirationTimeUnix;
1018
+ $signedExpString = SigUtils::calcSignature($unsignedExpString, $secret); // sign the base string using the secret key
1019
+
1020
+ $ret = $expirationTimeUnix . '_' . $signedExpString; // define the cookie value
1021
+
1022
+ return $ret;
1023
+ }
1024
+
1025
+ static function calcSignature($baseString,$key)
1026
+ {
1027
+ $baseString = utf8_encode($baseString);
1028
+ $rawHmac = hash_hmac("sha1", utf8_encode($baseString), base64_decode($key), true);
1029
+ $signature = base64_encode($rawHmac);
1030
+ return $signature;
1031
+ }
1032
+ }
1033
+ ?>
app/design/frontend/base/default/layout/gigya.xml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addJs">
6
+ <file>gigya/gigya.js</file>
7
+ </action>
8
+ <action method="addCss">
9
+ <stylesheet>css/gigya.css</stylesheet>
10
+ </action>
11
+ </reference>
12
+ <reference name="before_body_end">
13
+ <block type="Gigya_Social_Block_Gamification_notifications" name="gigya.gm.notifications"/>
14
+ <block type="Gigya_Social_Block_share" name="gigya.share.action"/>
15
+ </reference>
16
+ <reference name="right">
17
+ <block name="gigya.activity.feed" type="core/template" after="-" template="gigya/activityfeed.phtml"/>
18
+ </reference>
19
+ </default>
20
+ <customer_logged_in>
21
+ <remove name="gigya.hp.login"/>
22
+ </customer_logged_in>
23
+ <cms_index_index>
24
+ <reference name="right">
25
+ <block type="core/template" name="gigya.hp.login" before="-" template="gigya/login/social_login.phtml"/>
26
+ </reference>
27
+ <reference name="content">
28
+ <block type="Gigya_Social_Block_Gamification_plugins" after="-" name="left.gigya.gm.blocks" template="gigya/gamification.phtml">
29
+ <action method="setData">
30
+ <name>layout</name>
31
+ <value>
32
+ <UserStatus>divUserStatus</UserStatus>
33
+ <ChallengeStatus>divChallenge</ChallengeStatus>
34
+ <Achievements>divAchievements</Achievements>
35
+ <Leaderboard>divLeaderboard</Leaderboard>
36
+ </value>
37
+ </action>
38
+ </block>
39
+ </reference>
40
+ </cms_index_index>
41
+ <customer_account_logoutsuccess>
42
+ <reference name="head">
43
+ <block type="Gigya_Social_Block_logout" name="gigya.logout.action"/>
44
+ </reference>
45
+ </customer_account_logoutsuccess>
46
+ <customer_account_login>
47
+ <reference name="content">
48
+ <block name="gigya.login" type="core/template" before="-" template="gigya/login/social_login_login_page.phtml"/>
49
+ </reference>
50
+ </customer_account_login>
51
+ <customer_account_index>
52
+ <reference name="content">
53
+ <block type="core/template" name="gigya.link.accounts" after="-" template="gigya/login/link_accounts.phtml"/>
54
+ </reference>
55
+ </customer_account_index>
56
+ <checkout_onepage_index>
57
+ <reference name="checkout.onepage.login">
58
+ <block name="gigya.login" type="core/template" as="form.additional.info" after="-" template="gigya/login/social_login.phtml"/>
59
+ </reference>
60
+ </checkout_onepage_index>
61
+ <checkout_onepage_success>
62
+ <reference name="content">
63
+ <block type="Gigya_Social_Block_Ordersharebar" name="gigya.sharebar" after="-" template="gigya/share/ordersharebar.phtml" />
64
+ </reference>
65
+ </checkout_onepage_success>
66
+ <review_product_list>
67
+ <reference name="product.info">
68
+ <block type="catalog/product_view" as="extrahint" name="gigya.sharebar" after="-" template="gigya/share/sharebar.phtml"/>
69
+ <block type="catalog/product_view" as="other" name="gigya.reactions" after="-" template="gigya/share/reactions.phtml"/>
70
+ </reference>
71
+ </review_product_list>
72
+ <catalog_product_view>
73
+ <reference name="product.info.extrahint">
74
+ <block type="catalog/product_view" name="gigya.sharebar" after="-" template="gigya/share/sharebar.phtml"/>
75
+ <block type="catalog/product_view" name="gigya.reactions" after="-" template="gigya/share/reactions.phtml"/>
76
+ </reference>
77
+ <reference name="content">
78
+ <block type="catalog/product_view" name="gigya.comments" after="-" template="gigya/comments.phtml"/>
79
+ <reference name="product.info">
80
+ <action method="addReviewSummaryTemplate">
81
+ <type>default</type>
82
+ <template>gigya/ratings/summary.phtml</template>
83
+ </action>
84
+ <action method="addReviewSummaryTemplate">
85
+ <type>short</type>
86
+ <template>gigya/ratings/summary_short.phtml</template>
87
+ </action>
88
+ </reference>
89
+ <reference name="product.info.upsell">
90
+ <action method="addReviewSummaryTemplate">
91
+ <type>default</type>
92
+ <template>gigya/ratings/summary_short.phtml</template>
93
+ </action>
94
+ </reference>
95
+ </reference>
96
+ </catalog_product_view>
97
+ <catalog_category_default>
98
+ <reference name="content">
99
+ <block name="product_list">
100
+ <action method="addReviewSummaryTemplate">
101
+ <type>short</type>
102
+ <template>gigya/ratings/summary_short.phtml</template>
103
+ </action>
104
+ </block>
105
+ </reference>
106
+ </catalog_category_default>
107
+ <catalog_category_layered>
108
+ <reference name="content">
109
+ <block name="product_list">
110
+ <action method="addReviewSummaryTemplate">
111
+ <type>short</type>
112
+ <template>gigya/ratings/summary_short.phtml</template>
113
+ </action>
114
+ </block>
115
+ </reference>
116
+ </catalog_category_layered>
117
+ <review_product_view>
118
+ <reference name="content">
119
+ <reference name="product.info">
120
+ <action method="addReviewSummaryTemplate">
121
+ <type>default</type>
122
+ <template>gigya/ratings/summary.phtml</template>
123
+ </action>
124
+ </reference>
125
+ </reference>
126
+ </review_product_view>
127
+ <review_product_list>
128
+ <reference name="content">
129
+ <block type="Gigya_Social_Block_reviews" name="gigya.ratings" after="-"/>
130
+ </reference>
131
+ </review_product_list>
132
+ </layout>
app/design/frontend/base/default/template/gigya/activityfeed.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_activityfeed/gigya_activityfeed_conf')) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.activityFeed = <?php echo Mage::helper('Gigya_Social')->getPluginConfig('gigya_activityfeed/gigya_activityfeed_conf') ?>
5
+ //]]>
6
+ </script>
7
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_activityfeed/gigya_activityfeed_conf') ?>" class="gigya-activity-feed"></div>
8
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/comments.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //TODO: add comments
3
+ ?>
4
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_comments/gigya_comments_conf')) : ?>
5
+ <?php
6
+ $product = $this->getProduct();
7
+ $conf = Mage::helper('Gigya_Social')->getPluginConfig('gigya_comments/gigya_comments_conf', 'php', TRUE);
8
+ $conf['streamID'] = $product->getSku();
9
+ $parms = Mage::helper('core')->jsonEncode($conf);
10
+ ?>
11
+ <script type="text/javascript">//<![CDATA[
12
+ var gigyaSettings = gigyaSettings || {};
13
+ gigyaSettings.comments = <?php echo $parms ?>;
14
+ //]]>
15
+ </script>
16
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_comments/gigya_comments_conf') ?>" class="gigya-comments"></div>
17
+ <?php endif ?>
18
+
app/design/frontend/base/default/template/gigya/form/emailForm.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* eamil from for login */
3
+
4
+ ?>
5
+
6
+ <div id="gigyaEmailForm">
7
+ <div class="desc"><?php echo $this->__('Please fill-in missing required info:')?></div>
8
+ <br/>
9
+ <label>Email: </label>
10
+ <input type="email" name="email" id="gigyaEmail"/>
11
+ <input class="button" id="gigyaEmailSubmit" type="button" value="Send" onClick="gigyaFunctions.emailSubmit()"/>
12
+ </div>
app/design/frontend/base/default/template/gigya/form/login.phtml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Customer login form template
30
+ *
31
+ * @see app/design/frontend/base/default/template/customer/form/login.phtml
32
+ */
33
+ /** @var $this Mage_Customer_Block_Form_Login */
34
+ ?>
35
+ <div class="account-login gigya">
36
+ <div class="page-title">
37
+ <h1><?php echo $this->__('Login or Create an Account') ?></h1>
38
+ </div>
39
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
40
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
41
+ <div class="col2-set">
42
+ <div class="col-1 new-users">
43
+ <div class="content">
44
+ <h2><?php echo $this->__('New Customers') ?></h2>
45
+ <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
46
+ </div>
47
+ </div>
48
+ <div class="col-2 registered-users">
49
+ <div class="content">
50
+ <h2><?php echo $this->__('Registered Customers') ?></h2>
51
+ <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
52
+ <ul class="form-list">
53
+ <li>
54
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
55
+ <div class="input-box">
56
+ <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
57
+ </div>
58
+ </li>
59
+ <li>
60
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
61
+ <div class="input-box">
62
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
63
+ </div>
64
+ </li>
65
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
66
+ <?php echo $this->getChildHtml('gigya.login'); ?>
67
+ </ul>
68
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <div class="col2-set">
73
+ <div class="col-1 new-users">
74
+ <div class="buttons-set">
75
+ <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
76
+ </div>
77
+ </div>
78
+ <div class="col-2 registered-users">
79
+ <div class="buttons-set">
80
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
81
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
86
+ <input name="context" type="hidden" value="checkout" />
87
+ <?php endif; ?>
88
+ </form>
89
+ <script type="text/javascript">
90
+ //<![CDATA[
91
+ var dataForm = new VarienForm('login-form', true);
92
+ //]]>
93
+ </script>
94
+ </div>
app/design/frontend/base/default/template/gigya/form/mini.login.phtml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="block block-login">
2
+ <div class="block-title">
3
+ <strong><span><?php echo $this->__('Link Accounts') ?></span></strong>
4
+ <span><?php echo $this->__('Your email address already exists in our system. Please login with your site credentials in order to link accounts') ?></span>
5
+ </div>
6
+ <div class="block-content">
7
+ <label for="mini-login"><?php echo $this->__('Email:') ?></label><input type="text" name="login[username]" id="gigya-mini-login" class="input-text" />
8
+ <label for="mini-password"><?php echo $this->__('Password:') ?></label><input type="password" name="login[password]" id="gigya-mini-password" class="input-text" />
9
+ <div class="actions">
10
+ <button type="button" class="button" onClick="gigyaFunctions.linkAccounts()"><span><span><?php echo $this->__('Link Accounts') ?></span></span></button>
11
+ </div>
12
+ <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
13
+ </div>
14
+ </div>
app/design/frontend/base/default/template/gigya/gamification.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_gamification/gigya_gamification_conf') && $this->helper('customer')->isLoggedIn()) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.gm = gigyaSettings.gm || {};
5
+ gigyaSettings.gm.plugins = <?php echo $this->getJs() ?>
6
+ //]]>
7
+ </script>
8
+ <div class="gigya-gm">
9
+ <?php echo $this->getHtml() ?>
10
+ </div>
11
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/login/link_accounts.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_login/gigya_link_accounts')) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.linkAccount = <?php echo Mage::helper('Gigya_Social')->getPluginConfig('gigya_login/gigya_link_accounts') ?>
5
+ //]]>
6
+ </script>
7
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_login/gigya_link_accounts') ?>" class="gigya-link-account"></div>
8
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/login/social_login.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_login/gigya_login_conf')) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.login = <?php echo Mage::helper('Gigya_Social')->getPluginConfig('gigya_login/gigya_login_conf') ?>
5
+ //]]>
6
+ </script>
7
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_login/gigya_login_conf') ?>" class="gigya-login"></div>
8
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/login/social_login_login_page.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_login/gigya_login_conf')) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.login = <?php echo Mage::helper('Gigya_Social')->getPluginConfig('gigya_login/gigya_login_conf') ?>
5
+ //]]>
6
+ </script>
7
+ <div class="col-1 account-login gigya-login">
8
+ <div class="content new-users">
9
+ <h2><?php echo $this->__('Social Login') ?></h2>
10
+ <p><?php echo $this->__('Use your social network credentials to login or create a new user.')?></p>
11
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_login/gigya_login_conf') ?>" class="gigya-login"></div>
12
+ </div>
13
+ <div class="buttons-set"></div>
14
+ </div>
15
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/php_errors.log ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ [29-Oct-2012 15:19:48 UTC] PHP Parse error: syntax error, unexpected $end in share/sharebar.phtml on line 19
2
+ [05-Dec-2012 13:59:50 UTC] PHP Fatal error: Can't use method return value in write context in share/reactions.phtml on line 7
3
+ [05-Dec-2012 14:36:55 UTC] PHP Parse error: syntax error, unexpected ';' in share/reactions.phtml on line 19
4
+ [05-Dec-2012 14:37:00 UTC] PHP Parse error: syntax error, unexpected ';' in share/reactions.phtml on line 19
5
+ [05-Dec-2012 14:38:51 UTC] PHP Parse error: syntax error, unexpected ';' in share/reactions.phtml on line 19
app/design/frontend/base/default/template/gigya/ratings.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_r_and_r/gigya_r_and_r_conf')) : ?>
2
+ <script type="text/javascript">//<![CDATA[
3
+ var gigyaSettings = gigyaSettings || {};
4
+ gigyaSettings.RnR = <?php echo $this->getParmas(); ?>
5
+ //]]>
6
+ </script>
7
+ <?php endif ?>
app/design/frontend/base/default/template/gigya/ratings/summary.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $product = $this->getProduct();
3
+ $parms = Mage::helper('Gigya_Social')->getPluginConfig('gigya_r_and_r/gigya_r_and_r_conf', 'php');
4
+ unset($parms['enable']);
5
+ $parms['streamID'] = $product->getSku();
6
+ $parms['context']['reviewUrl'] = $this->getReviewsUrl();
7
+ ?>
8
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_r_and_r/gigya_r_and_r_conf')) : ?>
9
+ <script type="text/javascript">//<![CDATA[
10
+ var gigyaSettings = gigyaSettings || {};
11
+ gigyaSettings.ratings = gigyaSettings.ratings || [];
12
+ gigyaSettings.ratings.push(<?php echo Mage::helper('core')->jsonEncode($parms) ?>);
13
+ //]]>
14
+ </script>
15
+ <?php endif ?>
16
+ <div id="<?php echo $parms['containerID'] ?>" class="ratings-full">
17
+ <?php if ($this->getRatingSummary()):?>
18
+ <div class="rating-box">
19
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
20
+ </div>
21
+ <?php endif;?>
22
+ <p class="rating-links">
23
+ <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
24
+ <span class="separator">|</span>
25
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
26
+ </p>
27
+ </div>
app/design/frontend/base/default/template/gigya/ratings/summary_short.phtml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $product = $this->getProduct();
3
+ $parms = Mage::helper('Gigya_Social')->getPluginConfig('gigya_r_and_r/gigya_r_and_r_conf', 'php');
4
+ unset($parms['enable']);
5
+ $parms['streamID'] = $product->getSku();
6
+ $parms['context']['reviewUrl'] = $this->getReviewsUrl();
7
+ $parms['containerID'] = $parms['containerID'] . '-' . $product->getId();
8
+ ?>
9
+ <script type="text/javascript">//<![CDATA[
10
+ var gigyaSettings = gigyaSettings || {};
11
+ gigyaSettings.ratings = gigyaSettings.ratings || [];
12
+ gigyaSettings.ratings.push(<?php echo Mage::helper('core')->jsonEncode($parms) ?>);
13
+ //]]>
14
+ </script>
15
+ <div id="<?php echo $parms['containerID'] ?>" class="ratings-short">
16
+ <?php if ($this->getRatingSummary()):?>
17
+ <div class="rating-box">
18
+ <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
19
+ </div>
20
+ <?php endif;?>
21
+ <span class="amount"><a href="#" onclick="var t = opener ? opener.window : window; t.location.href='<?php echo $this->getReviewsUrl() ?>'; return false;"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a></span>
22
+ </div>
app/design/frontend/base/default/template/gigya/share/ordersharebar.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //TODO: add comments
3
+ ?>
4
+ <?php if (Mage::helper('Gigya_Social')->isShareBarEnabled('order')) : ?>
5
+ <script type="text/javascript">//<![CDATA[
6
+ <?php echo $this->getContents(); ?>;
7
+ //]]>
8
+ </script>
9
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_share/gigya_sharebar') ?>" class="gigya-sharebar" style="margin-bottom: 10px;"></div>
10
+ <?php endif ?>
11
+
app/design/frontend/base/default/template/gigya/share/reactions.phtml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //TODO: add comments
3
+ ?>
4
+ <?php if (Mage::helper('Gigya_Social')->isPluginEnabled('gigya_reactions/gigya_reactions_conf')) : ?>
5
+ <?php
6
+ $product = $this->getProduct();
7
+ $desc = ($product->getShortDescription() !== NULL) ? $product->getShortDescription() : $product->getDescription();
8
+ $ua = Mage::helper('core')->jsonEncode(array(
9
+ 'title' => $product->getName(),
10
+ 'description' => $this->stripTags($desc),
11
+ 'linkBack' => $product->getProductUrl(),
12
+ 'imageUrl' => $product->getImageUrl(),
13
+ ));
14
+ $settings = Mage::helper('Gigya_Social')->getPluginConfig('gigya_reactions/gigya_reactions_conf', 'php', TRUE);
15
+ $settings['barID'] = $product->getSku();
16
+ ?>
17
+ <script type="text/javascript">//<![CDATA[
18
+ var gigyaSettings = gigyaSettings || {};
19
+ gigyaSettings.reactions = <?php echo Mage::helper('core')->jsonEncode($settings) ?>;
20
+ gigyaSettings.reactions.ua = <?php echo $ua ?>
21
+ //]]>
22
+ </script>
23
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_reactions/gigya_reactions_conf') ?>" class="gigya-reactions"></div>
24
+ <?php endif ?>
25
+
app/design/frontend/base/default/template/gigya/share/sharebar.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //TODO: add comments
3
+ ?>
4
+ <?php if (Mage::helper('Gigya_Social')->isShareBarEnabled('cart')) : ?>
5
+ <?php
6
+ $product = $this->getProduct();
7
+ $desc = ($product->getShortDescription() !== NULL) ? $product->getShortDescription() : $product->getDescription();
8
+ $ua = Mage::helper('core')->jsonEncode(array(
9
+ 'title' => $product->getName(),
10
+ 'description' => $this->stripTags($desc),
11
+ 'linkBack' => $product->getProductUrl(),
12
+ 'imageUrl' => $product->getImageUrl()
13
+ ));
14
+ ?>
15
+ <script type="text/javascript">//<![CDATA[
16
+ var gigyaSettings = gigyaSettings || {};
17
+ gigyaSettings.sharebar = <?php echo Mage::helper('Gigya_Social')->getPluginConfig('gigya_share/gigya_sharebar') ?>;
18
+ gigyaSettings.sharebar.ua = <?php echo $ua ?>
19
+ //]]>
20
+ </script>
21
+ <div id="<?php echo Mage::helper('Gigya_Social')->getPluginContainerId('gigya_share/gigya_sharebar') ?>" class="gigya-sharebar" style="margin-bottom: 10px;"></div>
22
+ <?php endif ?>
23
+
app/etc/modules/Gigya_Social.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <Gigya_Social>
4
+ <active>true</active>
5
+ <codePool>community</codePool>
6
+ </Gigya_Social>
7
+ </modules>
8
+ </config>
js/gigya/gigya.js ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ *gigya functions
3
+ */
4
+ var gigyaFunctions = gigyaFunctions || {};
5
+ var gigyaCache = {};
6
+ gigyaFunctions.login = function (response) {
7
+ gigyaCache.uInfo = response;
8
+ new Ajax.Request('/gigyalogin/login/login', {
9
+ parameters: {json:JSON.stringify(response)},
10
+ onSuccess: function (trans) {
11
+ if (typeof trans.responseJSON.result !== 'undefined') {
12
+ switch (trans.responseJSON.result)
13
+ {
14
+ case 'newUser':
15
+ case 'login':
16
+ window.location.reload();
17
+ break;
18
+ case 'noEmail':
19
+ gigyaFunctions.hideLogin(trans.responseJSON.id);
20
+ gigyaFunctions.updateHeadline(trans.responseJSON.id, trans.responseJSON.headline)
21
+ $(trans.responseJSON.id).style.height = '';
22
+ $(trans.responseJSON.id).update(trans.responseJSON.html);
23
+ break;
24
+ case 'emailExsists':
25
+ gigyaFunctions.updateHeadline(trans.responseJSON.id, trans.responseJSON.headline)
26
+ gigyaFunctions.hideLogin(trans.responseJSON.id);
27
+ $(trans.responseJSON.id).update(trans.responseJSON.html);
28
+ $(trans.responseJSON.id).style.height = '';
29
+ Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
30
+ break;
31
+ }
32
+ }
33
+ }
34
+ });
35
+ };
36
+
37
+ gigyaFunctions.hideLogin = function (id) {
38
+ var form = $(id).adjacent('li');
39
+ if (form !== 'undefined') {
40
+ form.each(function (e) {
41
+ if ((e.firstDescendant().readAttribute('for') == 'email') || (e.firstDescendant().readAttribute('for') == 'pass')){
42
+ e.hide();
43
+ }
44
+ });
45
+ }
46
+ };
47
+
48
+ gigyaFunctions.updateHeadline = function (id, text) {
49
+ var headline = $(id).previous(0);
50
+ if (typeof headline !== 'undefined') {
51
+ headline.remove();
52
+ }
53
+
54
+ };
55
+
56
+
57
+ gigyaFunctions.linkAccounts = function () {
58
+ var email = $$('#gigya-mini-login')[0].value,
59
+ password = $$('#gigya-mini-password')[0].value;
60
+ if (email.empty()){
61
+ alert('Please enter a email');
62
+ }
63
+ else if (password.empty()){
64
+ alert('Please enter your password');
65
+ }
66
+ else {
67
+ var toPost = {username:email, password:password};
68
+ new Ajax.Request('/gigyalogin/login/loginPost', {
69
+ parameters: {login:JSON.stringify(toPost)},
70
+ onSuccess: function (trans) {
71
+ if (trans.responseJSON.result === 'success') {
72
+ document.location.reload(true);
73
+ }
74
+ if (trans.responseJSON.result === 'error') {
75
+ alert(trans.responseJSON.message);
76
+ }
77
+ }
78
+ });
79
+ }
80
+ };
81
+
82
+ gigyaFunctions.emailSubmit = function () {
83
+ var email = $$('#gigyaEmail')[0].value;
84
+ var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
85
+ if (email.match(emailRegEx)) {
86
+ var toPost = gigyaCache.uInfo;
87
+ toPost.user.email = email;
88
+
89
+ new Ajax.Request('/gigyalogin/login/login', {
90
+ parameters: {json:JSON.stringify(toPost)},
91
+ onSuccess: function (trans) {
92
+ if (typeof trans.responseJSON.redirect !== 'undefined') {
93
+ document.location.reload(true);
94
+ }
95
+ if (trans.responseJSON.result === 'emailExsists') {
96
+ gigyaFunctions.hideLogin(trans.responseJSON.id);
97
+ gigyaFunctions.updateHeadline(trans.responseJSON.id, trans.responseJSON.headline)
98
+ $(trans.responseJSON.id).update(trans.responseJSON.html);
99
+ Form.Element.setValue('gigya-mini-login', gigyaCache.uInfo.user.email);
100
+ }
101
+ }
102
+ }
103
+ );
104
+ }
105
+ else {
106
+ alert ('please enter a valid email');
107
+ }
108
+ };
109
+
110
+ gigyaFunctions.createUserAction = function (settings) {
111
+ var mediaObj = {type: 'image', href: settings.ua.linkBack};
112
+ switch (settings.imageBehavior)
113
+ {
114
+ case 'default':
115
+ if ($$('meta[property=og:image]').size() > 0) {
116
+ mediaObj.src = $$('meta[property=og:image]').readAttribute('content');
117
+ }
118
+ else {
119
+ mediaObj.src = settings.ua.imageUrl;
120
+ }
121
+ break;
122
+ case 'product':
123
+ mediaObj.src = settings.ua.imageUrl;
124
+ break;
125
+ case 'url':
126
+ if (typeof settings.imageUrl !== 'undefined') {
127
+ mediaObj.src = settings.imageUrl;
128
+ }
129
+ break;
130
+ }
131
+ var ua = new gigya.socialize.UserAction();
132
+ ua.setLinkBack(settings.ua.linkBack);
133
+ ua.setTitle(settings.ua.title);
134
+ ua.addActionLink(settings.ua.title, settings.ua.linkBack);
135
+ ua.setDescription(settings.ua.description);
136
+ ua.addMediaItem(mediaObj);
137
+ if (typeof settings.ua.action !== 'undefined') {
138
+ ua.setActionName(settings.ua.action);
139
+ }
140
+ return ua;
141
+ };
142
+
143
+ gigyaFunctions.shareBar = function (settings) {
144
+ settings.userAction = gigyaFunctions.createUserAction(settings);
145
+ delete settings.ua;
146
+ delete settings.imageBehavior;
147
+ if (typeof settings.imageUrl !== 'undefined') {
148
+ delete settings.imageUrl;
149
+ }
150
+ gigya.socialize.showShareBarUI(settings);
151
+ };
152
+
153
+ gigyaFunctions.shareAction = function (settings) {
154
+ settings.imageBehavior = 'product';
155
+ settings.userAction = gigyaFunctions.createUserAction(settings);
156
+ delete settings.ua;
157
+ delete settings.enable;
158
+ gigya.socialize.showShareUI(settings);
159
+ };
160
+
161
+
162
+ gigyaFunctions.reactions = function (settings) {
163
+ settings.userAction = gigyaFunctions.createUserAction(settings);
164
+ delete settings.ua;
165
+ delete settings.imageBehavior;
166
+ if (typeof settings.imageUrl !== 'undefined') {
167
+ delete settings.imageUrl;
168
+ }
169
+ eval('var reactions = [' + settings.reactions + ']');
170
+ settings.reactions = reactions;
171
+ gigya.socialize.showReactionsBarUI(settings);
172
+ };
173
+
174
+ gigyaFunctions.gm = function (settings) {
175
+ if (typeof settings.notifications !== 'undefined') {
176
+ gigya.gm.showNotifications();
177
+ }
178
+ if (typeof settings.plugins !== 'undefined') {
179
+ $H(settings.plugins).each ( function (gmPlugin) {
180
+ var parms = {containerID: gmPlugin.value};
181
+ switch (gmPlugin.key)
182
+ {
183
+ case 'Achievements':
184
+ gigya.gm.showAchievementsUI(parms);
185
+ break;
186
+ case 'ChallengeStatus':
187
+ gigya.gm.showChallengeStatusUI(parms);
188
+ break;
189
+ case 'UserStatus':
190
+ gigya.gm.showUserStatusUI(parms);
191
+ break;
192
+ case 'Leaderboard':
193
+ gigya.gm.showLeaderboardUI(parms);
194
+ break;
195
+ }
196
+ })
197
+
198
+ }
199
+ };
200
+
201
+ gigyaFunctions.ratings = function (settings) {
202
+ settings.each( function (ins) {
203
+ ins.onAddReviewClicked = gigyaFunctions.goToReviews;
204
+ ins.onReadReviewsClicked = gigyaFunctions.goToReviews;
205
+ gigya.socialize.showRatingUI(ins);
206
+ });
207
+ };
208
+
209
+ gigyaFunctions.goToReviews = function (eventObj) {
210
+ if (typeof eventObj.context.reviewUrl !== 'undefined') {
211
+ document.location = eventObj.context.reviewUrl;
212
+ }
213
+ };
214
+
215
+ gigyaFunctions.postReview = function (eventObj) {
216
+ var ratings = [],
217
+ r = eventObj.ratings._overall;
218
+ var i = 1;
219
+ for (i; i <= 3; i++) {
220
+ ratings[i] = r;
221
+ r = r + 5;
222
+ };
223
+ var toPost = {
224
+ nickname:eventObj.user.firstName,
225
+ title:eventObj.commentTitle,
226
+ detail:eventObj.commentText,
227
+ ratings:ratings
228
+ };
229
+ var reviewsUrl = '/gigyareviews/reviews/post',
230
+ id = '',
231
+ category = '';
232
+ if (id = gigyaFunctions.getUrlParam('id')) {
233
+ reviewsUrl += '/id/' + id;
234
+ }
235
+ if (category = gigyaFunctions.getUrlParam('category')) {
236
+ reviewsUrl += '/category/' + category;
237
+ }
238
+ new Ajax.Request(reviewsUrl, {
239
+ parameters: {json:JSON.stringify(toPost)},
240
+ onSuccess: function (trans) {
241
+ //TODO: add success/error handeling
242
+ }
243
+ }
244
+ );
245
+
246
+
247
+ };
248
+ gigyaFunctions.RnR = function (settings) {
249
+ if ($$('form table.ratings-table').length > 0) {
250
+ var table = $('product_addtocart_form').select('table.ratings-table');
251
+ table.each( function (itm) {
252
+ itm.update().writeAttribute('id', settings.containerID);
253
+ if (typeof itm.next('a') !== 'undefined') {
254
+ itm.next('a').update();
255
+ }
256
+ });
257
+ }
258
+ else {
259
+ $$('p.no-rating')[0].update().writeAttribute('id', settings.containerID);
260
+ }
261
+ settings.linkedCommentsUI = 'customer-reviews';
262
+ settings.imageBehavior = 'product';
263
+ ua = gigyaFunctions.createUserAction(settings);
264
+ delete settings.ua;
265
+ var reviews = {
266
+ containerID: 'customer-reviews',
267
+ categoryID: settings.categoryID,
268
+ streamID: settings.streamID,
269
+ scope: settings.scope,
270
+ privacy: settings.privacy,
271
+ onCommentSubmitted: gigyaFunctions.postReview,
272
+ userAction: ua
273
+ };
274
+ gigya.socialize.showRatingUI(settings);
275
+ gigya.socialize.showCommentsUI(reviews);
276
+ };
277
+
278
+ gigyaFunctions.getUrlParam = function (param) {
279
+ var urlArray = document.location.href.split('/'),
280
+ idx = urlArray.indexOf(param);
281
+ if (idx !== -1) {
282
+ return urlArray[idx + 1];
283
+ }
284
+ return false;
285
+ }
286
+
287
+ /*
288
+ * register events
289
+ */
290
+ function gigyaRegister() {
291
+ if (typeof gigya !== 'undefined') {
292
+ gigya.socialize.addEventHandlers({
293
+ onLogin: gigyaFunctions.login
294
+ });
295
+ }
296
+ }
297
+
298
+ gigyaRegister();
299
+
300
+ document.observe("dom:loaded", function() {
301
+ if (typeof gigyaSettings !== 'undefined'){
302
+ $H(gigyaSettings).each( function (plugin) {
303
+ delete plugin.value.enable;
304
+ //var a = JSON.parse(plugin.value);
305
+ switch (plugin.key)
306
+ {
307
+ case 'login':
308
+ delete plugin.value.loginBehavior;
309
+ gigya.socialize.showLoginUI(plugin.value);
310
+ break;
311
+ case 'linkAccount':
312
+ gigya.socialize.showAddConnectionsUI(plugin.value);
313
+ break;
314
+ case 'sharebar':
315
+ gigyaFunctions.shareBar(plugin.value);
316
+ break;
317
+ case 'shareAction':
318
+ gigyaFunctions.shareAction(plugin.value);
319
+ break;
320
+ case 'reactions':
321
+ gigyaFunctions.reactions(plugin.value);
322
+ break;
323
+ case 'comments':
324
+ gigya.socialize.showCommentsUI(plugin.value);
325
+ break;
326
+ case 'activityFeed':
327
+ delete plugin.value.privacy;
328
+ gigya.socialize.showFeedUI(plugin.value);
329
+ break;
330
+ case 'gm':
331
+ gigyaFunctions.gm(plugin.value);
332
+ break;
333
+ case 'ratings':
334
+ gigyaFunctions.ratings(plugin.value);
335
+ break;
336
+ case 'RnR':
337
+ gigyaFunctions.RnR(plugin.value);
338
+ break;
339
+ case 'logout':
340
+ gigya.socialize.logout();
341
+ break;
342
+ }
343
+ });
344
+ }
345
+ });
package.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Gigya_Socialize</name>
4
+ <version>2.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.gigya.com/member-agreement/">Gigya License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Create a completely social shopping experience with Gigya&#x2019;s Magento Integration Cartridge</summary>
10
+ <description>Create an immersive and completely social shopping experience with Gigya&#x2019;s Magento Integration Cartridge. Gigya&#x2019;s social technology combines the core elements that power ecommerce - product awareness and discovery coupled with customer acquisition and loyalty - into a comprehensive set of features and services that are designed to keep customers engaged as well as increase shopping cart conversions while on Magento websites.&#xD;
11
+ Gigya works with more than 600 enterprises, including 44% of the Comscore top 100 U.S. web properties, and reaches more than 1.5 billion users per month. Our platform extracts the real value from social networks, empowering online businesses to attract, engage, and understand users like never before.&#xD;
12
+ </description>
13
+ <notes>This version includes the following Gigya plugins:&#xD;
14
+ Social Login&#xD;
15
+ Gigya Share + Share Bar&#xD;
16
+ Gigya Reactions&#xD;
17
+ Game Mechanics&#xD;
18
+ Activity Feed&#xD;
19
+ Rating &amp; Reviews&#xD;
20
+ Comments&#xD;
21
+ </notes>
22
+ <authors><author><name>Yaniv Aran-Shamir</name><user>Gigya</user><email>info@gigya-inc.com</email></author></authors>
23
+ <date>2013-05-06</date>
24
+ <time>06:38:16</time>
25
+ <contents><target name="magecommunity"><dir name="Gigya"><dir><dir name="Social"><dir name="Block"><file name="Emailform.php" hash="adff430d92d0262a93bdfd06e43eba77"/><dir name="Gamification"><file name="Notifications.php" hash="e6a1ef320771d4a975e66be95607f1e7"/><file name="Plugins.php" hash="ac54c592405dd3b53f884824c1ef9f2a"/><file name="php_errors.log" hash="a8fa98083623de1de642364a1a2daebe"/></dir><dir name="Html"><file name="Head.php" hash="6a74ed57ebbb5988653bc8b32ca63b52"/></dir><file name="Login.php" hash="ffc188c10ca7d867bd15f20c59d71995"/><file name="Logout.php" hash="b5c868bbf1f932f5107e85e64a4d7636"/><file name="Ordersharebar.php" hash="77f3eb55f012ade38c5ac03c6b432ab6"/><file name="Ratings.php" hash="b193ef2a6742020d4eb759c4eb54172c"/><file name="Reviews.php" hash="f3063c8639e22302437aacef860a5519"/><file name="Share.php" hash="f6bd21914d7e0eebba1b9157398c3b43"/><file name="php_errors.log" hash="a451b1d0cad6f0c7262fc962f8d0be87"/></dir><dir name="Helper"><file name="Data.php" hash="68882b829de8e96a9b73d25ccef981e0"/><file name="php_errors.log" hash="582c77e8e76b03ac427cea4858a93de2"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="7218629f83846328de2157db6388bd4b"/><file name="php_errors.log" hash="44309322d8ea556cef91e8844eee0862"/></dir><dir name="Config"><dir name="Source"><file name="AllwaysShare.php" hash="a49379230b6b4478725c06d2d0421a5c"/><file name="Buttons.php" hash="1fcdc7bd6c48d5cf51839f90e7c1b350"/><file name="CountType.php" hash="6f32a7ddbdeef69c26f25a8fbe8dffd8"/><file name="Counts.php" hash="fbf37735c569c7615abc8e8db073bfea"/><file name="Imageb.php" hash="e148c69185fbb8869c1acabcd8e9379e"/><file name="Languages.php" hash="4b258de03b6a56bb6f352d6d60a728a8"/><file name="Layout.php" hash="4b342404359e3e2a02d11f0d0dabb13c"/><file name="Leaderboard.php" hash="b2f631e4d79fe70fe9f2d0c5f02247fe"/><file name="Loginb.php" hash="9edf0f63a54fd1c5828efcd4ca0550cf"/><file name="Privacy.php" hash="74252005f3bd4d8189b4d6b029a2f21e"/><file name="Scope.php" hash="b0e7836ce30e46147c62de136f79660f"/></dir></dir><dir name="Customer"><file name="Observer.php" hash="00028f927caa46960d52a8bd1b2500f1"/></dir></dir><dir name="controllers"><file name="AdminController.php" hash="740511268dd5a6bb032ef68450b5b8dd"/><file name="LoginController.php" hash="f6d940fc5994fe8323a47b33de030e4b"/><file name="ReviewsController.php" hash="467b93e6b5f418b24d20d81f026b33d9"/><file name="php_errors.log" hash="f4eb53900788dd43382bf542579d3b09"/></dir><dir name="etc"><file name="config.xml" hash="815f9c51feef8d5f2e4839252f9dfcf1"/><file name="system.xml" hash="414a6641c30bf759a642597553c6fa0e"/></dir><file name="php_errors.log" hash="5d491f35f69ea7ed2ae5c3fd15bfbeaf"/><dir name="sdk"><file name="GSSDK.php" hash="90e0c9c854d13195d9bc202faeb628ba"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="gigya.xml" hash="09011767408025e7415377134becc7e6"/></dir><dir name="template"><dir name="gigya"><file name="activityfeed.phtml" hash="da223a978be158c432c00534d9a2124d"/><file name="comments.phtml" hash="6f58951124d375cd2fddf5517c2501f5"/><dir><dir name="form"><file name="emailForm.phtml" hash="c96d44c1435d40a5fe199facd1e06452"/><file name="login.phtml" hash="4caa3aa9df51a326707b801a5f75107e"/><file name="mini.login.phtml" hash="a4612e9f7105e835fe3932a196da69ea"/></dir><dir name="login"><file name="link_accounts.phtml" hash="63bf154045a80c3f5c581047ee406d46"/><file name="social_login.phtml" hash="da1353338c4b2934702f4d7b7bf34068"/><file name="social_login_login_page.phtml" hash="cf9ccff24cb66aa70b6ebfeb8e43882a"/></dir><dir name="ratings"><file name="summary.phtml" hash="f8434e8acb4b45e8ab8f8d926c64cb9b"/><file name="summary_short.phtml" hash="d9dec30e88871dbf24027670f7c05b0e"/></dir><dir name="share"><file name="ordersharebar.phtml" hash="a98bc14f1cc62f0b7029e72c1c2b3668"/><file name="reactions.phtml" hash="e49a5b139f3e8d4232251ddadb24a20a"/><file name="sharebar.phtml" hash="3b9603cb5af4475bf27bd4439830905f"/></dir></dir><file name="gamification.phtml" hash="67159b9bb0cae9e3734580aee8859b52"/><file name="php_errors.log" hash="6d04310c2c9d2cf49f4a63f0d0b3fc3b"/><file name="ratings.phtml" hash="b07b97f389349529c885f484f5a24c81"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gigya_Social.xml" hash="e5f95ec2941faac5d4ed834f8c1c8b15"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="gigya.css" hash="0cd83b39b375a889a951a4c52526dca6"/></dir><dir name="images"><dir name="gigya"><file name="RateIcon_13.png" hash="fac2db4eab60d7639704868f5a62fdda"/><file name="RateIcon_13_pressed.png" hash="3115cb2ab0b1b3ae0929b4756f67dc38"/><file name="RateIcon_21.png" hash="4b7bfd13d66e8565f04aa045aa766b7a"/><file name="RateIcon_21_pressed.png" hash="6d779713ad683a9b24a4353875cfcaca"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="gigya"><file name="gigya.js" hash="927d7c3266f520c7e4abcec441e00bda"/></dir></dir></target></contents>
26
+ <compatible/>
27
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
28
+ </package>
skin/frontend/base/default/css/gigya.css ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ratings-short span.gig-rating-stars {
2
+ margin-right: 42px;
3
+ display: inline-block;
4
+ }
5
+ .ratings-short div.gig-rating-star {
6
+ width: 13px;
7
+ }
8
+
9
+ .gig-rating a:link.gig-rating-readReviewsLink,
10
+ .ratings-full a:link.gig-rating-readReviewsLink {
11
+ margin-right: 0;
12
+ }
13
+
14
+ .gig-comments-container div.gig-comments-comment {
15
+ background-color: transparent;
16
+ }
17
+ div.ratings-short .gig-rating div.gig-rating-star-full {
18
+ background-image: url('../images/gigya/RateIcon_13_pressed.png');
19
+ }
20
+ div.ratings-short .gig-rating div.gig-rating-star-empty {
21
+ background-image: url('../images/gigya/RateIcon_13.png');
22
+ }
23
+
24
+ .gigya-login {
25
+ height: 240px;
26
+ }
27
+ .gigya-login .content {
28
+ min-height: 50px;
29
+ }
30
+ .gigya-gm {
31
+ float: right;
32
+ margin-top: 15px;
33
+ }
skin/frontend/base/default/images/gigya/RateIcon_13.png ADDED
Binary file
skin/frontend/base/default/images/gigya/RateIcon_13_pressed.png ADDED
Binary file
skin/frontend/base/default/images/gigya/RateIcon_21.png ADDED
Binary file
skin/frontend/base/default/images/gigya/RateIcon_21_pressed.png ADDED
Binary file