Zendesk Chat - Version 1.0.4

Version Description

  • Robustness update: Make sure widget won't appear more than once.
Download this release

Release Info

Developer bencxr
Plugin Icon 128x128 Zendesk Chat
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

Files changed (2) hide show
  1. readme.txt +4 -1
  2. zopim.php +6 -2
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: bencxr
3
  Tags: widget, plugin, sidebar, page, admin, enhancement, livechat, chat, widget
4
  Requires at least: 2.7
5
  Tested up to: 2.9.2
6
- Stable tag: 1.0.3
7
 
8
  Visitors can chat with you directly by clicking on the Zopim Chat Bar.
9
 
@@ -30,6 +30,9 @@ Great for improving interaction with your users and increasing the time they spe
30
 
31
  == Changelog ==
32
 
 
 
 
33
  = 1.0.3 =
34
  * Maintenance update: New line bugfixes.
35
 
3
  Tags: widget, plugin, sidebar, page, admin, enhancement, livechat, chat, widget
4
  Requires at least: 2.7
5
  Tested up to: 2.9.2
6
+ Stable tag: 1.0.4
7
 
8
  Visitors can chat with you directly by clicking on the Zopim Chat Bar.
9
 
30
 
31
  == Changelog ==
32
 
33
+ = 1.0.4 =
34
+ * Robustness update: Make sure widget won't appear more than once.
35
+
36
  = 1.0.3 =
37
  * Maintenance update: New line bugfixes.
38
 
zopim.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Zopim Widget
5
  Plugin URI: http://www.zopim.org
6
  Description: Zopim embeds a chatbar on your website, so that any visitor can chat with you directly by clicking on the chatbar.
7
  Author: Isidore
8
- Version: 1.0.3
9
  Author URI: http://www.isidorechan.com/
10
  */
11
 
@@ -32,12 +32,16 @@ require_once dirname( __FILE__ ) . '/imintegration.php';
32
 
33
  // We need some CSS to position the paragraph
34
  function zopimme() {
35
- global $current_user;
36
 
37
  $code = get_option('zopimCode');
38
 
39
  if (($code == "" || $code=="zopim") && (!ereg("zopim", $_GET["page"]))&& (!ereg("zopim", $_SERVER["SERVER_NAME"]))) { return; }
40
 
 
 
 
 
41
  // Use zopim's code...
42
  echo "
43
  <!-- Start of Zopim Live Chat Script -->
5
  Plugin URI: http://www.zopim.org
6
  Description: Zopim embeds a chatbar on your website, so that any visitor can chat with you directly by clicking on the chatbar.
7
  Author: Isidore
8
+ Version: 1.0.4
9
  Author URI: http://www.isidorechan.com/
10
  */
11
 
32
 
33
  // We need some CSS to position the paragraph
34
  function zopimme() {
35
+ global $current_user, $zopimshown;
36
 
37
  $code = get_option('zopimCode');
38
 
39
  if (($code == "" || $code=="zopim") && (!ereg("zopim", $_GET["page"]))&& (!ereg("zopim", $_SERVER["SERVER_NAME"]))) { return; }
40
 
41
+ // dont show this more than once
42
+ if (isset($zopimshown) && $zopimshown == 1) { return; }
43
+ $zopimshown = 1;
44
+
45
  // Use zopim's code...
46
  echo "
47
  <!-- Start of Zopim Live Chat Script -->