VkShare_button - Version 1.0.0

Version Notes

1.0.0

Download this release

Release Info

Developer Magento Core Team
Extension VkShare_button
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Magazento/VkButton/Block/Html/Breadcrumbs.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magazento_VkButton_Block_Html_Breadcrumbs extends Mage_Page_Block_Html_Breadcrumbs
4
+ {
5
+ function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('magazento/vkbutton/breadcrumbs.phtml');
9
+ }
10
+
11
+ }
app/code/community/Magazento/VkButton/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Magazento_VkButton_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+
5
+ }
app/code/community/Magazento/VkButton/Model/Source/Coner.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Interakting Slider
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com and you will be sent a copy immediately.
15
+ *
16
+ * @category BusinessDecision
17
+ * @package BusinessDecision_Interaktingslider
18
+ * @author Business & Decision Picardie - contactmagento@interakting.com
19
+ * @copyright Copyright (c) 2009 Business & Decision (http://www.businessdecision.com)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ /**
24
+ * Liste des modes de transitions
25
+ */
26
+ class Magazento_VkButton_Model_Source_Coner {
27
+
28
+ public function toOptionArray() {
29
+ return array(
30
+ array('value' => 'round', 'label' => Mage::helper('vkbutton')->__('Button Conners')),
31
+ array('value' => 'button', 'label' => Mage::helper('vkbutton')->__('Round Coners')),
32
+ );
33
+ }
34
+
35
+ }
app/code/community/Magazento/VkButton/Model/Source/Mode.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Interakting Slider
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com and you will be sent a copy immediately.
15
+ *
16
+ * @category BusinessDecision
17
+ * @package BusinessDecision_Interaktingslider
18
+ * @author Business & Decision Picardie - contactmagento@interakting.com
19
+ * @copyright Copyright (c) 2009 Business & Decision (http://www.businessdecision.com)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ /**
24
+ * Liste des modes de transitions
25
+ */
26
+ class Magazento_VkButton_Model_Source_Mode {
27
+
28
+ public function toOptionArray() {
29
+ return array(
30
+ array('value' => 'button', 'label' => Mage::helper('vkbutton')->__('Button')),
31
+ array('value' => 'link','label' => Mage::helper('vkbutton')->__('Link')),
32
+ array('value' => 'icon','label' => Mage::helper('vkbutton')->__('Icon')),
33
+ array('value' => 'button_w_i', 'label' => Mage::helper('vkbutton')->__('Button without counter')),
34
+ array('value' => 'link_w_i','label' => Mage::helper('vkbutton')->__('Link without icon')),
35
+
36
+ );
37
+ }
38
+
39
+ }
app/code/community/Magazento/VkButton/etc/config.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Magazento_VkButton>
6
+ <version>1.0.0</version>
7
+ </Magazento_VkButton>
8
+ </modules>
9
+ <frontend>
10
+ <layout>
11
+ <updates>
12
+ <vkbutton>
13
+ <file>magazento_vkbutton.xml</file>
14
+ </vkbutton>
15
+ </updates>
16
+ </layout>
17
+ <translate>
18
+ <modules>
19
+ <Magazento_VkButton>
20
+ <files>
21
+ <default>Magazento_VkButton.csv</default>
22
+ </files>
23
+ </Magazento_VkButton>
24
+ </modules>
25
+ </translate>
26
+ </frontend>
27
+ <global>
28
+ <models>
29
+ <vkbutton>
30
+ <class>Magazento_VkButton_Model</class>
31
+ </vkbutton>
32
+ </models>
33
+ <helpers>
34
+ <vkbutton>
35
+ <class>Magazento_VkButton_Helper</class>
36
+ </vkbutton>
37
+ </helpers>
38
+ <blocks>
39
+ <vkbutton>
40
+ <class>Magazento_VkButton_Block</class>
41
+ </vkbutton>
42
+ <page>
43
+ <rewrite>
44
+ <html_breadcrumbs>Magazento_VkButton_Block_Html_Breadcrumbs</html_breadcrumbs>
45
+ </rewrite>
46
+ </page>
47
+ </blocks>
48
+ </global>
49
+ <adminhtml>
50
+ <translate>
51
+ <modules>
52
+ <Magazento_VkButton>
53
+ <files>
54
+ <default>Magazento_VkButton.csv</default>
55
+ </files>
56
+ </Magazento_VkButton>
57
+ </modules>
58
+ </translate>
59
+ <acl>
60
+ <resources>
61
+ <admin>
62
+ <children>
63
+ <system>
64
+ <children>
65
+ <config>
66
+ <children>
67
+ <vkbutton translate="title" module="vkbutton">
68
+ <title>vkbutton</title>
69
+ </vkbutton>
70
+ </children>
71
+ </config>
72
+ </children>
73
+ </system>
74
+ </children>
75
+ </admin>
76
+ </resources>
77
+ </acl>
78
+ </adminhtml>
79
+ <default>
80
+ <vkbutton>
81
+ <options>
82
+ <enable>1</enable>
83
+ <coners>round</coners>
84
+ <type>button</type>
85
+ <text>Сохранить</text>
86
+ </options>
87
+ </vkbutton>
88
+ </default>
89
+ </config>
app/code/community/Magazento/VkButton/etc/system.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <magazento translate="label">
5
+ <label>Magazento.com</label>
6
+ <sort_order>250</sort_order>
7
+ </magazento>
8
+ </tabs>
9
+ <sections>
10
+ <vkbutton translate="label" module="vkbutton">
11
+ <label>VkButton</label>
12
+ <tab>magazento</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
+ <options translate="label">
20
+ <label>Options</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</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>51</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
+ <text translate="label">
37
+ <label>Message</label>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>53</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ </text>
44
+ <type translate="label">
45
+ <label>Button style</label>
46
+ <frontend_type>select</frontend_type>
47
+ <comment>please select VkButton type</comment>
48
+ <source_model>vkbutton/source_mode</source_model>
49
+ <sort_order>54</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </type>
54
+ <coners translate="label">
55
+ <label>Coners type</label>
56
+ <frontend_type>select</frontend_type>
57
+ <comment>please select VkButton coners type</comment>
58
+ <source_model>vkbutton/source_coner</source_model>
59
+ <sort_order>55</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </coners>
64
+ </fields>
65
+ </options>
66
+ </groups>
67
+ </vkbutton>
68
+ </sections>
69
+ </config>
app/design/frontend/default/default/layout/magazento_vkbutton.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <layout version="0.1.0">
4
+ <default>
5
+ <reference name="head">
6
+ <action method="addCss"><stylesheet>css/vkbutton.css</stylesheet></action>
7
+ </reference>
8
+ </default>
9
+ </layout>
app/design/frontend/default/default/template/magazento/vkbutton/breadcrumbs.phtml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript" src="http://vkontakte.ru/js/api/share.js?10" charset="windows-1251"></script>
2
+
3
+ <?php $vk_enable=Mage::getStoreConfig('vkbutton/options/enable'); ?>
4
+ <?php $vk_coners= Mage::getStoreConfig('vkbutton/options/coners'); ?>
5
+ <?php $vk_type = Mage::getStoreConfig('vkbutton/options/type'); ?>
6
+ <?php $vk_text = Mage::getStoreConfig('vkbutton/options/text'); ?>
7
+
8
+ <? $vk_button="";?>
9
+ <?
10
+
11
+ $vk_button['button']='<script type="text/javascript"><!--
12
+ document.write(VK.Share.button(false,{type: "'.$vk_coners.'", text: "'.$vk_text.'"}));
13
+ --></script>';
14
+ $vk_button['button_w_i']='<script type="text/javascript"><!--
15
+ document.write(VK.Share.button(false,{type: "'.$vk_coners.'_nocount", text: "'.$vk_text.'"}));
16
+ --></script>';
17
+ $vk_button['link']='<script type="text/javascript"><!--
18
+ document.write(VK.Share.button(false,{type: "link", text: "'.$vk_text.'"}));
19
+ --></script>';
20
+ $vk_button['link_w_i']='<script type="text/javascript"><!--
21
+ document.write(VK.Share.button(false,{type: "link_noicon", text: "'.$vk_text.'"}));
22
+ --></script>';
23
+ $vk_button['icon']='<script type="text/javascript"><!--
24
+ document.write(VK.Share.button(false,{type: "custom", text: "<img src=\"http://vk.com/images/vk32.png?1\" />"}));
25
+ --></script>';
26
+
27
+ ?>
28
+
29
+ <div class="breadcrumbs-table">
30
+ <table>
31
+ <tbody>
32
+ <tr class="first last odd">
33
+ <td>
34
+ <? if ($vk_enable) {?>
35
+ <div class="vkshare">
36
+ <? echo $vk_button[$vk_type];?>
37
+ </div>
38
+ <?}?>
39
+ </td>
40
+ <td class="last">
41
+ <?php if ($crumbs && is_array($crumbs)): ?>
42
+ <div class="breadcrumbs">
43
+ <ul>
44
+ <?php foreach ($crumbs as $_crumbName => $_crumbInfo): ?>
45
+ <li class="<?php echo $_crumbName ?>">
46
+ <?php if ($_crumbInfo['link']): ?>
47
+ <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
48
+ <?php elseif ($_crumbInfo['last']): ?>
49
+ <strong><?php echo $this->htmlEscape($_crumbInfo['label']) ?></strong>
50
+ <?php else: ?>
51
+ <?php echo $this->htmlEscape($_crumbInfo['label']) ?>
52
+ <?php endif; ?>
53
+ <?php if (!$_crumbInfo['last']): ?>
54
+ <span>/ </span>
55
+ <?php endif; ?>
56
+ </li>
57
+ <?php endforeach; ?>
58
+ </ul>
59
+ </div>
60
+ <?php endif; ?>
61
+
62
+
63
+ </td>
64
+ </tr>
65
+ </tbody>
66
+ </table>
67
+ </div>
app/etc/modules/Magazento_VkButton.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magazento_VkButton>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Magazento_VkButton>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>VkShare_button</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>VkShare_button</summary>
10
+ <description>VkShare_button</description>
11
+ <notes>1.0.0</notes>
12
+ <authors><author><name>volgodark</name><user>auto-converted</user><email>volgodark@gmail.com</email></author></authors>
13
+ <date>2011-01-27</date>
14
+ <time>03:19:18</time>
15
+ <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="vkbutton.css" hash="a652c12259b6f2586df37c1deb46b82b"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="magazento_vkbutton.xml" hash="4de29e0ed5c6bad3ea1ceab6c112b4b0"/></dir><dir name="template"><dir name="magazento"><dir name="vkbutton"><file name="breadcrumbs.phtml" hash="1d5f911d256b175c5db465acb9e021ed"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Magazento"><dir name="VkButton"><dir name="Block"><dir name="Html"><file name="Breadcrumbs.php" hash="7d90c1b45b11da29744755f8c88c562d"/></dir></dir><dir name="etc"><file name="config.xml" hash="52bc5894749fed5fcfe6146a11361e68"/><file name="system.xml" hash="263765e601a1d75c327d7fa1c7fda355"/></dir><dir name="Helper"><file name="Data.php" hash="40665534086f99c2d7c88d0c6e9f6454"/></dir><dir name="Model"><dir name="Source"><file name="Coner.php" hash="a23f4b5221fd5a108514d3bc41cf0dbe"/><file name="Mode.php" hash="599c95aa76a49cb4c4bb750f2321ad41"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magazento_VkButton.xml" hash="387f2ca68d6aeae21964755b955120b1"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>
skin/frontend/default/default/css/vkbutton.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .vkshare{
2
+ padding: 2px;
3
+ padding-left: 0px;
4
+ }
5
+ .breadcrumbs-table{
6
+ /* float: left;*/
7
+ margin: -20px 0 5px;
8
+ /* width: auto;*/
9
+ }
10
+
11
+ .breadcrumbs {
12
+ float: left;
13
+ display: block;
14
+ font-size: 11px;
15
+ line-height: 1.25;
16
+ margin: 0px;
17
+ padding-top: 9px;
18
+ padding-left: 2px;
19
+ }