function widget($args, $instance)
 {
     $extraWatchPluginDir = realpath(dirname(realpath(__FILE__)) . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS . ".." . DS);
     include_once $extraWatchPluginDir . DS . "modules" . DS . "mod_extrawatch_visitors" . DS . "mod_extrawatch_visitors.php";
     echo renderExtraWatchVisitors();
 }
 * @file
 * ExtraWatch - A real-time ajax monitor and live stats  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @package ExtraWatch  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @version 2.3  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @revision 2572  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @license http://www.gnu.org/licenses/gpl-3.0.txt     GNU General Public License v3  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @copyright (C) 2015 by CodeGravity.com - All rights reserved!  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 * @website http://www.extrawatch.com  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 */
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
if (!defined("JPATH_BASE2")) {
    define("JPATH_BASE2", JPATH_BASE);
}
if (!defined("DS")) {
    define("DS", DIRECTORY_SEPARATOR);
}
require_once JPATH_BASE . DS . "components" . DS . "com_extrawatch" . DS . "includes.php";
function renderExtraWatchVisitors()
{
    $output = "";
    $extraWatch = new ExtraWatchMain();
    $extraWatch->config->initializeTranslations();
    $extraWatchStatHTML = new ExtraWatchStatHTML($extraWatch);
    $output .= $extraWatchStatHTML->renderFrontendStats($extraWatch);
    return $output;
}
$env = ExtraWatchEnvFactory::getEnvironment()->getEnvironmentName();
if (!defined('ENV') | $env == "nocms") {
    echo renderExtraWatchVisitors();
}
 function extrawatch_frontend_visitors()
 {
     include_once getExtraWatchPath() . "modules" . DS . "mod_extrawatch_visitors" . DS . "mod_extrawatch_visitors.php";
     echo renderExtraWatchVisitors();
 }