Version Notes
First release.
Download this release
Release Info
Developer | Sven Gebhardt |
Extension | Devcores_Userlike |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Devcores/Userlike/Block/Basecode.php +30 -0
- app/code/community/Devcores/Userlike/Helper/Data.php +13 -0
- app/code/community/Devcores/Userlike/Model/Data.php +13 -0
- app/code/community/Devcores/Userlike/etc/config.xml +101 -0
- app/code/community/Devcores/Userlike/etc/system.xml +45 -0
- app/design/frontend/default/default/layout/userlike.xml +18 -0
- app/design/frontend/default/default/template/userlike/basecode.phtml +14 -0
- app/etc/modules/Devcores_Userlike.xml +22 -0
- package.xml +20 -0
app/code/community/Devcores/Userlike/Block/Basecode.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Devcores
|
4 |
+
* @package Devcores_Userlike
|
5 |
+
* @author Devcores <info@devcores.com>
|
6 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
7 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
8 |
+
* @link http://devcores.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Devcores_Userlike_Block_Basecode extends Mage_Core_Block_Template {
|
12 |
+
protected $_secret = null;
|
13 |
+
|
14 |
+
protected function _construct() {
|
15 |
+
$this->_secret = Mage::getStoreConfig('userlike/settings/secretkey');
|
16 |
+
}
|
17 |
+
|
18 |
+
public function isActive() {
|
19 |
+
$secret = $this->_secret;
|
20 |
+
if (!is_string($secret) || strlen($secret) < 30 || preg_match("/[^a-f0-9]/", $secret)) {
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
return true;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getSecret() {
|
27 |
+
return $this->_secret;
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Devcores/Userlike/Helper/Data.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Devcores
|
4 |
+
* @package Devcores_Userlike
|
5 |
+
* @author Devcores <info@devcores.com>
|
6 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
7 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
8 |
+
* @link http://devcores.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Devcores_Userlike_Helper_Data extends Mage_Core_Helper_Abstract {
|
12 |
+
|
13 |
+
}
|
app/code/community/Devcores/Userlike/Model/Data.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Devcores
|
4 |
+
* @package Devcores_Userlike
|
5 |
+
* @author Devcores <info@devcores.com>
|
6 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
7 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
8 |
+
* @link http://devcores.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Devcores_Userlike_Model_Data extends Varien_Object {
|
12 |
+
|
13 |
+
}
|
app/code/community/Devcores/Userlike/etc/config.xml
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Devcores
|
5 |
+
* @package Devcores_Userlike
|
6 |
+
* @author Devcores <info@devcores.com>
|
7 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
8 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
9 |
+
* @link http://devcores.com/
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<modules>
|
14 |
+
<Devcores_Userlike>
|
15 |
+
<version>1.0.0</version>
|
16 |
+
</Devcores_Userlike>
|
17 |
+
</modules>
|
18 |
+
<global>
|
19 |
+
<blocks>
|
20 |
+
<userlike>
|
21 |
+
<class>Devcores_Userlike_Block</class>
|
22 |
+
</userlike>
|
23 |
+
</blocks>
|
24 |
+
<helpers>
|
25 |
+
<userlike>
|
26 |
+
<class>Devcores_Userlike_Helper</class>
|
27 |
+
</userlike>
|
28 |
+
</helpers>
|
29 |
+
<models>
|
30 |
+
<userlike>
|
31 |
+
<class>Devcores_Userlike_Model</class>
|
32 |
+
</userlike>
|
33 |
+
</models>
|
34 |
+
</global>
|
35 |
+
<frontend>
|
36 |
+
<layout>
|
37 |
+
<updates>
|
38 |
+
<userlike>
|
39 |
+
<file>userlike.xml</file>
|
40 |
+
</userlike>
|
41 |
+
</updates>
|
42 |
+
</layout>
|
43 |
+
<translate>
|
44 |
+
<modules>
|
45 |
+
<Devcores_Userlike>
|
46 |
+
<files>
|
47 |
+
<default>Devcores_Userlike.csv</default>
|
48 |
+
</files>
|
49 |
+
</Devcores_Userlike>
|
50 |
+
</modules>
|
51 |
+
</translate>
|
52 |
+
</frontend>
|
53 |
+
<adminhtml>
|
54 |
+
<acl>
|
55 |
+
<resources>
|
56 |
+
<admin>
|
57 |
+
<children>
|
58 |
+
<system>
|
59 |
+
<children>
|
60 |
+
<config>
|
61 |
+
<children>
|
62 |
+
<userlike>
|
63 |
+
<title>Userlike Settings</title>
|
64 |
+
</userlike>
|
65 |
+
</children>
|
66 |
+
</config>
|
67 |
+
</children>
|
68 |
+
</system>
|
69 |
+
</children>
|
70 |
+
</admin>
|
71 |
+
</resources>
|
72 |
+
</acl>
|
73 |
+
<translate>
|
74 |
+
<modules>
|
75 |
+
<Devcores_Userlike>
|
76 |
+
<files>
|
77 |
+
<default>Devcores_Userlike.csv</default>
|
78 |
+
</files>
|
79 |
+
</Devcores_Userlike>
|
80 |
+
</modules>
|
81 |
+
</translate>
|
82 |
+
</adminhtml>
|
83 |
+
<default>
|
84 |
+
<userlike>
|
85 |
+
<interest>
|
86 |
+
<default>1</default>
|
87 |
+
<catalog_product>9</catalog_product>
|
88 |
+
<catalog_compare>10</catalog_compare>
|
89 |
+
<catalog_cat>4</catalog_cat>
|
90 |
+
<cms_page>6</cms_page>
|
91 |
+
<cms_index>1</cms_index>
|
92 |
+
<checkout>2</checkout>
|
93 |
+
<cart>1</cart>
|
94 |
+
<customer_login>2</customer_login>
|
95 |
+
<customer_register>5</customer_register>
|
96 |
+
<customer_account>7</customer_account>
|
97 |
+
<wishlist>8</wishlist>
|
98 |
+
</interest>
|
99 |
+
</userlike>
|
100 |
+
</default>
|
101 |
+
</config>
|
app/code/community/Devcores/Userlike/etc/system.xml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Devcores
|
5 |
+
* @package Devcores_Userlike
|
6 |
+
* @author Devcores <info@devcores.com>
|
7 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
8 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
9 |
+
* @link http://devcores.com/
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<sections>
|
14 |
+
<userlike translate="label">
|
15 |
+
<label>Userlike</label>
|
16 |
+
<tab>general</tab>
|
17 |
+
<frontend_type>text</frontend_type>
|
18 |
+
<sort_order>980</sort_order>
|
19 |
+
<show_in_default>1</show_in_default>
|
20 |
+
<show_in_website>1</show_in_website>
|
21 |
+
<show_in_store>1</show_in_store>
|
22 |
+
<groups>
|
23 |
+
<settings translate="label">
|
24 |
+
<label>Userlike Settings</label>
|
25 |
+
<frontend_type>text</frontend_type>
|
26 |
+
<sort_order>1</sort_order>
|
27 |
+
<show_in_default>1</show_in_default>
|
28 |
+
<show_in_website>0</show_in_website>
|
29 |
+
<show_in_store>0</show_in_store>
|
30 |
+
<fields>
|
31 |
+
<secretkey translate="label,comment">
|
32 |
+
<label>Userlike Secret Key</label>
|
33 |
+
<frontend_type>text</frontend_type>
|
34 |
+
<sort_order>1</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>0</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
<comment><![CDATA[You can find your Secret Key in the <a href="http://userlike.com/" target="_blank">Userlike</a> dashboard.]]></comment>
|
39 |
+
</secretkey>
|
40 |
+
</fields>
|
41 |
+
</settings>
|
42 |
+
</groups>
|
43 |
+
</userlike>
|
44 |
+
</sections>
|
45 |
+
</config>
|
app/design/frontend/default/default/layout/userlike.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Devcores
|
5 |
+
* @package Devcores_Userlike
|
6 |
+
* @author Devcores <info@devcores.com>
|
7 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
8 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
9 |
+
* @link http://devcores.com/
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<layout version="0.1.0">
|
13 |
+
<default>
|
14 |
+
<reference name="before_body_end">
|
15 |
+
<block type="userlike/basecode" name="userlike_basecode" template="userlike/basecode.phtml" />
|
16 |
+
</reference>
|
17 |
+
</default>
|
18 |
+
</layout>
|
app/design/frontend/default/default/template/userlike/basecode.phtml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Devcores
|
4 |
+
* @package Devcores_Userlike
|
5 |
+
* @author Devcores <info@devcores.com>
|
6 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
7 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
8 |
+
* @link http://devcores.com/
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
|
12 |
+
<?php if($this->isActive()): ?>
|
13 |
+
<script src="http://widgets.userlike.com/<?php echo $this->getSecret(); ?>.js"></script>
|
14 |
+
<?php endif; ?>
|
app/etc/modules/Devcores_Userlike.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category Devcores
|
5 |
+
* @package Devcores_Userlike
|
6 |
+
* @author Devcores <info@devcores.com>
|
7 |
+
* @author Sven Gebhardt <sven@devcores.com>
|
8 |
+
* @copyright 2012 Devcores UG (haftungsbeschraenkt)
|
9 |
+
* @link http://devcores.com/
|
10 |
+
*/
|
11 |
+
-->
|
12 |
+
<config>
|
13 |
+
<modules>
|
14 |
+
<Devcores_Userlike>
|
15 |
+
<active>true</active>
|
16 |
+
<codePool>community</codePool>
|
17 |
+
<depends>
|
18 |
+
<Mage_Core />
|
19 |
+
</depends>
|
20 |
+
</Devcores_Userlike>
|
21 |
+
</modules>
|
22 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Devcores_Userlike</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Integrates the Userlike live chat into your shop.</summary>
|
10 |
+
<description>Userlike is a livechat system that helps you to assist your website visitors at those crucial moments that decide whether they become valuable customers or remain just another set of wandering visitors.
|
11 |
+

|
12 |
+
For more information, visit Userlike.com.</description>
|
13 |
+
<notes>First release.</notes>
|
14 |
+
<authors><author><name>Sven Gebhardt</name><user>zakx</user><email>sven@devcores.com</email></author></authors>
|
15 |
+
<date>2012-03-02</date>
|
16 |
+
<time>12:59:41</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Devcores"><dir name="Userlike"><dir name="Block"><file name="Basecode.php" hash="51665115d863fd5a2657d0d008fba73d"/></dir><dir name="Helper"><file name="Data.php" hash="f647cbb5718ef336697d02b2b68a385c"/></dir><dir name="Model"><file name="Data.php" hash="f34b1febfdb36054e7eed870aeab930e"/></dir><dir name="etc"><file name="config.xml" hash="3667cff2a254a3468b2350401b6945fd"/><file name="system.xml" hash="fceb4bdf9358c3295e9278e2313ad246"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="userlike.xml" hash="bf4fd200e7ea97bdad29bfbe856a35b0"/></dir><dir name="template"><dir name="userlike"><file name="basecode.phtml" hash="3781522e15da87ab29ac81a2cfeb8aed"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Devcores_Userlike.xml" hash="8acffad2d487cefcdc29bce57afc61d8"/></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
+
</package>
|