Well so far here is what i have, im close i think but its not showing the total value integer..
THIS IS NOT WORKING YET SO PLEASE DONT USE THIS YET...
I am beginning to understand why they didnt do this. Most everything other than group listing, create, edit group and users is done on the forum plugin side. So in order to show the total i have to either call or move functions from forum side to group side... But i will get this done i hope before i give up...
If anyone would like to help i would welcome it... thanks
I think the problem might be in the params set up or the example function process not sure yet.
SEE THE DB ERROR IMAGE BELOW...
But here is what i have so far.
php files modded:
So working backwards it all starts at the dao i believe..
groups/bol/groups_group.dao.php
ADDED THIS:
// group list total topic mod start
/**
* Returns forum group's topic count
*
* @param int
* @return int $groupId
*/
public function findGroupTopicCount( $groupId )
{
$example = new OW_Example();
$example->andFieldEqual('groupId', (int) $groupId);
return $this->countByExample($example);
}
// group list total topic mod end
And then service php calls the dao function
service.php
ADDED
// group list total topic mod start
/**
* Returns group's topic count
*
* @param int $groupId
* @return int
*/
public function getGroupTopicCount( $groupId )
{
return $this->groupDao->findGroupTopicCount($groupId);
}
// group list total topic mod end
ow_plugins/groups/components/groups_widget.php
inside the private function assignList
AFTER:
'users' => $userCountList[$item->id]
);
ADDED THIS:
// group list total topic mod start
$GtopicCount = 0;
$GtopicCount = $this->service->getGroupTopicCount($item->id); //(GIVES ME DB ERROR CANT FIND groupId)
$this->assign('GtopicCount', $GtopicCount);
// group list total topic mod end
And then the controller sets the value in smarty for html usage
ow_plugins/groups/controllers/groups.php
inside the function mostPopularList (i know i have to add this also to the other list functions but i wont until i get this working)
AFTER THIS:
$listCount = $this->service->findGroupListCount(GROUPS_BOL_Service::LIST_MOST_POPULAR);
ADDED THIS:
// group list total topic mod start
$groupId = (int) $params['groupId'];
$GtopicCount = $this->service->getGroupTopicCount($groupId); //ALSO GIVES ME DB ERROR CANT FIND groupId
$this->assign('GtopicCount', $GtopicCount);
// group list total topic mod end
HTML MODS
/ow_plugins/groups/views/controllers/groups_list.html (groups menu display)
inside the foreach loop added this
<!-- group list total topic mod start -->
<div style="padding-left:65px;"># total topics {$GtopicCount}<br /><br /></div>
<!-- group list total topic mod end -->
componets/groups_widget.html (this is for the main page display widget)
in two places after displays the member totals for the group, so:AFTER THIS: 2X{text key="groups+listing_users_label" count=$item.users}
ADDED THIS
<!-- group list total topic mod start -->
# total topics {$GtopicCount}
<!-- group list total topic mod end -->
Note: I will do a lang key or make the text look better when im done.