Version Notes
Upgraded Version for supporting Open Graph tags
- Support Open-Graph tags for full social support in all your product pages
Download this release
Release Info
Developer | Magento Core Team |
Extension | Miragedesign_Pinterest |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- app/code/community/Miragedesign/Pinterest/Block/Base.php +10 -0
- app/code/community/Miragedesign/Pinterest/etc/config.xml +1 -1
- app/code/community/Miragedesign/Pinterest/etc/system.xml +22 -13
- app/design/frontend/base/default/layout/miragedesign/pinterest.xml +10 -1
- app/design/frontend/base/default/template/miragedesign/head.phtml +13 -0
- app/design/frontend/base/default/template/miragedesign/pinterest_button.phtml +39 -15
- package.xml +9 -11
app/code/community/Miragedesign/Pinterest/Block/Base.php
CHANGED
@@ -56,6 +56,16 @@ class Miragedesign_Pinterest_Block_Base extends Mage_Core_Block_Template
|
|
56 |
return $dataVia;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
protected function getIsVerticalScrollbarEnabled() {
|
60 |
return $this->_isVerticalScrollbarEnabled;
|
61 |
}
|
56 |
return $dataVia;
|
57 |
}
|
58 |
|
59 |
+
protected function getFacebookAppID() {
|
60 |
+
$dataVia = Mage::getStoreConfig('miragedesign_pinterest/other_social_config/facebook_app_api');
|
61 |
+
return $dataVia;
|
62 |
+
}
|
63 |
+
|
64 |
+
protected function getFacebookAdminID() {
|
65 |
+
$dataVia = Mage::getStoreConfig('miragedesign_pinterest/other_social_config/facebook_admin_id');
|
66 |
+
return $dataVia;
|
67 |
+
}
|
68 |
+
|
69 |
protected function getIsVerticalScrollbarEnabled() {
|
70 |
return $this->_isVerticalScrollbarEnabled;
|
71 |
}
|
app/code/community/Miragedesign/Pinterest/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Miragedesign_Pinterest>
|
5 |
-
<version>1.1.
|
6 |
</Miragedesign_Pinterest>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Miragedesign_Pinterest>
|
5 |
+
<version>1.1.2</version>
|
6 |
</Miragedesign_Pinterest>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/community/Miragedesign/Pinterest/etc/system.xml
CHANGED
@@ -88,7 +88,25 @@
|
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
91 |
-
</facebook_enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
<twitter_enabled translate="label" module="pinterest">
|
93 |
<label>Enable Twitter</label>
|
94 |
<frontend_type>select</frontend_type>
|
@@ -111,7 +129,7 @@
|
|
111 |
<label>Enable Google+</label>
|
112 |
<frontend_type>select</frontend_type>
|
113 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
114 |
-
<sort_order>
|
115 |
<show_in_default>1</show_in_default>
|
116 |
<show_in_website>1</show_in_website>
|
117 |
<show_in_store>1</show_in_store>
|
@@ -120,25 +138,16 @@
|
|
120 |
<label>Enable LinkedIn</label>
|
121 |
<frontend_type>select</frontend_type>
|
122 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
123 |
-
<sort_order>
|
124 |
<show_in_default>1</show_in_default>
|
125 |
<show_in_website>1</show_in_website>
|
126 |
<show_in_store>1</show_in_store>
|
127 |
</linkedin_enabled>
|
128 |
-
<linkedin_enabled translate="label" module="pinterest">
|
129 |
-
<label>Enable LinkedIn</label>
|
130 |
-
<frontend_type>select</frontend_type>
|
131 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
132 |
-
<sort_order>2</sort_order>
|
133 |
-
<show_in_default>1</show_in_default>
|
134 |
-
<show_in_website>1</show_in_website>
|
135 |
-
<show_in_store>1</show_in_store>
|
136 |
-
</linkedin_enabled>
|
137 |
<digg_enabled translate="label" module="pinterest">
|
138 |
<label>Enable Digg</label>
|
139 |
<frontend_type>select</frontend_type>
|
140 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
141 |
-
<sort_order>
|
142 |
<show_in_default>1</show_in_default>
|
143 |
<show_in_website>1</show_in_website>
|
144 |
<show_in_store>1</show_in_store>
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
91 |
+
</facebook_enabled>
|
92 |
+
<facebook_app_api translate="label" module="pinterest">
|
93 |
+
<label>Facebook App API</label>
|
94 |
+
<frontend_type>text</frontend_type>
|
95 |
+
<sort_order>2</sort_order>
|
96 |
+
<show_in_default>1</show_in_default>
|
97 |
+
<show_in_website>1</show_in_website>
|
98 |
+
<show_in_store>1</show_in_store>
|
99 |
+
<comment><![CDATA[ Get a <a target="_blank" href="http://www.facebook.com/developers/createapp.php">Facebook API Key</a>]]></comment>
|
100 |
+
</facebook_app_api>
|
101 |
+
<facebook_admin_id translate="label" module="pinterest">
|
102 |
+
<label>Facebook Admin ID</label>
|
103 |
+
<frontend_type>text</frontend_type>
|
104 |
+
<sort_order>3</sort_order>
|
105 |
+
<show_in_default>1</show_in_default>
|
106 |
+
<show_in_website>1</show_in_website>
|
107 |
+
<show_in_store>1</show_in_store>
|
108 |
+
<comment><![CDATA[ Get your <a target="_blank" href="http://www.facebook.com/insights/">Facebook Admin ID</a> (<a href="http://www.facebook.com/help/search/?q=insights" target="_blank">More Info</a>)]]></comment>
|
109 |
+
</facebook_admin_id>
|
110 |
<twitter_enabled translate="label" module="pinterest">
|
111 |
<label>Enable Twitter</label>
|
112 |
<frontend_type>select</frontend_type>
|
129 |
<label>Enable Google+</label>
|
130 |
<frontend_type>select</frontend_type>
|
131 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
132 |
+
<sort_order>6</sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
<show_in_store>1</show_in_store>
|
138 |
<label>Enable LinkedIn</label>
|
139 |
<frontend_type>select</frontend_type>
|
140 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
141 |
+
<sort_order>7</sort_order>
|
142 |
<show_in_default>1</show_in_default>
|
143 |
<show_in_website>1</show_in_website>
|
144 |
<show_in_store>1</show_in_store>
|
145 |
</linkedin_enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<digg_enabled translate="label" module="pinterest">
|
147 |
<label>Enable Digg</label>
|
148 |
<frontend_type>select</frontend_type>
|
149 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
150 |
+
<sort_order>8</sort_order>
|
151 |
<show_in_default>1</show_in_default>
|
152 |
<show_in_website>1</show_in_website>
|
153 |
<show_in_store>1</show_in_store>
|
app/design/frontend/base/default/layout/miragedesign/pinterest.xml
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="1.0.0">
|
3 |
<catalog_product_view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<reference name="product.info.extrahint">
|
5 |
<block type="pinterest/button" name="pinterest_button" template="miragedesign/pinterest_button.phtml" />
|
6 |
</reference>
|
@@ -10,7 +17,9 @@
|
|
10 |
</catalog_product_view>
|
11 |
<default>
|
12 |
<reference name="head">
|
13 |
-
<action method="addItem"
|
|
|
|
|
14 |
</reference>
|
15 |
<reference name="left">
|
16 |
<block type="pinterest/feed" name="pinterest_feed" template="miragedesign/pinterest_left_feed.phtml" before="left.permanent.callout" />
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="1.0.0">
|
3 |
<catalog_product_view>
|
4 |
+
<reference name="head">
|
5 |
+
<block type="pinterest/base" name="md_pinterest_meta">
|
6 |
+
<action method="setTemplate" ifconfig="miragedesign_pinterest/configuration/pinterest_enabled">
|
7 |
+
<template>miragedesign/head.phtml</template>
|
8 |
+
</action>
|
9 |
+
</block>
|
10 |
+
</reference>
|
11 |
<reference name="product.info.extrahint">
|
12 |
<block type="pinterest/button" name="pinterest_button" template="miragedesign/pinterest_button.phtml" />
|
13 |
</reference>
|
17 |
</catalog_product_view>
|
18 |
<default>
|
19 |
<reference name="head">
|
20 |
+
<action method="addItem" ifconfig="miragedesign_pinterest/configuration/pinterest_enabled">
|
21 |
+
<type>skin_css</type><name>css/miragedesign/pinterest.css</name><params/>
|
22 |
+
</action>
|
23 |
</reference>
|
24 |
<reference name="left">
|
25 |
<block type="pinterest/feed" name="pinterest_feed" template="miragedesign/pinterest_left_feed.phtml" before="left.permanent.callout" />
|
app/design/frontend/base/default/template/miragedesign/head.phtml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ($this->getFacebookAppID()) : ?>
|
2 |
+
<meta property="fb:app_id" content="<?php echo $this->getFacebookAppID(); ?>"/>
|
3 |
+
<?php endif; ?>
|
4 |
+
<?php if ($this->getFacebookAdminID()) : ?>
|
5 |
+
<meta property="fb:admins" content="<?php echo $this->getFacebookAdminID(); ?>" />
|
6 |
+
<?php endif; ?>
|
7 |
+
<meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
|
8 |
+
<meta property="og:type" content="product"/>
|
9 |
+
<?php $product = Mage::registry('current_product');
|
10 |
+
if ($product): ?>
|
11 |
+
<meta property="og:title" content="<?php echo $this->htmlEscape($product->getName()); ?>"/>
|
12 |
+
<meta property="og:image" content="<?php echo Mage::helper('catalog/image')->init($product, 'image');?>"/>
|
13 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/miragedesign/pinterest_button.phtml
CHANGED
@@ -41,13 +41,25 @@
|
|
41 |
<?php endif; ?>
|
42 |
|
43 |
<?php if ($this->checkFacebookIsEnabled()) :?>
|
44 |
-
<
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
<div class="fb-like" data-href="<?php echo $productUrl; ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
|
53 |
<?php endif; ?>
|
@@ -73,13 +85,25 @@ s1.parentNode.insertBefore(s, s1);
|
|
73 |
<?php elseif ($pinterestCount == 'vertical') :?>
|
74 |
|
75 |
<?php if ($this->checkFacebookIsEnabled()) :?>
|
76 |
-
<
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
<div class="fb-like" data-href="<?php echo $productUrl ?>" data-send="false" data-layout="box_count" data-width="50" data-show-faces="false"></div>
|
85 |
<?php endif; ?>
|
@@ -121,4 +145,4 @@ s1.parentNode.insertBefore(s, s1);
|
|
121 |
<?php endif; ?>
|
122 |
|
123 |
<?php endif; ?>
|
124 |
-
<?php endif; ?>
|
41 |
<?php endif; ?>
|
42 |
|
43 |
<?php if ($this->checkFacebookIsEnabled()) :?>
|
44 |
+
<div id="fb-root"></div>
|
45 |
+
<script>
|
46 |
+
window.fbAsyncInit = function() {
|
47 |
+
FB.init({
|
48 |
+
appId : <?php echo Mage::getStoreConfig('miragedesign_pinterest/other_social_config/facebook_app_api'); ?>,
|
49 |
+
status : true,
|
50 |
+
cookie : true,
|
51 |
+
xfbml : true
|
52 |
+
});
|
53 |
+
};
|
54 |
+
// Load the SDK Asynchronously
|
55 |
+
(function(d){
|
56 |
+
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
|
57 |
+
if (d.getElementById(id)) {return;}
|
58 |
+
js = d.createElement('script'); js.id = id; js.async = true;
|
59 |
+
js.src = "//connect.facebook.net/en_US/all.js";
|
60 |
+
ref.parentNode.insertBefore(js, ref);
|
61 |
+
}(document));
|
62 |
+
</script>
|
63 |
|
64 |
<div class="fb-like" data-href="<?php echo $productUrl; ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
|
65 |
<?php endif; ?>
|
85 |
<?php elseif ($pinterestCount == 'vertical') :?>
|
86 |
|
87 |
<?php if ($this->checkFacebookIsEnabled()) :?>
|
88 |
+
<div id="fb-root"></div>
|
89 |
+
<script>
|
90 |
+
window.fbAsyncInit = function() {
|
91 |
+
FB.init({
|
92 |
+
appId : <?php echo Mage::getStoreConfig('miragedesign_pinterest/other_social_config/facebook_app_api'); ?>,
|
93 |
+
status : true,
|
94 |
+
cookie : true,
|
95 |
+
xfbml : true
|
96 |
+
});
|
97 |
+
};
|
98 |
+
// Load the SDK Asynchronously
|
99 |
+
(function(d){
|
100 |
+
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
|
101 |
+
if (d.getElementById(id)) {return;}
|
102 |
+
js = d.createElement('script'); js.id = id; js.async = true;
|
103 |
+
js.src = "//connect.facebook.net/en_US/all.js";
|
104 |
+
ref.parentNode.insertBefore(js, ref);
|
105 |
+
}(document));
|
106 |
+
</script>
|
107 |
|
108 |
<div class="fb-like" data-href="<?php echo $productUrl ?>" data-send="false" data-layout="box_count" data-width="50" data-show-faces="false"></div>
|
109 |
<?php endif; ?>
|
145 |
<?php endif; ?>
|
146 |
|
147 |
<?php endif; ?>
|
148 |
+
<?php endif; ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Miragedesign_Pinterest</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
|
7 |
<channel>community</channel>
|
@@ -21,23 +21,21 @@
|
|
21 |
9. Allow you to enable / disable the extension. <br />
|
22 |
10. Allow user to use Pin It with other social network buttons like Facebook, Twitter, Google+, LinkedIn and Digg<br />
|
23 |
11. Support vertical scrollbar layout for sharing buttons <br />
|
24 |
-
<strong>12. Support you to show Pinterest Feeds on your site with several options</strong>
|
|
|
25 |
And much more features are comming!
|
26 |
<br />
|
27 |
-
Version Status: 1.1.
|
28 |
<br /><br />
|
29 |
Developped by <a href="http://miragedesign.net">Mirage Design</a>
|
30 |
<br />
|
31 |
Feel free to ask any question at <a href="http://miragedesign.net/newss/pinterest-magento-linker/">our site</a></description>
|
32 |
-
<notes>Upgraded Version for supporting
|
33 |
-
-
|
34 |
-
- Allow you to show your Pins in your site from your Pinterest Account combine with a Pin board slug.
|
35 |
-
- Or simply allow you to show popular Pins from Pinterest.
|
36 |
-
- Support you to config "Pinterest follow button" for promoting your Pinterest account to everybody visits your Magento site.</notes>
|
37 |
<authors><author><name>Miragedesign</name><user>auto-converted</user><email>contact@miragedesign.net</email></author></authors>
|
38 |
-
<date>2012-03-
|
39 |
-
<time>
|
40 |
-
<contents><target name="magecommunity"><dir name="Miragedesign"><dir name="Pinterest"><dir name="Block"><file name="Base.php" hash="
|
41 |
<compatible/>
|
42 |
<dependencies/>
|
43 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Miragedesign_Pinterest</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
|
7 |
<channel>community</channel>
|
21 |
9. Allow you to enable / disable the extension. <br />
|
22 |
10. Allow user to use Pin It with other social network buttons like Facebook, Twitter, Google+, LinkedIn and Digg<br />
|
23 |
11. Support vertical scrollbar layout for sharing buttons <br />
|
24 |
+
<strong>12. Support you to show Pinterest Feeds on your site with several options</strong> <br />
|
25 |
+
13. Support Open-Graph tags for full social support in all your product pages <br />
|
26 |
And much more features are comming!
|
27 |
<br />
|
28 |
+
Version Status: 1.1.2, Stable
|
29 |
<br /><br />
|
30 |
Developped by <a href="http://miragedesign.net">Mirage Design</a>
|
31 |
<br />
|
32 |
Feel free to ask any question at <a href="http://miragedesign.net/newss/pinterest-magento-linker/">our site</a></description>
|
33 |
+
<notes>Upgraded Version for supporting Open Graph tags 
|
34 |
+
- Support Open-Graph tags for full social support in all your product pages</notes>
|
|
|
|
|
|
|
35 |
<authors><author><name>Miragedesign</name><user>auto-converted</user><email>contact@miragedesign.net</email></author></authors>
|
36 |
+
<date>2012-03-30</date>
|
37 |
+
<time>04:30:03</time>
|
38 |
+
<contents><target name="magecommunity"><dir name="Miragedesign"><dir name="Pinterest"><dir name="Block"><file name="Base.php" hash="23704dbfb6ccfaa4b7999baa6a401bc7"/><file name="Button.php" hash="3dbc03daf9755dd71ccf3fd755b1134e"/><file name="Feed.php" hash="693338cb348e82882e8b259556c11af2"/></dir><dir name="Helper"><file name="Data.php" hash="b1e241f5a9fb4b875a401a999f9932cc"/></dir><dir name="Lib"><file name="PinterestApi.php" hash="bcd81d365750d56cf949ec819e8be0e3"/></dir><dir name="Model"><file name="Feedposition.php" hash="9ac67bac7b68ab739d7f5fb502b7668f"/><file name="Pincount.php" hash="e405b72545cabc196630ce099a82eb10"/><file name="Pindescription.php" hash="58779fe60953310bb82ff836d2ff390e"/><file name="Price.php" hash="c61c75334b6410649a92d33f22c60bd6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6ec7da759768d8ba1bceeffa15a5ff8d"/><file name="config.xml" hash="163d00f0a6f49021d143f34b60ec8550"/><file name="system.xml" hash="9c900295e540b2bfcea033d89c564f62"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="miragedesign"><file name="pinterest.xml" hash="0bb742b37ec30e70be3c335021ee9325"/></dir></dir><dir name="template"><dir name="miragedesign"><file name="head.phtml" hash="4adf6e2670342c5daba68ee8296a4bdf"/><file name="pinterest_button.phtml" hash="ba21428f790c9b2fdc032ab6447f61b5"/><file name="pinterest_left_feed.phtml" hash="2948ec7608024b7e1747934a91cd45ec"/><file name="pinterest_panel.phtml" hash="ecd8c45327c9b4d78cc930026a3c44c3"/><file name="pinterest_right_feed.phtml" hash="426a02e4ed658d18d70cbdd66326b138"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="miragedesign"><file name="pinterest.css" hash="d279479b66cb5858e10a9af1fca84a4a"/></dir></dir><dir name="images"><dir name="miragedesign"><dir name="pinterest"><file name="feed-icon.png" hash="997d37ed0159ac43b2862af0d66c6770"/><file name="follow-on-pinterest-button.png" hash="6b3da71de3bb885a3b17f22af8fdecbb"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Miragedesign_Pinterest.csv" hash="f80229646ce5a4bf8951f4d9243cad2e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Miragedesign_Pinterest.xml" hash="3448b63aef6988ef012fecfec37c6c53"/></dir></target></contents>
|
39 |
<compatible/>
|
40 |
<dependencies/>
|
41 |
</package>
|