From 80c09697fa5ad8295b29465f81eb190b13defe47 Mon Sep 17 00:00:00 2001 From: MikeyGMT Date: Sat, 31 Dec 2016 18:55:45 +0000 Subject: [PATCH 1/2] Text to LANS #6 - Infopanel Chart - #2219 conflicts now resolved in this version Text to LANS #6 - Infopanel Chart - #2219 conflicts now resolved in this version --- e107_admin/includes/infopanel.php | 58 +++++++++++----------- e107_languages/English/admin/lan_admin.php | 4 ++ 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php index 580013b73..f71c26e7c 100644 --- a/e107_admin/includes/infopanel.php +++ b/e107_admin/includes/infopanel.php @@ -2,14 +2,12 @@ /* * e107 website system * - * Copyright (C) 2008-2013 e107 Inc (e107.org) + * Copyright (C) 2008-2016 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * Info panel admin view * - * $URL$ - * $Id$ */ if (!defined('e107_INIT')) @@ -160,7 +158,6 @@ class adminstyle_infopanel '; */ - //TODO LANs throughout. $user_pref = $this->getUserPref(); @@ -624,7 +621,7 @@ class adminstyle_infopanel - function render_infopanel_options($render = false) //TODO LAN + function render_infopanel_options($render = false) { $frm = e107::getForm(); $mes = e107::getMessage(); @@ -771,27 +768,32 @@ class adminstyle_infopanel { $data = array(); - $data['labels'] = array("January","February","March","April","May","June","July"); - - - $data['datasets'][] = array( - 'fillColor' => "rgba(220,220,220,0.5)", - 'strokeColor' => "rgba(220,220,220,1)", - 'pointColor ' => "rgba(220,220,220,1)", - 'pointStrokeColor' => "#fff", - 'data' => array(65,59,90,81,56,55,40), - 'title' => "Visits" - + $data['labels'] = array(strftime("%B",mktime(0,0,0,01,01,16)), //"January", + strftime("%B",mktime(0,0,0,02,01,16)), //"February", + strftime("%B",mktime(0,0,0,03,01,16)), //"March", + strftime("%B",mktime(0,0,0,04,01,16)), //"April", + strftime("%B",mktime(0,0,0,05,01,16)), //"May", + strftime("%B",mktime(0,0,0,06,01,16)), //"June", + strftime("%B",mktime(0,0,0,07,01,16)) //"July" ); $data['datasets'][] = array( - 'fillColor' => "rgba(151,187,205,0.5)", - 'strokeColor' => "rgba(151,187,205,1)", - 'pointColor ' => "rgba(151,187,205,1)", - 'pointStrokeColor' => "#fff", - 'data' => array(28,48,40,19,96,27,100), - 'title' => "Unique Visits" - ); + 'fillColor' => "rgba(220,220,220,0.5)", + 'strokeColor' => "rgba(220,220,220,1)", + 'pointColor ' => "rgba(220,220,220,1)", + 'pointStrokeColor' => "#fff", + 'data' => array(65,59,90,81,56,55,40), + 'title' => ADLAN_168// "Visits" + ); + + $data['datasets'][] = array( + 'fillColor' => "rgba(151,187,205,0.5)", + 'strokeColor' => "rgba(151,187,205,1)", + 'pointColor ' => "rgba(151,187,205,1)", + 'pointStrokeColor' => "#fff", + 'data' => array(28,48,40,19,96,27,100), + 'title' => ADLAN_169 //"Unique Visits" + ); return $data; } @@ -955,21 +957,21 @@ class adminstyle_infopanel if($type == 'demo') { - $text .= "
These stats are for demonstration purposes only. Install Site Stats Plugin
"; + $text .= "
".ADLAN_170."".ADLAN_171."
"; } else { $text .= "
- Visitors    - Unique Visitors + ".ADLAN_168."   + ".ADLAN_169."
"; } - return $text; - + return $text; } } ?> + diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 948888213..63dd65393 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -187,6 +187,10 @@ define("ADLAN_165", "Powered by e107"); define("ADLAN_166", "Return to Website"); define("ADLAN_167", "Pending Mailshots"); +define("ADLAN_168", "Visitors");//infopanel +define("ADLAN_169", "Unique Visitors"); +define("ADLAN_170", "These stats are for demonstration purposes only."); +define("ADLAN_171", "Install Site Stats Plugin"); define("ADLAN_185", "Toggle Sidebar"); From c81732757ee0de56c424d8502d9a96a63113e265 Mon Sep 17 00:00:00 2001 From: MikeyGMT Date: Sat, 31 Dec 2016 21:23:02 +0000 Subject: [PATCH 2/2] Infopanel - Using internal date function Infopanel - Using internal date function --- e107_admin/includes/infopanel.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php index f71c26e7c..cf245d751 100644 --- a/e107_admin/includes/infopanel.php +++ b/e107_admin/includes/infopanel.php @@ -768,14 +768,16 @@ class adminstyle_infopanel { $data = array(); - $data['labels'] = array(strftime("%B",mktime(0,0,0,01,01,16)), //"January", - strftime("%B",mktime(0,0,0,02,01,16)), //"February", - strftime("%B",mktime(0,0,0,03,01,16)), //"March", - strftime("%B",mktime(0,0,0,04,01,16)), //"April", - strftime("%B",mktime(0,0,0,05,01,16)), //"May", - strftime("%B",mktime(0,0,0,06,01,16)), //"June", - strftime("%B",mktime(0,0,0,07,01,16)) //"July" - ); + $months = e107::getDate()->terms('month'); + + $data['labels'] = array($months[0], //"January", + $months[1], //"February", + $months[2], //"March", + $months[3], //"April", + $months[4], //"May", + $months[5], //"June", + $months[6] //"July" + ); $data['datasets'][] = array( 'fillColor' => "rgba(220,220,220,0.5)",