Version Notes
Intial package.
Download this release
Release Info
Developer | BindChat inc. |
Extension | BindChat_Live_Chat |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/BindChat/All/Block/Extensions.php +89 -0
- app/code/community/BindChat/All/Helper/Data.php +12 -0
- app/code/community/BindChat/All/etc/adminhtml.xml +25 -0
- app/code/community/BindChat/All/etc/config.xml +20 -0
- app/code/community/BindChat/All/etc/system.xml +33 -0
- app/code/community/BindChat/Livechat/Helper/Data.php +61 -0
- app/code/community/BindChat/Livechat/controllers/IndexController.php +14 -0
- app/code/community/BindChat/Livechat/etc/adminhtml.xml +25 -0
- app/code/community/BindChat/Livechat/etc/config.xml +33 -0
- app/code/community/BindChat/Livechat/etc/system.xml +76 -0
- app/design/frontend/default/default/layout/bindchat_livechat.xml +9 -0
- app/design/frontend/default/default/layout/livechat.xml +11 -0
- app/design/frontend/default/default/template/bindchat/livechat.phtml +31 -0
- app/etc/modules/BindChat_All.xml +10 -0
- app/etc/modules/BindChat_Livechat.xml +10 -0
- package.xml +20 -0
- skin/adminhtml/default/default/images/bindchat/bad.gif +0 -0
- skin/adminhtml/default/default/images/bindchat/delete.jpg +0 -0
- skin/adminhtml/default/default/images/bindchat/info.gif +0 -0
- skin/adminhtml/default/default/images/bindchat/ok.gif +0 -0
- skin/adminhtml/default/default/images/bindchat/update.gif +0 -0
app/code/community/BindChat/All/Block/Extensions.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class BindChat_All_Block_Extensions extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
|
3 |
+
|
4 |
+
|
5 |
+
protected $_fieldRenderer;
|
6 |
+
protected $_values;
|
7 |
+
|
8 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
9 |
+
{
|
10 |
+
$html = $this->_getHeaderHtml($element);
|
11 |
+
$modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());
|
12 |
+
|
13 |
+
sort($modules);
|
14 |
+
|
15 |
+
foreach ($modules as $moduleName) {
|
16 |
+
if (strstr($moduleName, 'BindChat_') === FALSE) {
|
17 |
+
continue;
|
18 |
+
}
|
19 |
+
|
20 |
+
if ($moduleName == 'BindChat_All') {
|
21 |
+
continue;
|
22 |
+
}
|
23 |
+
|
24 |
+
$html.= $this->_getFieldHtml($element, $moduleName);
|
25 |
+
}
|
26 |
+
$html .= $this->_getFooterHtml($element);
|
27 |
+
|
28 |
+
return $html;
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
protected function _getFieldRenderer()
|
33 |
+
{
|
34 |
+
if (empty($this->_fieldRenderer)) {
|
35 |
+
$this->_fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');
|
36 |
+
}
|
37 |
+
return $this->_fieldRenderer;
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
protected function _getFieldHtml($fieldset, $moduleCode)
|
42 |
+
{
|
43 |
+
$currentVer = Mage::getConfig()->getModuleConfig($moduleCode)->version;
|
44 |
+
if (!$currentVer)
|
45 |
+
return '';
|
46 |
+
|
47 |
+
$moduleName = substr($moduleCode, strpos($moduleCode, '_') + 1);
|
48 |
+
$allExtensions = unserialize(Mage::app()->loadCache('bindchatall_extensions'));
|
49 |
+
$status = '<a target="_blank"><img src="' . $this->getSkinUrl('images/bindchat/ok.gif') . '" title="' . $this->__("Installed") . '"/></a>';
|
50 |
+
|
51 |
+
if ($allExtensions && isset($allExtensions[$moduleCode])) {
|
52 |
+
$ext = $allExtensions[$moduleCode];
|
53 |
+
|
54 |
+
$url = $ext['url'];
|
55 |
+
$name = $ext['name'];
|
56 |
+
$lastVer = $ext['version'];
|
57 |
+
|
58 |
+
$moduleName = '<a href="' . $url . '" target="_blank" title="' . $name . '">' . $name . "</a>";
|
59 |
+
|
60 |
+
if ($this->_convertVersion($currentVer) < $this->_convertVersion($lastVer)) {
|
61 |
+
$status = '<a href="' . $url . '" target="_blank"><img src="' . $this->getSkinUrl('images/bindchat/update.gif') . '" alt="' . $this->__("Update available") . '" title="' . $this->__("Update available") . '"/></a>';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
$moduleName = $status . ' ' . $moduleName;
|
67 |
+
|
68 |
+
$field = $fieldset->addField($moduleCode, 'label', array(
|
69 |
+
'name' => 'dummy',
|
70 |
+
'label' => $moduleName,
|
71 |
+
'value' => $currentVer,
|
72 |
+
))->setRenderer($this->_getFieldRenderer());
|
73 |
+
|
74 |
+
return $field->toHtml();
|
75 |
+
}
|
76 |
+
|
77 |
+
protected function _convertVersion($v)
|
78 |
+
{
|
79 |
+
$digits = @explode(".", $v);
|
80 |
+
$version = 0;
|
81 |
+
if (is_array($digits)) {
|
82 |
+
foreach ($digits as $k => $v) {
|
83 |
+
$version += ($v * pow(10, max(0, (3 - $k))));
|
84 |
+
}
|
85 |
+
}
|
86 |
+
return $version;
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
app/code/community/BindChat/All/Helper/Data.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* All Data helper
|
4 |
+
*
|
5 |
+
* @author BindChat
|
6 |
+
* @version 1.0
|
7 |
+
*/
|
8 |
+
class BindChat_All_Helper_Data extends Mage_Core_Helper_Data
|
9 |
+
{
|
10 |
+
|
11 |
+
|
12 |
+
}
|
app/code/community/BindChat/All/etc/adminhtml.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<all>
|
6 |
+
<title>Allow Everything</title>
|
7 |
+
</all>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<bindchatall>
|
15 |
+
<title>BindChat - Extensions</title>
|
16 |
+
</bindchatall>
|
17 |
+
</children>
|
18 |
+
</config>
|
19 |
+
</children>
|
20 |
+
</system>
|
21 |
+
</children>
|
22 |
+
</admin>
|
23 |
+
</resources>
|
24 |
+
</acl>
|
25 |
+
</config>
|
app/code/community/BindChat/All/etc/config.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<BindChat_All>
|
5 |
+
<version>1.0</version>
|
6 |
+
</BindChat_All>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<bindchatall>
|
11 |
+
<class>BindChat_All_Block</class>
|
12 |
+
</bindchatall>
|
13 |
+
</blocks>
|
14 |
+
<helpers>
|
15 |
+
<bindchatall>
|
16 |
+
<class>BindChat_All_Helper</class>
|
17 |
+
</bindchatall>
|
18 |
+
</helpers>
|
19 |
+
</global>
|
20 |
+
</config>
|
app/code/community/BindChat/All/etc/system.xml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<bindchat translate="label" module="bindchatall">
|
5 |
+
<label>
|
6 |
+
BindChat
|
7 |
+
</label>
|
8 |
+
<sort_order>300</sort_order>
|
9 |
+
</bindchat>
|
10 |
+
</tabs>
|
11 |
+
<sections>
|
12 |
+
<bindchatall translate="label">
|
13 |
+
<label>General</label>
|
14 |
+
<tab>bindchat</tab>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>777</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
<groups>
|
21 |
+
<extensions translate="label">
|
22 |
+
<label>Installed Extensions</label>
|
23 |
+
<frontend_type>text</frontend_type>
|
24 |
+
<frontend_model>bindchatall/extensions</frontend_model>
|
25 |
+
<sort_order>2</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
</extensions>
|
30 |
+
</groups>
|
31 |
+
</bindchatall>
|
32 |
+
</sections>
|
33 |
+
</config>
|
app/code/community/BindChat/Livechat/Helper/Data.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Livechat Data helper
|
4 |
+
*
|
5 |
+
* @author BindChat
|
6 |
+
*/
|
7 |
+
class BindChat_Livechat_Helper_Data extends Mage_Core_Helper_Data
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Path to store config if front-end output is enabled
|
11 |
+
*
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
const XML_PATH_ENABLED = 'livechat/settings/enabled';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Path to store config where site id is stored
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
const XML_PATH_SITE_ID = 'livechat/settings/siteid';
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Path to store config where site domain is stored
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
const XML_PATH_SITE_DOMAIN = 'livechat/settings/sitedomain';
|
28 |
+
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Checks whether news can be displayed in the frontend
|
32 |
+
*
|
33 |
+
* @param integer|string|Mage_Core_Model_Store $store
|
34 |
+
* @return boolean
|
35 |
+
*/
|
36 |
+
public function isEnabled($store = null)
|
37 |
+
{
|
38 |
+
return Mage::getStoreConfigFlag(self::XML_PATH_ENABLED, $store);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Return the site id
|
43 |
+
* @param integer|string|Mage_Core_Model_Store $store
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getSiteId($store = null)
|
47 |
+
{
|
48 |
+
return Mage::getStoreConfig(self::XML_PATH_SITE_ID, $store);
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Return the site domain
|
54 |
+
* @param integer|string|Mage_Core_Model_Store $store
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function getSiteDomain($store = null)
|
58 |
+
{
|
59 |
+
return Mage::getStoreConfig(self::XML_PATH_SITE_DOMAIN, $store);
|
60 |
+
}
|
61 |
+
}
|
app/code/community/BindChat/Livechat/controllers/IndexController.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class BindChat_Livechat_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout();
|
8 |
+
$this->getLayout()
|
9 |
+
->getBlock('content')->append(
|
10 |
+
$this->getLayout()->createBlock('bindchat/index')
|
11 |
+
);
|
12 |
+
$this->renderLayout();
|
13 |
+
}
|
14 |
+
}
|
app/code/community/BindChat/Livechat/etc/adminhtml.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<all>
|
6 |
+
<title>Allow Everything</title>
|
7 |
+
</all>
|
8 |
+
<admin>
|
9 |
+
<children>
|
10 |
+
<system>
|
11 |
+
<children>
|
12 |
+
<config>
|
13 |
+
<children>
|
14 |
+
<livechat translate="title">
|
15 |
+
<title>Live Chat</title>
|
16 |
+
</livechat>
|
17 |
+
</children>
|
18 |
+
</config>
|
19 |
+
</children>
|
20 |
+
</system>
|
21 |
+
</children>
|
22 |
+
</admin>
|
23 |
+
</resources>
|
24 |
+
</acl>
|
25 |
+
</config>
|
app/code/community/BindChat/Livechat/etc/config.xml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<BindChat_Livechat>
|
5 |
+
<version>1.0</version>
|
6 |
+
</BindChat_Livechat>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<bindchat_livechat>
|
11 |
+
<class>BindChat_Livechat_Helper</class>
|
12 |
+
</bindchat_livechat>
|
13 |
+
</helpers>
|
14 |
+
</global>
|
15 |
+
<frontend>
|
16 |
+
<routers>
|
17 |
+
<BindChat_Livechat>
|
18 |
+
<use>standard</use>
|
19 |
+
<args>
|
20 |
+
<module>BindChat_Livechat</module>
|
21 |
+
<frontName>bindchat</frontName>
|
22 |
+
</args>
|
23 |
+
</BindChat_Livechat>
|
24 |
+
</routers>
|
25 |
+
<layout>
|
26 |
+
<updates>
|
27 |
+
<BindChat_Livechat>
|
28 |
+
<file>bindchat_livechat.xml</file>
|
29 |
+
</BindChat_Livechat>
|
30 |
+
</updates>
|
31 |
+
</layout>
|
32 |
+
</frontend>
|
33 |
+
</config>
|
app/code/community/BindChat/Livechat/etc/system.xml
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<livechat translate="label">
|
5 |
+
<label>Live Chat</label>
|
6 |
+
<tab>bindchat</tab>
|
7 |
+
<frontend_type>text</frontend_type>
|
8 |
+
<sort_order>1000</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
<groups>
|
13 |
+
<settings translate="label">
|
14 |
+
<label>Settings</label>
|
15 |
+
<frontend_type>text</frontend_type>
|
16 |
+
<sort_order>100</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
<comment>
|
21 |
+
<![CDATA[
|
22 |
+
<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
|
23 |
+
This module was developed by <a href="http://www.bindchat.com" target="_blank">www.BindChat.com</a>.
|
24 |
+
For docs & examples refer to the BindChat <a href="http://www.bindchat.com" target="_blank">web site</a>.
|
25 |
+
</div>
|
26 |
+
]]>
|
27 |
+
</comment>
|
28 |
+
<expanded>1</expanded>
|
29 |
+
<fields>
|
30 |
+
<enabled translate="label comment">
|
31 |
+
<label>Enable Live Chat On Frontend</label>
|
32 |
+
<!-- <comment><![CDATA[]]></comment> -->
|
33 |
+
<frontend_type>select</frontend_type>
|
34 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
35 |
+
<sort_order>10</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>1</show_in_website>
|
38 |
+
<show_in_store>1</show_in_store>
|
39 |
+
</enabled>
|
40 |
+
<siteid translate="label comment">
|
41 |
+
<label>Site Id</label>
|
42 |
+
<comment>
|
43 |
+
<![CDATA[
|
44 |
+
<span>
|
45 |
+
What is it?<br/>
|
46 |
+
Live chat needs a BindChat Site ID to identify permissions.
|
47 |
+
If you have a BindChat account, you can get it from <a href="http://www.bindchat.com/install" target="_blank">Install</a> page on web site, and paste your BindChat Site ID into the Site ID field .
|
48 |
+
Otherwise you needs to <a href="http://www.bindchat.com/signup" target="_blank">Signup</a> a new account.
|
49 |
+
</span>
|
50 |
+
]]>
|
51 |
+
</comment>
|
52 |
+
<frontend_type>text</frontend_type>
|
53 |
+
<sort_order>11</sort_order>
|
54 |
+
<show_in_default>1</show_in_default>
|
55 |
+
<show_in_website>1</show_in_website>
|
56 |
+
<show_in_store>1</show_in_store>
|
57 |
+
</siteid>
|
58 |
+
<sitedomain translate="label comment">
|
59 |
+
<label>Site Domain</label>
|
60 |
+
<comment>
|
61 |
+
<![CDATA[
|
62 |
+
<span>Your Magento site domain.</span>
|
63 |
+
]]>
|
64 |
+
</comment>
|
65 |
+
<frontend_type>text</frontend_type>
|
66 |
+
<sort_order>12</sort_order>
|
67 |
+
<show_in_default>1</show_in_default>
|
68 |
+
<show_in_website>1</show_in_website>
|
69 |
+
<show_in_store>1</show_in_store>
|
70 |
+
</sitedomain>
|
71 |
+
</fields>
|
72 |
+
</settings>
|
73 |
+
</groups>
|
74 |
+
</livechat>
|
75 |
+
</sections>
|
76 |
+
</config>
|
app/design/frontend/default/default/layout/bindchat_livechat.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="before_body_end">
|
5 |
+
<block type="core/template" template="bindchat/livechat.phtml">
|
6 |
+
</block>
|
7 |
+
</reference>
|
8 |
+
</default>
|
9 |
+
</layout>
|
app/design/frontend/default/default/layout/livechat.xml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<default>
|
5 |
+
<reference name="before_body_end">
|
6 |
+
<block type="core/template" template="livechat/livechat.phtml">
|
7 |
+
</block>
|
8 |
+
</reference>
|
9 |
+
</default>
|
10 |
+
|
11 |
+
</layout>
|
app/design/frontend/default/default/template/bindchat/livechat.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $bindchatOptions;
|
3 |
+
if (!isset($bindchatOptions)) {
|
4 |
+
$bindchatOptions['enabled'] = Mage::helper('bindchat_livechat')->isEnabled();
|
5 |
+
$bindchatOptions['siteId'] = Mage::helper('bindchat_livechat')->getSiteId();
|
6 |
+
$bindchatOptions['siteDomain'] = Mage::helper('bindchat_livechat')->getSiteDomain();
|
7 |
+
}
|
8 |
+
?>
|
9 |
+
<?php if($bindchatOptions['enabled']):?>
|
10 |
+
<!-- Start of BindChat Live Chat Script -->
|
11 |
+
<script>
|
12 |
+
(function (w, d, e, g, r, a, m) {
|
13 |
+
w['BindChatObject'] = r;
|
14 |
+
w[r] = w[r] || function () {
|
15 |
+
(w[r].q = w[r].q || []).push(arguments)
|
16 |
+
}, w[r].t = 1 * new Date();
|
17 |
+
a = d.createElement(e),
|
18 |
+
m = d.getElementsByTagName(e)[0];
|
19 |
+
a.async = 1;
|
20 |
+
a.src = g;
|
21 |
+
m.parentNode.insertBefore(a, m)
|
22 |
+
})(window, document, 'script', '//www.bindchat.com/api/js/all.js', 'bindchat');
|
23 |
+
|
24 |
+
bindchat('create', '<?php echo $this->htmlEscape($bindchatOptions["siteId"])?>', '<?php echo $this->htmlEscape($bindchatOptions["siteDomain"])?>');
|
25 |
+
</script>
|
26 |
+
<noscript>
|
27 |
+
<a href="http://www.bindchat.com/sites/contact/<?php echo $this->htmlEscape($bindchatOptions['siteId'])?>" target="_blank">Feedback?</a>
|
28 |
+
powered by <a href="http://www.bindchat.com/welcome">Bindchat</a>
|
29 |
+
</noscript>
|
30 |
+
<!-- End of BindChat Live Chat Script -->
|
31 |
+
<?php endif;?>
|
app/etc/modules/BindChat_All.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<BindChat_All>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>1.0</version>
|
8 |
+
</BindChat_All>
|
9 |
+
</modules>
|
10 |
+
</config>
|
app/etc/modules/BindChat_Livechat.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<BindChat_Livechat>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>1.0</version>
|
8 |
+
</BindChat_Livechat>
|
9 |
+
</modules>
|
10 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>BindChat_Live_Chat</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>Visitors can chat with operator directly by clicking on the BIndChat Bar.
|
10 |
+
必聊网(www.bindchat.com)在线客服插件。</summary>
|
11 |
+
<description>Visitors can chat with operator directly by clicking on the BIndChat Bar.
|
12 |
+
必聊网(www.bindchat.com)在线客服插件。</description>
|
13 |
+
<notes>Intial package.</notes>
|
14 |
+
<authors><author><name>bindchat</name><user>bindchat</user><email>bindchatinc@gmail.com</email></author></authors>
|
15 |
+
<date>2013-06-15</date>
|
16 |
+
<time>08:48:49</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="BindChat"><dir name="All"><dir name="Block"><file name="Extensions.php" hash="2d35b9790f7c906c497d55d024d15057"/></dir><dir name="Helper"><file name="Data.php" hash="636fd229c028233ce79b5fd4185ba576"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6cbddded404036f3e7e15562ff37c8f7"/><file name="config.xml" hash="ef60a99f944c2d56010889da0ba23b05"/><file name="system.xml" hash="4a3ba20b2175a9a9bbe22fea965f56f8"/></dir></dir><dir name="Livechat"><dir name="Helper"><file name="Data.php" hash="775162a3396e6c6f0c8df1174cb297f1"/></dir><dir name="controllers"><file name="IndexController.php" hash="6ab5c16349b7db2b25e61103c9d04e1d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8d011cb1107cf83639ea9031cc0eb930"/><file name="config.xml" hash="95cb88d15026ba01a9bfd0416d328c67"/><file name="system.xml" hash="5fa70e2dd0a399550d47bd5f43f0617c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="bindchat_livechat.xml" hash="6acc0148f0b6ed23d49387f94976c886"/><file name="livechat.xml" hash="0af18e35683b32fc06b8131a741f19c5"/></dir><dir name="template"><dir name="bindchat"><file name="livechat.phtml" hash="d75df1a39a78828a4f4642674b563fa1"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="livechat"><file name="livechat.phtml" hash=""/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BindChat_All.xml" hash="2464c3b395f02ce405dc8fd811084b44"/><file name="BindChat_Livechat.xml" hash="16bc5db12b410f77d3656fb9b91a2463"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="bindchat"><file name="bad.gif" hash="b8379f1ba7ab552ca46b9d5fd0452345"/><file name="delete.jpg" hash="6bb134dbca5cbde8e9873b4eb8f8faa8"/><file name="info.gif" hash="421f023bf6a8a17b9c0347ab851f167f"/><file name="ok.gif" hash="a38bc2ee6e116e39c6e2e3013ee50f5e"/><file name="update.gif" hash="8342e11f7739fcfa25134707f0536ed6"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
+
</package>
|
skin/adminhtml/default/default/images/bindchat/bad.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/bindchat/delete.jpg
ADDED
Binary file
|
skin/adminhtml/default/default/images/bindchat/info.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/bindchat/ok.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/bindchat/update.gif
ADDED
Binary file
|