Is it possible to hide the display of awards from Main Activity but keep it on user activity?
Just did a dirty hack, not the best but it does the job.
1) Edit the Activity model ./applications/dashboard/models/class.activitymodel.php
public function getWhere($where = [], $orderFields = '', $orderDirection = '', $limit = false, $offset = false, $hidemain = 0) {
2) check the activity id of BadgeAward and RankPromotion
3) edit Applications/dashboard/models/class.activitymodel.php
foreach ($where as $key => $value) { if (strpos($key, '.') === false) { $where['a.'.$key] = $value; unset($where[$key]); } } $result = $this->SQL ->where($where) ->orderBy($orderFields, $orderDirection) ->limit($limit, $offset); //added this "if" check to exclude the activity ids if($hidemain){ $result->where('a.ActivityTypeID <>', 32); $result->where('a.ActivityTypeID <>', 33); } $result = $result->get(); self::getUsers($result->resultArray());
4) edit the activity controller ./applications/dashboard/controllers/class.activitycontroller.php
if ($this->Head) { $this->Head->addRss(url('/activity/feed.rss', true), $this->Head->title()); } // Comment submission $session = Gdn::session(); $comment = $this->Form->getFormValue('Comment'); //comment the original //$activities = $this->ActivityModel->getWhere(['NotifyUserID' => $notifyUserID], '', '', $limit, $offset)->resultArray(); $activities = $this->ActivityModel->getWhere(['NotifyUserID' => $notifyUserID], '', '', $limit, $offset, 1)->resultArray(); $this->ActivityModel->joinComments($activities);
Comments
Just did a dirty hack, not the best but it does the job.
1) Edit the Activity model ./applications/dashboard/models/class.activitymodel.php
public function getWhere($where = [], $orderFields = '', $orderDirection = '', $limit = false, $offset = false, $hidemain = 0) {
2) check the activity id of BadgeAward and RankPromotion
3) edit Applications/dashboard/models/class.activitymodel.php
4) edit the activity controller ./applications/dashboard/controllers/class.activitycontroller.php