Vhaldecode_CookieLaw - Version 1.0.3

Version Notes

Possibility to add custom text in configuration.

Download this release

Release Info

Developer Pere Garcia
Extension Vhaldecode_CookieLaw
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/Valdecode/CookieLaw/Model/Config/Show.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Valdecode
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Valdecode
13
+ * @package Valdecode_CookieLaw
14
+ * @copyright Copyright (c) 2013 Valdecode
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class Valdecode_CookieLaw_Model_Config_Show
18
+ {
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array('value' => 'translate', 'label' => 'Message from translation files'),
23
+ array('value' => 'custom', 'label' => 'Custom message'),
24
+ );
25
+ }
26
+ }
app/code/community/Valdecode/CookieLaw/etc/config.xml CHANGED
@@ -80,6 +80,7 @@
80
  <behaviour>1</behaviour>
81
  <position>v-top</position>
82
  <skin>v-yellow-alert</skin>
 
83
  <cms_page>privacy-policy-cookie-restriction-mode</cms_page>
84
  </cookielaw>
85
  </cookielaw>
80
  <behaviour>1</behaviour>
81
  <position>v-top</position>
82
  <skin>v-yellow-alert</skin>
83
+ <show>translate</show>
84
  <cms_page>privacy-policy-cookie-restriction-mode</cms_page>
85
  </cookielaw>
86
  </cookielaw>
app/code/community/Valdecode/CookieLaw/etc/system.xml CHANGED
@@ -83,11 +83,50 @@
83
  <show_in_store>1</show_in_store>
84
  <source_model>cookielaw/config_skin</source_model>
85
  </skin>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <cms_page translate="label">
87
  <label>Cookie policy page</label>
88
  <comment>CMS page with information about cookies and how to manage them.</comment>
89
  <frontend_type>select</frontend_type>
90
- <sort_order>5</sort_order>
91
  <show_in_default>1</show_in_default>
92
  <show_in_website>1</show_in_website>
93
  <show_in_store>1</show_in_store>
83
  <show_in_store>1</show_in_store>
84
  <source_model>cookielaw/config_skin</source_model>
85
  </skin>
86
+ <show translate="label">
87
+ <label>Show</label>
88
+ <frontend_type>select</frontend_type>
89
+ <sort_order>5</sort_order>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>1</show_in_website>
92
+ <show_in_store>1</show_in_store>
93
+ <source_model>cookielaw/config_show</source_model>
94
+ </show>
95
+ <custom_message translate="label">
96
+ <label>Message</label>
97
+ <frontend_type>text</frontend_type>
98
+ <sort_order>6</sort_order>
99
+ <show_in_default>1</show_in_default>
100
+ <show_in_website>1</show_in_website>
101
+ <show_in_store>1</show_in_store>
102
+ <depends><show>custom</show></depends>
103
+ </custom_message>
104
+ <custom_link translate="label">
105
+ <label>Link text</label>
106
+ <frontend_type>text</frontend_type>
107
+ <sort_order>7</sort_order>
108
+ <show_in_default>1</show_in_default>
109
+ <show_in_website>1</show_in_website>
110
+ <show_in_store>1</show_in_store>
111
+ <depends><show>custom</show></depends>
112
+ </custom_link>
113
+ <custom_accept translate="label">
114
+ <label>Accept text</label>
115
+ <comment>
116
+ The close icon changes to this text at certain resolution.
117
+ </comment>
118
+ <frontend_type>text</frontend_type>
119
+ <sort_order>8</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ <depends><show>custom</show></depends>
124
+ </custom_accept>
125
  <cms_page translate="label">
126
  <label>Cookie policy page</label>
127
  <comment>CMS page with information about cookies and how to manage them.</comment>
128
  <frontend_type>select</frontend_type>
129
+ <sort_order>9</sort_order>
130
  <show_in_default>1</show_in_default>
131
  <show_in_website>1</show_in_website>
132
  <show_in_store>1</show_in_store>
app/design/frontend/base/default/template/cookielaw/top.phtml CHANGED
@@ -18,10 +18,17 @@
18
  <?php if (Mage::getStoreConfig('cookielaw/cookielaw/enabled')): ?>
19
  <div id="v-cookielaw" class="<?php echo Mage::getStoreConfig('cookielaw/cookielaw/position') ?> <?php echo Mage::getStoreConfig('cookielaw/cookielaw/skin') ?>" style="display: none">
20
  <div class="v-message">
21
- <?php $link = '<a href="'.Mage::getStoreConfig('cookielaw/cookielaw/cms_page').'">'.$this->__("cookie policy").'</a>' ?>
22
- <?php echo $this->__('This websites use cookies. By continuing to browse the site you are agreeing to our use of cookies. For more details about cookies and how to manage them, see our %s.', $link) ?>
 
 
 
 
 
23
  </div>
24
- <a href="javascript:cookieLaw.cookieLawAccept(<?php echo Mage::getStoreConfig('cookielaw/cookielaw/behaviour') ?>);" class="v-close"><?php echo $this->__("Accept") ?></a>
 
 
25
  </div>
26
  <script type="text/javascript">
27
  if (!cookieLaw.getCookie('cookielaw')) {
18
  <?php if (Mage::getStoreConfig('cookielaw/cookielaw/enabled')): ?>
19
  <div id="v-cookielaw" class="<?php echo Mage::getStoreConfig('cookielaw/cookielaw/position') ?> <?php echo Mage::getStoreConfig('cookielaw/cookielaw/skin') ?>" style="display: none">
20
  <div class="v-message">
21
+ <?php if (Mage::getStoreConfig('cookielaw/cookielaw/show') == 'translate'): ?>
22
+ <?php $link = '<a href="'.Mage::getStoreConfig('cookielaw/cookielaw/cms_page').'">'.$this->__("cookie policy").'</a>' ?>
23
+ <?php echo $this->__('This websites use cookies. By continuing to browse the site you are agreeing to our use of cookies. For more details about cookies and how to manage them, see our %s.', $link) ?>
24
+ <?php else: ?>
25
+ <?php echo Mage::getStoreConfig('cookielaw/cookielaw/custom_message'); ?>
26
+ <a href="<?php echo Mage::getStoreConfig('cookielaw/cookielaw/cms_page'); ?>"><?php echo Mage::getStoreConfig('cookielaw/cookielaw/custom_link'); ?></a>
27
+ <?php endif; ?>
28
  </div>
29
+ <a href="javascript:cookieLaw.cookieLawAccept(<?php echo Mage::getStoreConfig('cookielaw/cookielaw/behaviour') ?>);" class="v-close">
30
+ <?php echo (Mage::getStoreConfig('cookielaw/cookielaw/show') == 'translate') ? $this->__("Accept") : Mage::getStoreConfig('cookielaw/cookielaw/custom_accept'); ?>
31
+ </a>
32
  </div>
33
  <script type="text/javascript">
34
  if (!cookieLaw.getCookie('cookielaw')) {
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Vhaldecode_CookieLaw</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Make sure your website complies with the EU Cookie Law with this customizable extension.</summary>
10
  <description>Another EU Cookie Law Compliance extension. This extension adds a notice telling your visitors that the site uses cookies. The notice shows up when a visitor enters for the first time to the site, and remains there until it's closed.</description>
11
- <notes>Minor changes.</notes>
12
  <authors><author><name>Pere Garcia</name><user>vhalde</user><email>vhalde@mailhaven.com</email></author></authors>
13
  <date>2014-04-17</date>
14
- <time>14:48:17</time>
15
- <contents><target name="magecommunity"><dir name="Valdecode"><dir name="CookieLaw"><dir><dir name="Helper"><file name="Data.php" hash="805984b7ec4a20498446adda46dd8b66"/></dir><dir name="Model"><dir name="Config"><file name="Behaviour.php" hash="ac91130ac640521acf26e0b29f78abb0"/><file name="Position.php" hash="ae8d405915c710d8746e0192d93f8676"/><file name="Skin.php" hash="6851ffc2e6bdc9e9d27ecf9615239cc8"/></dir></dir><dir name="etc"><file name="config.xml" hash="f8a978e9d6da3ba4f26e6bfe057d27c1"/><file name="system.xml" hash="f37c10c44df38e201b43211102847d91"/></dir></dir><file name="LICENSE.txt" hash="59563e7be45096d0833dade102989042"/><file name="LICENSE_AFL.txt" hash="45a399f2095030865fb962263ccd7506"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cookielaw.xml" hash="9001af47ba9b7b7a78d1c94a57a1208e"/></dir><dir name="template"><dir name="cookielaw"><file name="top.phtml" hash="54304a4cbef8199cfefb9717635d151e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Valdecode_CookieLaw.xml" hash="1c031f6ec39e892c0163383c7be44263"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Valdecode_CookieLaw.csv" hash="80e15a928af1ee5e2ec153d5267b788d"/></dir><dir name="es_ES"><file name="Valdecode_CookieLaw.csv" hash="6ef904f740433596a3f4eac7b5e3bf00"/></dir><dir name="en_US"><file name="Valdecode_CookieLaw.csv" hash="ca98da9cf3c59851db2766fc3c8f4dd0"/></dir><dir name="fr_FR"><file name="Valdecode_CookieLaw.csv" hash="2c6a6358d31671c4be9dbd2d202fa15e"/></dir><dir name="hu_HU"><file name="Valdecode_CookieLaw.csv" hash="31be3e7d14d2cd5df253afab014ae530"/></dir><dir name="nl_NL"><file name="Valdecode_CookieLaw.csv" hash="8dad0acf10c360f1bc6e2d0d2af8e7b3"/></dir><dir name="ro_RO"><file name="Valdecode_CookieLaw.csv" hash="c75a72df0de79d5aeaf0757d4445bdea"/></dir></target><target name="mageweb"><dir name="js"><dir name="valdecode"><dir name="cookielaw"><file name="cookielaw.js" hash="cb580f4041d796172a4b7e864fd9206b"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="valdecode"><dir name="cookielaw"><dir name="css"><file name="cookielaw.css" hash="cbdf84229daff1af4038f5d7738f2f65"/></dir><dir name="images"><file name="close.png" hash="eff8ee822d3011bd1f992cf4b7f81f9b"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Vhaldecode_CookieLaw</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Make sure your website complies with the EU Cookie Law with this customizable extension.</summary>
10
  <description>Another EU Cookie Law Compliance extension. This extension adds a notice telling your visitors that the site uses cookies. The notice shows up when a visitor enters for the first time to the site, and remains there until it's closed.</description>
11
+ <notes>Possibility to add custom text in configuration.</notes>
12
  <authors><author><name>Pere Garcia</name><user>vhalde</user><email>vhalde@mailhaven.com</email></author></authors>
13
  <date>2014-04-17</date>
14
+ <time>17:32:14</time>
15
+ <contents><target name="magecommunity"><dir name="Valdecode"><dir name="CookieLaw"><dir><dir name="Helper"><file name="Data.php" hash="805984b7ec4a20498446adda46dd8b66"/></dir><dir name="Model"><dir name="Config"><file name="Behaviour.php" hash="ac91130ac640521acf26e0b29f78abb0"/><file name="Position.php" hash="ae8d405915c710d8746e0192d93f8676"/><file name="Show.php" hash="90a572b3358c7da632287625a3fd9a75"/><file name="Skin.php" hash="6851ffc2e6bdc9e9d27ecf9615239cc8"/></dir></dir><dir name="etc"><file name="config.xml" hash="5ada0f1e996a1b8eba1a6ba6ed6082e3"/><file name="system.xml" hash="b11495774e144dca4dc2334b6ee12b57"/></dir></dir><file name="LICENSE.txt" hash="59563e7be45096d0833dade102989042"/><file name="LICENSE_AFL.txt" hash="45a399f2095030865fb962263ccd7506"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cookielaw.xml" hash="9001af47ba9b7b7a78d1c94a57a1208e"/></dir><dir name="template"><dir name="cookielaw"><file name="top.phtml" hash="2dd2bfda1c68dd6e316c80025370a134"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Valdecode_CookieLaw.xml" hash="1c031f6ec39e892c0163383c7be44263"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Valdecode_CookieLaw.csv" hash="80e15a928af1ee5e2ec153d5267b788d"/></dir><dir name="es_ES"><file name="Valdecode_CookieLaw.csv" hash="6ef904f740433596a3f4eac7b5e3bf00"/></dir><dir name="en_US"><file name="Valdecode_CookieLaw.csv" hash="ca98da9cf3c59851db2766fc3c8f4dd0"/></dir><dir name="fr_FR"><file name="Valdecode_CookieLaw.csv" hash="2c6a6358d31671c4be9dbd2d202fa15e"/></dir><dir name="hu_HU"><file name="Valdecode_CookieLaw.csv" hash="31be3e7d14d2cd5df253afab014ae530"/></dir><dir name="nl_NL"><file name="Valdecode_CookieLaw.csv" hash="8dad0acf10c360f1bc6e2d0d2af8e7b3"/></dir><dir name="ro_RO"><file name="Valdecode_CookieLaw.csv" hash="c75a72df0de79d5aeaf0757d4445bdea"/></dir></target><target name="mageweb"><dir name="js"><dir name="valdecode"><dir name="cookielaw"><file name="cookielaw.js" hash="cb580f4041d796172a4b7e864fd9206b"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="valdecode"><dir name="cookielaw"><dir name="css"><file name="cookielaw.css" hash="ccfcb449a861b54a417eddece24a7956"/></dir><dir name="images"><file name="close.png" hash="eff8ee822d3011bd1f992cf4b7f81f9b"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/valdecode/cookielaw/css/cookielaw.css CHANGED
@@ -16,7 +16,7 @@
16
  #v-cookielaw { overflow: hidden; width: 100%; background: #fff; border-bottom: 1px solid #000; padding: 8px 0; position: relative; }
17
  #v-cookielaw .v-message { float: left; text-align: left; padding: 0 10px; width: 90%; }
18
  #v-cookielaw .v-close { right: 10px; position: absolute; top: 50%; margin-top: -8px; cursor: pointer; font-size: 0; width: 16px; height: 16px; background: url('../images/close.png') no-repeat; }
19
- #v-cookielaw .v-close:hover { background-position: 0 -49px; }
20
 
21
  #v-cookielaw.v-top { }
22
  #v-cookielaw.v-bottom { position: fixed; bottom: 0; z-index: 999999; border-bottom: 0; border-top: 1px solid #000; }
@@ -29,9 +29,9 @@
29
  #v-cookielaw.v-dark-clean a { color: #ff9393; text-decoration: none; }
30
  #v-cookielaw.v-dark-clean a:hover { text-decoration: underline; }
31
  #v-cookielaw.v-dark-clean .v-close { background-position: 0 -32px; }
32
- #v-cookielaw.v-dark-clean .v-close:hover { background-position: 0 -17px; }
33
 
34
  @media screen and (max-width: 480px) {
35
  #v-cookielaw .v-message { float: none; width: 100%; }
36
- #v-cookielaw .v-close { padding: 5px 10px; display: inline-block; font-size: inherit; background: none; position: relative; margin-top: inherit; top: inherit; right: inherit; }
37
  }
16
  #v-cookielaw { overflow: hidden; width: 100%; background: #fff; border-bottom: 1px solid #000; padding: 8px 0; position: relative; }
17
  #v-cookielaw .v-message { float: left; text-align: left; padding: 0 10px; width: 90%; }
18
  #v-cookielaw .v-close { right: 10px; position: absolute; top: 50%; margin-top: -8px; cursor: pointer; font-size: 0; width: 16px; height: 16px; background: url('../images/close.png') no-repeat; }
19
+ #v-cookielaw .v-close:hover { background-position: 0 -48px; }
20
 
21
  #v-cookielaw.v-top { }
22
  #v-cookielaw.v-bottom { position: fixed; bottom: 0; z-index: 999999; border-bottom: 0; border-top: 1px solid #000; }
29
  #v-cookielaw.v-dark-clean a { color: #ff9393; text-decoration: none; }
30
  #v-cookielaw.v-dark-clean a:hover { text-decoration: underline; }
31
  #v-cookielaw.v-dark-clean .v-close { background-position: 0 -32px; }
32
+ #v-cookielaw.v-dark-clean .v-close:hover { background-position: 0 -16px; }
33
 
34
  @media screen and (max-width: 480px) {
35
  #v-cookielaw .v-message { float: none; width: 100%; }
36
+ #v-cookielaw .v-close { padding: 5px 10px; display: inline-block; font-size: inherit; background: none; position: relative; margin-top: inherit; top: inherit; right: inherit; width: 100%; }
37
  }