dbFields = array( 'sidebarLabel'=>'Hit Counter', 'showRunningTotalValue'=>true, 'showDailyValue'=>true, 'showDailyUniqueValue'=>true, 'showWeeklyValue'=>true, 'showWeeklyUniqueValue'=>true, 'showMonthlyValue'=>true, 'showMonthlyUniqueValue'=>true ); } public function form() { global $L; // Check if the plugin Simple Stats is activated if (!pluginActivated('pluginSimpleStats')) { // Show an alert about the dependency of the plugin $html = ''; // Hidden form buttons. Save and Cancel buttons. $this->formButtons = false; return $html; } // Show the description of the plugin in the settings $html = ''; // Label of the plugin to show in the sidebar $html .= '
'; $html .= ''; $html .= ''; $html .= ''.$L->get('sidebar-label-tip').''; $html .= '
'; // Show ongoing running total $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; // Show daily page hits/visits $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; // Show weekly page hits/visits $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; // Show monthly page hits/visits $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; return $html; } public function siteSidebar() { global $L; $formatStyle=NumberFormatter::TYPE_INT32; $formatter= new NumberFormatter($locale, $formatStyle); // Check if the plugin Simple Stats is activated if (pluginActivated('pluginSimpleStats')) { // Get the object of the plugin Simple Stats global $plugins; IF ( ($this->getValue('showRunningTotalValue') ) || ($this->getValue('showDailyValue')) || ($this->getValue('showDailyUniqueValue')) || ($this->getValue('showWeeklyValue')) || ($this->getValue('showWeeklyUniqueValue')) || ($this->getValue('showMonthlyValue')) || ($this->getValue('showMonthlyUniqueValue')) ) { $simpleStats = $plugins['all']['pluginSimpleStats']; $html = '
'; $html .= '

'.$this->getValue('sidebarLabel').'

'; $html .= ''; } } $html .= '
'; return $html; } }