Help Center Live Community

Support => Installation Help & Software Support => Topic started by: Jaikaiman on June 25, 2007, 05:21:38 PM



Title: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 25, 2007, 05:21:38 PM
I am currently experiencing a problem with a small box showing on every page of my site.
The box says
"A Live Support Operator is Requesting a Chat.
Click Here for Help
Close"

Clicking on the Close button does nothing, and as this is showing on every page, very offputting for the customers.
Any suggestions?


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 25, 2007, 05:39:11 PM
Can you post a URL to the pages in question?  I assume this is HCL 2.1.2


Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 10:19:59 AM
Sure thing...

http://www.totalbathrooms.co.uk
then visit the online store section...
I will turn the Support Online again
so you can see it for yourself

Many thanks
Jaikaiman


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 12:49:35 PM
Sorry, I was sleeping (your post was 3am localtime)  :o  Anyway, one thing to check is that your stylesheets are not putting a setting into div_initiate.  That's how the invite works, it actually loads it with every page press, then unhides it if needed.  Take a look at the generated script:


<!-- BEGIN Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved -->
<div id="div_initiate" style="position:absolute; z-index:1; top: 40%; left:40%; visibility: hidden;"><a href="javascript:Live.initiate_accept();"><img src="http://www.totalbathrooms.co.uk/hcl/templates/Bliss/images/initiate.gif" border="0"></a><br><a href="javascript:Live.initiate_decline();"><img src="http://www.totalbathrooms.co.uk/hcl/templates/Bliss/images/initiate_close.gif" border="0"></a></div>
<script type="text/javascript" language="javascript" src="http://www.totalbathrooms.co.uk/hcl/class/js/include.php?live&departmentid=1"></script>
<!-- END Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved -->



Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 01:21:15 PM
Forgive me for being a complete philistine? but what the heck does that mean.  Is it some coding in the virtuemart component that is calling for the div_initiate code but shouldnt be?

Thanks


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 01:30:19 PM
Hmm, I don't see anything in the CSS that would cause that.  I see your on-line and I don't get the box yet, have surfed a few pages.  Do you know what browser is being used that causes the problem?


Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 01:39:23 PM
This event only happens in IE7, does not happen in Mozilla


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 01:44:25 PM
Seems like it's only happening in the product listings, something is tripping the visibility settings of the initiate images div stylesheet.  Do you have anything set in hotpages?


Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 01:57:23 PM
Right, this is solved YAY!
In the component Virtuemart.php (opensource cart software), commenting out the following text sorts the problem.

            /**if( !stristr( $_SERVER['PHP_SELF'], "index2.php") ) {
               *    $mainframe->addCustomHeadTag( "<script type=\"text/javascript\" src=\"$mosConfig_live_site/components/$option/js/sleight.js\"></script>
<link type=\"text/css\" rel=\"stylesheet\" media=\"screen, projection\" href=\"$mosConfig_live_site/components/$option/css/shop.css\" />" );
            } else {
            ?>
<script type="text/javascript" src="<?php echo "$mosConfig_live_site/components/$option" ?>/js/sleight.js"></script>
<link type="text/css" rel="stylesheet" media="screen, projection" href="components/<?php echo $option ?>/css/shop.css" />
            <?php
         }
*/

Not quite sure why, but I hope it helps, and I hope it sheds some light on the subject.
Thankx for the support mlzhosting


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 02:01:01 PM
check the shop.css file that is refered to, I'll bet it's using that div_initiate id.


Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 02:11:12 PM
Shop.CSS file here ya go, cant see it.

/* <?php
*/

/* Shop Styles here please
*/
.legalinfo {
   background: lightgray;
   border: 2px solid gray;
   margin: 10px;
   padding: 0px 0px 10px 10px;
}
/*
General Formatting
*/
.formLabel {
   float:left;
   width:30%;
   text-align:right;
   font-weight: bold;
   margin: 2px;
   white-space: nowrap;
   clear: left;
}

.formField {
   float:left;
   width:60%;
   margin: 2px;
      
}
/**
* Administration Styles
*/
.adminListHeader {
   float:left; height: 48px; background-repeat: no-repeat;
   text-align: left; font-size: 18px; font-weight: bold;
   padding-left: 80px;   
}

.labelcell {
   margin-left: auto;
   text-align: right;
   font-weight: bold;
   vertical-align: top;
   width: 30%;
}

/**
* Errors, Warnings and Info formatting
*/
.shop_error, .shop_warning, .shop_info, .shop_debug, .shop_critical, .shop_tip {
   font-size: 120%;
     margin-top: 0.8em;
     margin-left: auto;
     margin-right: auto;
     width: 70% !important;
     clear: both;
     text-align: justify;
     vertical-align: middle;
     border-collapse: collapse;
     padding: 15px 20px 15px 80px;
     background-position: 20px 50%;
     background-repeat: no-repeat;
     -moz-border-radius: 20px;
     -khtml-border-radius: 20px;
     border-radius: 20px;
}
.shop_error {
     background-color: #fdd;
   background-image: url( ../shop_image/ps_image/log_error.png );
}
.shop_warning {
     background-color: #ffc;
   background-image: url( ../shop_image/ps_image/log_warning.png );
}
.shop_info {

     background-color: #eef;
     background-image: url( ../shop_image/ps_image/log_info.png );
}
.shop_tip {
   background-image: url( ../shop_image/ps_image/info.png );
     background-color: #dfd;
}
.shop_debug {
   background-color: #F0F8FF;
   background-image: url( ../shop_image/ps_image/log_debug.png );

}
.shop_critical {
   background-color: salmon;
   font-weight: bold;
   background-image: url( ../shop_image/ps_image/log_critical.png );
}

And for good measure, here is a copy of the Sleight.js file it also mentions

/**********************************************************
Sleight
(c) 2001, Aaron Boodman
http://www.youngpup.net
**********************************************************/

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
    document.writeln('<style type="text/css">img, input.image { visibility:hidden; } </style>');
    window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
    var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
    var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

    for (var i = document.images.length - 1, img = null; (img = document.images); i--) {
        if (itsAllGood && img.src.match(/(.*)\/com_virtuemart\/(.*)\.png/i) != null) {       
            fnFixPng(img);
            img.attachEvent("onpropertychange", fnPropertyChanged);
        }
        img.style.visibility = "visible";
    }

    var nl = document.getElementsByTagName("INPUT");
    for (var i = nl.length - 1, e = null; (e = nl); i--) {
        if (e.className && e.className.match(/\bimage\b/i) != null) {
            if (e.src.match(/\.png$/i) != null) {
                fnFixPng(e);
                e.attachEvent("onpropertychange", fnPropertyChanged);
            }
            e.style.visibility = "visible";
        }
    }
}

function fnPropertyChanged() {
    if (window.event.propertyName == "src") {
        var el = window.event.srcElement;
        if (!el.src.match(/x\.gif$/i)) {
            el.filters.item(0).src = el.src;
            el.src = "x.gif";
        }
    }
}

function dbg(o) {
    var s = "";
    var i = 0;
    for (var p in o) {
        s += p + ": " + o[p] + "\n";
        if (++i % 10 == 0) {
            alert(s);
            s = "";
        }
    }
    alert(s);
}

function fnFixPng(img) {
    var src = img.src;
    img.style.width = img.width + "px";
    img.style.height = img.height + "px";
    img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
    img.src = "components/com_virtuemart/shop_image/blank.gif";
}

But as I dont know that much about php, its all gobbledygook to me lol


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 02:18:10 PM
Well, the second part is java, but why quibble. :D  Seriously, from looking at it, they had a problem with IE (probably same issue in IE 6...)  Anyway, I'm betting the work around is turning all images visible.  Now mind you I only breezed through the code, didn't really take it apart.  But that's my feeling.  Did you lose any functionality when you commented that out? 

This is one of the joys of integrating multiple softwares. :)  Hang in there, you might want to post to the virtualmart about the issue so their aware of it as well.


Title: Re: Problem with Live Operator Request Chat Box
Post by: Jaikaiman on June 26, 2007, 02:37:26 PM
Thats where I got the fix from...It was given by the writer of Virtuemart, so it cant do much wrong!


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on June 26, 2007, 02:45:58 PM
Too cool!  I should check that one out... :)


Title: Re: Problem with Live Operator Request Chat Box
Post by: doigro on July 09, 2007, 06:24:51 PM
Please, can you summarize the solution? I'm quite a newbie and don't understand what and where...


Title: Re: Problem with Live Operator Request Chat Box
Post by: HCL Admin on July 10, 2007, 01:34:32 AM
I believe that someone is working on a how to for the issue.  I may have to get together with the Virtuemart and get a solution.