Ejemplo n.º 1
0
 public function statsAction()
 {
     $this->view->threads = Posts::count();
     $this->view->replies = Posts::sum(array('column' => 'number_replies'));
     $this->view->votes = Posts::sum(array('column' => 'votes_up + votes_down'));
     $this->view->users = Users::count();
     $this->view->karma = Users::sum(array('column' => 'karma'));
     $this->view->notifications = Notifications::count();
     $this->view->unotifications = ActivityNotifications::count();
     $this->view->views = Posts::sum(array('column' => 'number_views'));
     $this->view->irc = IrcLog::count();
 }
Ejemplo n.º 2
0
 public function statsAction()
 {
     $this->breadcrumbs->add('Help', '/help')->add('Statistics', '/help/stats', ['linked' => false]);
     $this->tag->setTitle("Statistics");
     $this->view->setVars(['threads' => Posts::count(), 'replies' => Posts::sum(['column' => 'number_replies']), 'votes' => Posts::sum(['column' => 'votes_up + votes_down']), 'users' => Users::count(), 'karma' => Users::sum(['column' => 'karma']), 'notifications' => Notifications::count(), 'unotifications' => ActivityNotifications::count(), 'views' => Posts::sum(['column' => 'number_views']), 'irc' => IrcLog::count()]);
 }