LiveHelpNow_Help_Desk_Chat_Button - Version 1.0.4

Version Notes

Fixed issue where button would not show on mobile devices.

Download this release

Release Info

Developer Eric Witchin
Extension LiveHelpNow_Help_Desk_Chat_Button
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/LHN/Chat/Block/Button.php CHANGED
@@ -38,8 +38,8 @@ class LHN_Chat_Block_Button extends Mage_Core_Block_Abstract implements Mage_Wid
38
  $content .= '</div>'.PHP_EOL;
39
  $content .= '<!--You may install the following code in an external JavaScript file if you like-->'.PHP_EOL;
40
  $content .= '<script type="text/javascript">'.PHP_EOL;
41
- $content .= 'if(typeof lhnChatButton == "undefined"){'.PHP_EOL;
42
- $content .= 'var lhnChatButton = 1;'.PHP_EOL;
43
  $content .= 'var lhnAccountN = '. $lhn_account .';'.PHP_EOL;
44
  $content .= 'var lhnButtonN = '. $lhn_button .';'.PHP_EOL;
45
  $content .= 'var lhnVersion = 5.3; '.PHP_EOL;
@@ -55,9 +55,9 @@ class LHN_Chat_Block_Button extends Mage_Core_Block_Abstract implements Mage_Wid
55
  $content .= 'var lhnPlugin = "Mage-'.Mage::getVersion().'-Chat";'.PHP_EOL;
56
  $content .= 'var lhnTrackingEnabled = "t";'.PHP_EOL;
57
  $content .= 'var lhnScriptSrc = lhnJsHost + "www.livehelpnow.net/lhn/scripts/livehelpnow.aspx?lhnid=" + lhnAccountN + "&iv=" + lhnInviteEnabled + "&d=" + lhnDepartmentN + "&ver=" + lhnVersion + "&rnd=" + Math.random();'.PHP_EOL;
58
- $content .= 'lhnLoadEvent = addLHNButton(lhnScriptSrc,"append");'.PHP_EOL;
59
  $content .= '}else{'.PHP_EOL;
60
- $content .= 'lhnLoadEvent = addLHNButton('.$lhn_button.',"insert");'.PHP_EOL;
61
  $content .= '}'.PHP_EOL;
62
  $content .= 'if (window.addEventListener) {'.PHP_EOL;
63
  $content .= 'window.addEventListener("load", function () {'.PHP_EOL;
@@ -68,7 +68,7 @@ class LHN_Chat_Block_Button extends Mage_Core_Block_Abstract implements Mage_Wid
68
  $content .= 'lhnLoadEvent;'.PHP_EOL;
69
  $content .= '});'.PHP_EOL;
70
  $content .= '}'.PHP_EOL;
71
- $content .= 'function addLHNButton(lhnbutton, lhntype){'.PHP_EOL;
72
  $content .= 'element = document.getElementById("lhnContainer");'.PHP_EOL;
73
  $content .= 'element.id = "lhnContainerDone";'.PHP_EOL;
74
  $content .= 'if(lhntype == "insert"){'.PHP_EOL;
38
  $content .= '</div>'.PHP_EOL;
39
  $content .= '<!--You may install the following code in an external JavaScript file if you like-->'.PHP_EOL;
40
  $content .= '<script type="text/javascript">'.PHP_EOL;
41
+ $content .= 'if(typeof lhnButtonCheck == "undefined"){'.PHP_EOL;
42
+ $content .= 'var lhnButtonCheck = 1;'.PHP_EOL;
43
  $content .= 'var lhnAccountN = '. $lhn_account .';'.PHP_EOL;
44
  $content .= 'var lhnButtonN = '. $lhn_button .';'.PHP_EOL;
45
  $content .= 'var lhnVersion = 5.3; '.PHP_EOL;
55
  $content .= 'var lhnPlugin = "Mage-'.Mage::getVersion().'-Chat";'.PHP_EOL;
56
  $content .= 'var lhnTrackingEnabled = "t";'.PHP_EOL;
57
  $content .= 'var lhnScriptSrc = lhnJsHost + "www.livehelpnow.net/lhn/scripts/livehelpnow.aspx?lhnid=" + lhnAccountN + "&iv=" + lhnInviteEnabled + "&d=" + lhnDepartmentN + "&ver=" + lhnVersion + "&rnd=" + Math.random();'.PHP_EOL;
58
+ $content .= 'lhnLoadEvent = addLHNButton(lhnScriptSrc,"append", lhnJsHost, lhnAccountN);'.PHP_EOL;
59
  $content .= '}else{'.PHP_EOL;
60
+ $content .= 'lhnLoadEvent = addLHNButton('.$lhn_button.',"insert", lhnJsHost, lhnAccountN);'.PHP_EOL;
61
  $content .= '}'.PHP_EOL;
62
  $content .= 'if (window.addEventListener) {'.PHP_EOL;
63
  $content .= 'window.addEventListener("load", function () {'.PHP_EOL;
68
  $content .= 'lhnLoadEvent;'.PHP_EOL;
69
  $content .= '});'.PHP_EOL;
70
  $content .= '}'.PHP_EOL;
71
+ $content .= 'function addLHNButton(lhnbutton, lhntype, lhnJsHost, lhnAccountN){'.PHP_EOL;
72
  $content .= 'element = document.getElementById("lhnContainer");'.PHP_EOL;
73
  $content .= 'element.id = "lhnContainerDone";'.PHP_EOL;
74
  $content .= 'if(lhntype == "insert"){'.PHP_EOL;
package.xml CHANGED
@@ -1,18 +1,26 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LiveHelpNow_Help_Desk_Chat_Button</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Chat with customers on your website using the top rated LiveHelpNow Chat System.</summary>
10
- <description>LiveHelpNow is a responsive, reliable, and extremely affordable Help Desk Software for your website. The live chat button plugin adds click-to-chat functionality to your website, allowing you to interact directly with website visitors the same way you would in a traditional retail store. You wouldn't ignore customers in your store, so don't ignore the ones visiting your site every day! Chat with customers using any computer or mobile device and monitor website visitors in real-time using our Top Rated Chat System. Invite visitors to chat automatically or proactively, help them with product selection, and increase sales! When you're unavailable the chat button plugin switches to an 'offline mode' that allows visitors to leave you messages. This plugin is exclusively for the LiveHelpNow Chat System &amp; also integrates seamlessly with: - LiveHelpNow Ticket System - LiveHelpNow Callback Request System</description>
11
- <notes>Big Fixes</notes>
 
 
 
 
 
 
 
 
12
  <authors><author><name>Eric Witchin</name><user>livehelpnow</user><email>plugins@livehelpnpw.com</email></author></authors>
13
- <date>2013-04-12</date>
14
- <time>12:29:28</time>
15
- <contents><target name="magecommunity"><dir name="LHN"><dir name="Chat"><dir name="Block"><file name="Button.php" hash="37ef9ba0fe2bc7b628255d11dfa1ac11"/></dir><dir name="Helper"><file name="Data.php" hash="37de04c73ab2798399cc75e87c5217fd"/></dir><dir name="etc"><file name="config.xml" hash="6829a398d8d80b95f44b5da38c4c5ead"/><file name="widget.xml" hash="c7386c1c79330be2f9ed916feba76297"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LHN_Chat.xml" hash="a8dafd55068822ec469356e6f8ebb55d"/></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>LiveHelpNow_Help_Desk_Chat_Button</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Chat with customers on your website using the top rated LiveHelpNow Chat System.</summary>
10
+ <description>LiveHelpNow is a responsive, reliable, and extremely affordable Help Desk Software for your website. The LiveHelpNow live chat button plugin adds click-to-chat functionality to your website, allowing you to interact directly with website visitors the same way you would in a traditional retail store. You wouldn't ignore customers in your store, so don't ignore the ones visiting your site every day! &#xD;
11
+ &#xD;
12
+ Chat with customers using any computer or mobile device and monitor website visitors in real-time using our Top Rated Chat System. Invite visitors to chat automatically or proactively, help them with product selection, and increase sales! When you're unavailable the chat button plugin switches to an 'offline mode' that allows visitors to leave you messages. &#xD;
13
+ &#xD;
14
+ This plugin is exclusively for the LiveHelpNow Chat System &amp; also integrates seamlessly with: &#xD;
15
+ &#x2022; LiveHelpNow Ticket System&#xD;
16
+ &#x2022; LiveHelpNow Callback Request System&#xD;
17
+ &#xD;
18
+ This FREE plugin requires a PAID LiveHelpNow Subscription.</description>
19
+ <notes>Fixed issue where button would not show on mobile devices.</notes>
20
  <authors><author><name>Eric Witchin</name><user>livehelpnow</user><email>plugins@livehelpnpw.com</email></author></authors>
21
+ <date>2013-04-15</date>
22
+ <time>15:11:09</time>
23
+ <contents><target name="magecommunity"><dir name="LHN"><dir name="Chat"><dir name="Block"><file name="Button.php" hash="fcd6fbf1efc3cefd47e5f554f2baaf06"/></dir><dir name="Helper"><file name="Data.php" hash="37de04c73ab2798399cc75e87c5217fd"/></dir><dir name="etc"><file name="config.xml" hash="6829a398d8d80b95f44b5da38c4c5ead"/><file name="widget.xml" hash="c7386c1c79330be2f9ed916feba76297"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LHN_Chat.xml" hash="a8dafd55068822ec469356e6f8ebb55d"/></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>