BeeShopy_BeeSocial - Version 0.7.5

Version Notes

Adding new resize system

Download this release

Release Info

Developer Magento Core Team
Extension BeeShopy_BeeSocial
Version 0.7.5
Comparing to
See all releases


Code changes from version 0.6 to 0.7.5

app/code/community/BeeShopy/BeeSocial/Block/Iframe.php CHANGED
@@ -9,19 +9,16 @@ class BeeShopy_BeeSocial_Block_Iframe
9
  $product = Mage::registry('current_product');
10
  $domain = urlencode(Mage::getBaseURL());
11
  $url = urlencode(Mage::helper('core/url')->getCurrentUrl());
12
- $html = "";
13
  if($product){
14
- $html .= "<script type='text/javascript'>
15
- // Resize iframe to full height
16
- function resizeIframe(height)
17
- {
18
- // '+60' is a general rule of thumb to allow for differences in
19
- // IE & and FF height reporting, can be adjusted as required..
20
- document.getElementById('beesocial').height = parseInt(height)+10;
21
- }
22
- </script>";
23
- $html.= '<div class="product-view" style ="margin-top:10px"><div class="product-collateral" style="background-color:#e9effe"><h2>Spread the word!</h2><iframe src="http://beeshopy.com/out?domain='.$domain.'&product_id='.$product->getId().'&url='.$url.'&width=600" width="100%" height="230px" scrolling="auto" frameborder="0" id="beesocial"></iframe></div></div>';
24
  }
25
- return $html;
26
  }
27
  }
9
  $product = Mage::registry('current_product');
10
  $domain = urlencode(Mage::getBaseURL());
11
  $url = urlencode(Mage::helper('core/url')->getCurrentUrl());
 
12
  if($product){
13
+
14
+ $html = "
15
+ <div id='beesocial' class='product-view' style='text-align:center;padding-top:10px;'data-domain='".$domain."' data-product-id='".$product->getId()."' data-url='".$url."'></div>
16
+ <script type='text/javascript' src='//www.beetailer.com/javascripts/beetailer.js'></script>
17
+
18
+ <style>#beesocial iframe{width:560px;}</style>
19
+
20
+ ";
21
+ return $html;
 
22
  }
 
23
  }
24
  }
app/code/community/BeeShopy/BeeSocial/controllers/IndexController.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- class Beeshopy_Beesocial_IndexController extends Mage_Core_Controller_Front_Action{
3
- public function indexAction(){
4
- $html = "
5
- <html>
6
- <!--
7
- This page is on the same domain as the parent, so can
8
- communicate with it to order the iframe window resizing
9
- to fit the content
10
- -->
11
- <body onload='parentIframeResize()'>
12
- <script>
13
- // Tell the parent iframe what height the iframe needs to be
14
- function parentIframeResize()
15
- {
16
- var height = getParam('height');
17
- // This works as our parent's parent is on our domain..
18
- parent.parent.resizeIframe(height);
19
- }
20
-
21
- // Helper function, parse param from request string
22
- function getParam( name )
23
- {
24
- name = name.replace(/[\[]/,'\\\[').replace(/[\]]/,'\\\]');
25
- var regexS = '[\\?&]'+name+'=([^&#]*)';
26
- var regex = new RegExp( regexS );
27
- var results = regex.exec( window.location.href );
28
- if( results == null )
29
- return '';
30
- else
31
- return results[1];
32
- }
33
- </script>
34
- </body>
35
- </html>";
36
- echo $html;
37
- }
38
- }
39
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/BeeShopy/BeeSocial/etc/config.xml CHANGED
@@ -18,15 +18,4 @@
18
  </blocks>
19
  </global>
20
 
21
- <frontend>
22
- <routers>
23
- <beesocial-resize-iframe>
24
- <use>standard</use>
25
- <args>
26
- <module>BeeShopy_BeeSocial</module>
27
- <frontName>beesocial-resize-iframe</frontName>
28
- </args>
29
- </beesocial-resize-iframe>
30
- </routers>
31
- </frontend>
32
  </config>
18
  </blocks>
19
  </global>
20
 
 
 
 
 
 
 
 
 
 
 
 
21
  </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BeeShopy_BeeSocial</name>
4
- <version>0.6</version>
5
  <stability>stable</stability>
6
- <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FB:Comments, FB:Like and Twitter Badget for your products.</summary>
10
  <description>BeeSocial allows to your users comment and share your products in Facebook and Twitter.</description>
11
- <notes>Fixing height issues FFox</notes>
12
- <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>miguelangel@beeshopy.com</email></author><author><name>Juan Gallego</name><user>auto-converted</user><email>juan@beeshopy.com</email></author></authors>
13
- <date>2011-01-11</date>
14
- <time>22:19:58</time>
15
- <contents><target name="magecommunity"><dir name="BeeShopy"><dir name="BeeSocial"><dir name="Block"><file name="Iframe.php" hash="e07f96e0af061e2951435b7185b19ee4"/></dir><dir name="controllers"><file name="IndexController.php" hash="0461c0331f2a1ca748df4fb54cad8ce4"/></dir><dir name="etc"><file name="config.xml" hash="0ae95b3831c399cb4e9ec321ee3a1c83"/><file name="widget.xml" hash="983dfa5d28418547ca7b636f246f5e98"/></dir><dir name="helper"><file name="Data.php" hash="7a9befef350fe2d362599b32620eb534"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeeShopy_BeeSocial.xml" hash="f24331c9435e13df6243bdf75e28b5b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BeeShopy_BeeSocial</name>
4
+ <version>0.7.5</version>
5
  <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FB:Comments, FB:Like and Twitter Badget for your products.</summary>
10
  <description>BeeSocial allows to your users comment and share your products in Facebook and Twitter.</description>
11
+ <notes>Adding new resize system</notes>
12
+ <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>miguel@beetailer.com</email></author></authors>
13
+ <date>2011-07-19</date>
14
+ <time>17:49:08</time>
15
+ <contents><target name="magecommunity"><dir name="BeeShopy"><dir name="BeeSocial"><dir name="Block"><file name="Iframe.php" hash="acb025033c44f3b44a36343c27006e68"/></dir><dir name="etc"><file name="config.xml" hash="2f94b6b143ba00f802b1187de9165c41"/><file name="widget.xml" hash="983dfa5d28418547ca7b636f246f5e98"/></dir><dir name="helper"><file name="Data.php" hash="7a9befef350fe2d362599b32620eb534"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeeShopy_BeeSocial.xml" hash="f24331c9435e13df6243bdf75e28b5b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>