How to use Colorbox (a lightbox plugin) in Customer portal Knowledge Base

If you are adding larger pictures to your knowledgebase articles you might want to have a way to open them in full on click so the customer can see the details of the picture. This can be achieved with a modal image gallery, a.k.a a lightbox. In our example we are using the Colorbox plugin to implement a lightbox functionality.

To do this you need to navigate in your LiveAgent admin panel into Customer portal > Settings > Customize Design > Tracking codes and put the code below into the After <HEAD> section.

<script src='https://code.jquery.com/jquery-3.6.0.min.js' type='text/javascript'></script>
<script src='https://code.jquery.com/jquery-migrate-1.4.1.min.js' type='text/javascript'></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.4/jquery.colorbox-min.js"></script>
<script type="text/javascript">
  $(window).load(function() {
    // Auto-handle direct jpeg links
    $('.ArticleContent a.FileImage').each(function() {
        $(this).colorbox({photo:true,scalePhotos:true,maxWidth:'90%',maxHeight:'90%'});
    });
    $(".ArticleContent img").each(function() {
       var pic_real_width;
       var image = new Image();
       image.src = $(this).attr("src");
       pic_real_width = image.naturalWidth;
       if(pic_real_width>$(this).width()) {
           $(this).wrap("<a href=\"" + $(this).attr('src') + "\"></a>");
           $(this).parent().colorbox({photo:true,scalePhotos:true,maxWidth:'90%',maxHeight:'90%'});
       }
    });
  });
</script>

Besides the code above, you should also add Colorbox's CSS into Customer portal > Settings > Customize Design > Design > Custom CSS, you can use for example the one below:

:root {
  --controlsIcon: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAACCCAMAAACKP+2+AAAA0lBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmZmZOT1BKSkopKSkZGRoQEBAICAjv7+9aWlpra2uHiYt/gIF7e3t2d3hzc3Nub3Hq6uvq6+vm5udSUlLe3t9FRkdCQkI6OjotLS4hISG9vb3P0NIzMzPFxcbS09Str7GnqKmlpaaZmZmPkJKLi4vi4+SDg4TMzMzBw8Ta29y3ubvW1te0tbX39/f////g4eLY2drHyMqpq62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CWw46PIju4NmLE1To8yE6g4AYScJ5G/YDPkQQBJt5mnC2w+EgaPIgHoPg42M4TxKT1cOwPwiC99flcmmxEpPrP3/vdkFIfPSncWL0Mn4YDvuYD2uzEtfhiwwI8eNH/Zio/3oZ/yTD4EdggxKPb5QIeBHY+Lj/JFrbt7eX8fiBGLgOOxG9T9ItIbpPq+1hGNgYFCLCqYgZzWPiYGBk0GUnyExFRkAI1FqRYWBjj/SLEGQYh7BACFTHxMEIkSEzcUNmIjLq9KC1iBEioVKIIMaACJRA083B2NdjJW6jycbIOLFF4uyNX083uFuHlXBub66vr9+GIfIyTy2Dz1uMNHgsg61wIEsnvZh716vtlgvRw5P1Gt8iocaKDzH++Xpqi6S1MvkQ96fvQLoWD2LU/r/dqulyzvQCo5DUGspIV4SiE6XAc0BN4vFZSPCMIPD5uOUIcAkw/xQMgdcRVUGk9rMTCn/1R3SDoyAhx3/buNg8bbBxN3x4JwIs/qVYSPzY1f6NjeZ4/J78savASujgsxo18PVx56VOTZ2NgEJ8k4UYv5/wGFKEAFkIKIE00Vk+bzZ2mgASvJyoUYESvffX291yOaEENWqXEYauUIAS5p/dnb/48/4+pQRN0Y3ThKGKeTa8Fv/cNH3852Z3n2u3SVSNT0LLu1jPWv6eavt59/00QqggMwGy7vupIaExX3OkfM8EhgDypLPu+wkQXIF8XSUAqOR9IpBBzmQdUsDQhNzP+xfqGeAsc0X+FgAAAABJRU5ErkJggg==);
}
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);}
#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);}
#colorbox{outline:0;}
#cboxContent{margin-top:20px;background:#000;}
.cboxIframe{background:#fff;}
#cboxError{padding:50px; border:1px solid #ccc;}
#cboxLoadedContent{border:5px solid #000; background:#fff;}
#cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;}
#cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
#cboxLoadingGraphic{background:url("data:image/gif;base64,R0lGODlhIAAgAPZBALGxsTU1NUBAQAoKCjAwMBcXFxgYGGNjYz4+PkNDQ1hYWFVVVWxsbDExMQcHB3Nzcy4uLnV1dZqamiMjI8rKyqCgoCEhIampqRAQEJmZmQEBAV5eXmBgYCUlJQMDAzo6OhUVFcnJyScnJxERESAgIImJiZeXl6qqqn5+fgAAAIeHhwwMDAgICAUFBWFhYaWlpc7Ozm5ubmhoaGdnZ56enpycnA4ODkxMTKGhoaysrEVFRUdHR2pqalBQUI6OjmVlZVxcXE5OTjw8PEhISFpaWre3t1FRURwcHFdXV8zMzB4eHkpKSigoKLW1tVNTU6Ojo7CwsNHR0Xd3d6enpywsLEFBQYqKihoaGoWFhTc3N9PT03p6ejMzM5GRkRMTE66uroGBgYyMjDg4OJWVlcPDw8XFxSoqKtXV1bOzs5CQkHBwcJOTk3Fxcbm5uYCAgLq6unx8fMHBwYODg3l5ecDAwMfHx76+vry8vNDQ0NfX1wAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQEBQD/ACwAAAAAIAAgAEAH/4ApgoOEhYaHiINeGV8AX04pAxdaZwqCXhZXHomDJDMyoDNUnBgipk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ikODi3WlR429fsalIjosE9QARG5CqYgkbCYt0EprtgrpMGGooKVDAgagTEAiBEpQopMEQgAOw==") no-repeat center center;}
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
#cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background: var(--controlsIcon) no-repeat top left; width:28px; height:65px; text-indent:-9999px;}
#cboxPrevious:hover{background-position:bottom left;}
#cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background: var(--controlsIcon) no-repeat top right; width:28px; height:65px; text-indent:-9999px;}
#cboxNext:hover{background-position:bottom right;}
#cboxClose{position:absolute; top:5px; right:5px; display:block; background: var(--controlsIcon) no-repeat top center; width:38px; height:19px; text-indent:-9999px;}
#cboxClose:hover{background-position:bottom center;}
Note: of course you can use your own library for a lightbox or choose a different CSS theme for the Colorbox from their website.

 

So in result you will be able to show picture on click in a LightBox. Try it by clicking the picture below. This will work only for images with width larger than the actual article box. Smaller images will not be clickable. Click on the picture to see how it works:

 

×