Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

@@ -114,39 +114,12 @@ class _badges extends \IPS\Dispatcher\Controller
'list' => 'stats_badges_by_group',
'member' => 'stats_badges_by_member',
);
$activeTab = ( isset( \IPS\Request::i()->tab ) and array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'type';
\IPS\Request::i()->tab ??= 'type';
$activeTab = ( array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'type';
if ( $activeTab === 'type' )
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=badges&tab=' . $activeTab ), 'core_member_badges', 'datetime', '', array(
'isStacked' => FALSE,
'backgroundColor' => '#ffffff',
'hAxis' => array('gridlines' => array('color' => '#f5f5f5')),
'lineWidth' => 1,
'areaOpacity' => 0.4
),
'AreaChart',
'daily',
array('start' => 0, 'end' => 0),
array(),
$activeTab
);
$chart->title = \IPS\Member::loggedIn()->language()->addToStack( 'stats_badges_title' );
$chart->availableTypes = array('AreaChart', 'ColumnChart', 'BarChart');
$chart->enableHourly = FALSE;
$chart->groupBy = 'badge';
foreach ( \IPS\core\Achievements\Badge::roots() as $badge )
{
$chart->addSeries( $badge->_title, 'number', 'COUNT(*)', TRUE, $badge->id );
}
$chart->title = \IPS\Member::loggedIn()->language()->addToStack( 'stats_badges_title' );
$chart->availableTypes = array('AreaChart', 'ColumnChart', 'BarChart');
$chart->showIntervals = TRUE;
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Badges' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=badges&tab=' . $activeTab ) );
}
elseif ( $activeTab === 'member' )
{
@@ -58,49 +58,7 @@ class _deviceusage extends \IPS\Dispatcher\Controller
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('prunesettings') )
);
/* Determine minimum date */
$minimumDate = NULL;
if( \IPS\Settings::i()->stats_device_usage_prune )
{
$minimumDate = \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->stats_device_usage_prune . 'D' ) );
}
/* We can't retrieve any stats prior to the new tracking being implemented */
try
{
$oldestLog = \IPS\Db::i()->select( 'MIN(time)', 'core_statistics', array( 'type=?', 'online_users' ) )->first();
if( !$minimumDate OR $oldestLog < $minimumDate->getTimestamp() )
{
$minimumDate = \IPS\DateTime::ts( $oldestLog );
}
}
catch( \UnderflowException $e )
{
/* We have nothing tracked, set minimum date to today */
$minimumDate = \IPS\DateTime::create();
}
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=deviceusage' ), 'core_statistics', 'time', '', array(
'isStacked' => FALSE,
'backgroundColor' => '#ffffff',
'colors' => array( '#10967e', '#ea7963', '#de6470', '#6b9dde' ),
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'AreaChart', 'hourly' );
$chart->where[] = array( 'type=?', 'devices' );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_deviceusage_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->enableHourly = TRUE;
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_devices_mobiles'), 'number', 'SUM(value_1)', TRUE );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_devices_tablets'), 'number', 'SUM(value_2)', TRUE );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_devices_consoles'), 'number', 'SUM(value_3)', TRUE );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_devices_desktops'), 'number', 'SUM(value_4)', TRUE );
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'DeviceUsage' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=deviceusage" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_deviceusage');
\IPS\Output::i()->output = (string) $chart;
}
@@ -46,91 +46,14 @@ class _moderators extends \IPS\Dispatcher\Controller
*/
protected function manage()
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=moderators'), 'core_moderator_logs', 'ctime', '', array(
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'LineChart', 'monthly', array( 'start' => 0, 'end' => 0 ), array( 'member_id', 'ctime' ), 'spam' );
$chart->groupBy = 'member_id';
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_moderator_activity_title');
$chart->availableTypes = array( 'LineChart', 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->tableParsers = array(
'ctime' => function( $val )
{
return (string) \IPS\DateTime::ts( $val );
}
);
/* Didn't find any specified? Do the default of the top 50 moderators */
$where = array();
if ( $chart->start instanceof \IPS\DateTime or $chart->end instanceof \IPS\DateTime )
{
$start = $chart->start instanceof \IPS\DateTime ? $chart->start->getTimestamp() : 0;
$end = $chart->end instanceof \IPS\DateTime ? $chart->end->getTimestamp() : time();
$where[] = array( 'ctime BETWEEN ? AND ?', $start, $end );
}
/* Get actual moderators */
$modMember = [];
$modGroup = [];
foreach ( \IPS\Db::i()->select( '*', 'core_moderators' ) as $mod )
{
if ( $mod['type'] == 'g' )
{
$modGroup[] = $mod['id'];
}
else
{
$modMember[] = $mod['id'];
}
}
$query = [];
if ( \count( $modGroup ) )
{
$query[] = \IPS\Db::i()->in( 'member_group_id', $modGroup );
$query[] = \IPS\Db::i()->findInSet( 'mgroup_others', $modGroup );
}
if ( \count( $modMember ) )
{
$query[] = \IPS\Db::i()->in( 'member_id', $modMember );
}
/* I mean $query should never be empty, but lets not wait for a ticket and have to release a patch to find out that it could be... */
if ( \count( $query ) )
{
$where[] = [ 'member_id IN(?)', \IPS\Db::i()->select( 'member_id', 'core_members', implode( ' OR ', $query ) ) ];
}
$topModerators = \IPS\Db::i()->select( 'member_id, COUNT(*) as _mod_count', 'core_moderator_logs', $where, '_mod_count DESC', 50, array( 'member_id' ) );
foreach ( $topModerators as $moderatorRow )
{
$member = \IPS\Member::load( $moderatorRow['member_id'] );
$chart->addSeries(
( $member->member_id ) ? $member->name : \IPS\Member::loggedIn()->language()->addToStack( 'deleted_member' ),
'number',
'COUNT(*)',
TRUE,
$moderatorRow['member_id']
);
}
if ( \IPS\Request::i()->isAjax() )
{
\IPS\Output::i()->output = (string) $chart;
\IPS\Output::i()->output = (string) \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Moderators' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=moderators' ) );
}
else
{
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_moderators');
\IPS\Output::i()->output = (string) $chart;
\IPS\Output::i()->output = (string) \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Moderators' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=moderators' ) );
}
}
}
@@ -58,56 +58,7 @@ class _onlineusers extends \IPS\Dispatcher\Controller
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('prunesettings') )
);
/* Determine minimum date */
$minimumDate = NULL;
if( \IPS\Settings::i()->stats_online_users_prune )
{
$minimumDate = \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->stats_online_users_prune . 'D' ) );
}
/* We can't retrieve any stats prior to the new tracking being implemented */
try
{
$oldestLog = \IPS\Db::i()->select( 'MIN(time)', 'core_statistics', array( 'type=?', 'online_users' ) )->first();
if( !$minimumDate OR $oldestLog < $minimumDate->getTimestamp() )
{
$minimumDate = \IPS\DateTime::ts( $oldestLog );
}
}
catch( \UnderflowException $e )
{
/* We have nothing tracked, set minimum date to today */
$minimumDate = \IPS\DateTime::create();
}
$chart = new \IPS\Helpers\Chart\Callback(
\IPS\Http\Url::internal( 'app=core&module=stats&controller=onlineusers' ),
array( $this, 'getResults' ),
'',
array(
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'colors' => array( '#10967e', '#ea7963' ),
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
),
'AreaChart',
'none',
array( 'start' => \IPS\DateTime::ts( time() - ( 60 * 60 * 24 * 30 ) ), 'end' => \IPS\DateTime::create() ),
'',
$minimumDate
);
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('members'), 'number' );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('guests'), 'number' );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_onlineusers_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->showIntervals = FALSE;
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'OnlineUsers' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=onlineusers" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_onlineusers');
\IPS\Output::i()->output = (string) $chart;
}
@@ -132,50 +83,4 @@ class _onlineusers extends \IPS\Dispatcher\Controller
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('prunesettings');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('global')->block( 'prunesettings', $form, FALSE );
}
/**
* Fetch the results
*
* @param \IPS\Helpers\Chart\Callback $chart Chart object
* @return array
*/
public function getResults( $chart )
{
$where = array( array( 'type=?', 'online_users' ), array( "time>?", 0 ) );
if ( $chart->start )
{
$where[] = array( "time>?", $chart->start->getTimestamp() );
}
if ( $chart->end )
{
$where[] = array( "time<?", $chart->end->getTimestamp() );
}
$results = array();
foreach( \IPS\Db::i()->select( '*', 'core_statistics', $where, 'time ASC' ) as $row )
{
if( !isset( $results[ $row['time'] ] ) )
{
$results[ $row['time'] ] = array(
'time' => $row['time'],
\IPS\Member::loggedIn()->language()->get('members') => 0,
\IPS\Member::loggedIn()->language()->get('guests') => 0
);
}
if( $row['value_4'] == 'members' )
{
$results[ $row['time'] ][ \IPS\Member::loggedIn()->language()->get('members') ] = $row['value_1'];
}
if( $row['value_4'] == 'guests' )
{
$results[ $row['time'] ][ \IPS\Member::loggedIn()->language()->get('guests') ] = $row['value_1'];
}
}
return $results;
}
}
@@ -46,25 +46,7 @@ class _points extends \IPS\Dispatcher\Controller
*/
protected function manage()
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=points' ), 'core_points_log', 'datetime', '', array(
'isStacked' => FALSE,
'backgroundColor' => '#ffffff',
'colors' => array( '#10967e', '#ea7963', '#de6470', '#6b9dde' ),
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'AreaChart', 'daily' );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_points_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->enableHourly = FALSE;
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_member_points'), 'number', 'SUM(points)', TRUE );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_points_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->showIntervals = TRUE;
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Points' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=points" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_points');
\IPS\Output::i()->output = (string) $chart;
}
@@ -45,66 +45,20 @@ class _preferences extends \IPS\Dispatcher\Controller
'theme' => 'stats_member_pref_theme',
'lang' => 'stats_member_pref_lang',
);
\IPS\Request::i()->tab ??= 'lang';
$activeTab = ( isset( \IPS\Request::i()->tab ) and array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'lang';
switch( $activeTab )
{
case 'theme':
$chart = new \IPS\Helpers\Chart;
$counts = iterator_to_array( \IPS\Db::i()->select( 'skin, COUNT(member_id) as count', 'core_members', array( "skin > ?", 0), NULL, NULL, "skin" )->setKeyField( 'skin' ) );
$chart->addHeader( "theme", "string" );
$chart->addHeader( \IPS\Member::loggedIn()->language()->get('chart_members'), "number" );
foreach( $counts as $id => $theme )
{
$chart->addRow( array( \IPS\Member::loggedIn()->language()->addToStack('core_theme_set_title_' . $id ), $theme['count'] ) );
}
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Theme' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=preferences&tab=theme" ) );
break;
case 'lang':
$chart = new \IPS\Helpers\Chart;
$counts = iterator_to_array( \IPS\Db::i()->select( 'language, COUNT(member_id) as count', 'core_members', array( "language > ?", 0), NULL, NULL, "language" )->setKeyField( 'language' ) );
$chart->addHeader( "language", "string" );
$chart->addHeader( \IPS\Member::loggedIn()->language()->get('chart_members'), "number" );
/* We need to make sure the language exists - otherwise apply the count to the default language. */
$rows = [];
foreach( $counts as $id => $lang )
{
try
{
$l = \IPS\Lang::load( $id );
if ( !isset( $rows[ $id ] ) )
{
$rows[ $id ] = array( 'title' => $l->title, 'count' => 0 );
}
$rows[ $id ]['count'] += $lang['count'];
}
catch( \OutOfRangeException $e )
{
if ( !isset( $rows[ \IPS\Lang::defaultLanguage() ] ) )
{
$rows[ \IPS\Lang::defaultLanguage() ] = array( 'title' => \IPS\Lang::load( \IPS\Lang::defaultLanguage() )->title, 'count' => 0 );
}
$rows[ \IPS\Lang::defaultLanguage() ]['count'] += $lang['count'];
}
}
/* Now add the rows to the chart */
foreach( $rows AS $row )
{
$chart->addRow( array( $row['title'], $row['count'] ) );
}
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Language' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=preferences&tab=lang" ) );
break;
}
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_' . $activeTab . '_title');
$chart = $chart->render('PieChart', array(
'backgroundColor' => '#ffffff',
'pieHole' => 0.4,
@@ -46,26 +46,7 @@ class _rankprogression extends \IPS\Dispatcher\Controller
*/
protected function manage()
{
$chart = new \IPS\Helpers\Chart;
$chart->addHeader( "Rank", 'string' );
$chart->addHeader( "Days", 'number' );
$data = \IPS\Db::i()->select( 'new_rank, AVG(time_to_new_rank) as time_to_rank', 'core_points_log', array('time_to_new_rank IS NOT NULL'), 'core_member_ranks.points ASC', NULL, ['new_rank'] );
$data->join( 'core_member_ranks', 'core_member_ranks.id = core_points_log.new_rank' );
foreach ( $data as $row )
{
try
{
$rank = \IPS\core\Achievements\Rank::load( $row['new_rank'] );
}
catch ( \Exception $e )
{
continue;
}
$chart->addRow( array( $rank->_title, floor( $row['time_to_rank'] / 86400 ) ) );
}
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'RankProgression' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=rankprogression" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_rankprogression');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'stats' )->rankprogressionmessage();
\IPS\Output::i()->output .= $chart->render( 'ScatterChart', array(
@@ -41,23 +41,8 @@ class _registrationstats extends \IPS\Dispatcher\Controller
{
/* Check permission */
\IPS\Dispatcher::i()->checkAcpPermission( 'registrations_manage', 'core', 'stats' );
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=registrationstats' ), 'core_members', 'joined', '', array(
'isStacked' => FALSE,
'backgroundColor' => '#ffffff',
'colors' => array( '#10967e' ),
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
) );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('stats_new_registrations'), 'number', 'COUNT(*)', FALSE );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_registrations_title');
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
/* fetch only successful registered members ; if this needs to be changed, please review the other areas where we have the name<>? AND email<>? condition */
$chart->where[] = array( 'completed=?', true );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_registrationstats');
\IPS\Output::i()->output = (string) $chart;
\IPS\Output::i()->output = (string) \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Registrations' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=registrationstats' ) );
}
}
+1 -25
View File
@@ -47,31 +47,7 @@ class _spam extends \IPS\Dispatcher\Controller
*/
protected function manage()
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=spam' ), 'core_spam_service_log', 'log_date', '', array(
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'LineChart', 'monthly', array( 'start' => 0, 'end' => 0 ), array( 'log_code', 'log_date' ), 'spam' );
$chart->groupBy = 'log_code';
foreach( array( 1,2,3,4 ) as $v )
{
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('spam_service_action_stats_' . $v ), 'number', 'COUNT(*)', TRUE, $v );
}
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_spam_title');
$chart->availableTypes = array( 'LineChart', 'AreaChart', 'ColumnChart', 'BarChart' );
$chart->tableParsers = array(
'log_date' => function( $val )
{
return (string) \IPS\DateTime::ts( $val );
}
);
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'Spam' )->getChart( \IPS\Http\Url::internal( "app=core&module=stats&controller=spam" ) );
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_stats_spam');
\IPS\Output::i()->output = (string) $chart;
@@ -51,52 +51,19 @@ class _warnings extends \IPS\Dispatcher\Controller
'reason' => 'stats_warnings_reason',
'suspended' => 'stats_warnings_suspended',
);
$activeTab = ( isset( \IPS\Request::i()->tab ) and array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'reason';
/* Make sure tab is set, otherwise saved charts may not show up when loading the page. */
\IPS\Request::i()->tab ??= 'reason';
$activeTab = ( array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'reason';
if ( $activeTab === 'reason' )
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=warnings&tab=' . $activeTab ), 'core_members_warn_logs', 'wl_date', '', array(
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'LineChart', 'monthly', array( 'start' => 0, 'end' => 0 ), array( 'wl_reason', 'wl_date' ), 'warnings' );
$chart->groupBy = 'wl_reason';
foreach( \IPS\core\Warnings\Reason::roots() as $reason )
{
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('core_warn_reason_' . $reason->id ), 'number', 'COUNT(*)', TRUE, $reason->id );
}
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_warnings_title');
$chart->availableTypes = array( 'LineChart', 'AreaChart', 'ColumnChart', 'BarChart' );
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'WarningReasons' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=warnings&tab=reason' ) );
}
else if ( $activeTab === 'suspended' )
{
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=core&module=stats&controller=warnings&tab=' . $activeTab ), 'core_members_warn_logs', 'wl_date', '', array(
'isStacked' => TRUE,
'backgroundColor' => '#ffffff',
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
'lineWidth' => 1,
'areaOpacity' => 0.4
), 'LineChart', 'monthly', array( 'start' => 0, 'end' => 0 ), array( 'wl_reason', 'wl_date' ), 'warnings' );
$chart->where = array( 'wl_suspend IS NOT NULL' );
$chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('suspended' ), 'number', 'COUNT(*)', TRUE );
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('stats_warnings_title');
$chart->availableTypes = array( 'LineChart', 'AreaChart', 'ColumnChart', 'BarChart' );
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'WarningSuspended' )->getChart( \IPS\Http\Url::internal( 'app=core&module=stats&controller=warnings&tab=suspended' ) );
}
$chart->tableParsers = array(
'wl_date' => function( $val )
{
return (string) \IPS\DateTime::ts( $val );
}
);
if ( \IPS\Request::i()->isAjax() )
{