939 Posts in 271 Topics by 291 members
Forum Module
SilverStripe Forums » Forum Module » Forum module in SilverStripe 3.1 beta
Discuss the Forum Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 421 Views |
-
Forum module in SilverStripe 3.1 beta

25 January 2013 at 12:00am
Hi all!
The forum module work with Silverstripe 3.1 beta?
It produces errors:
Fatal error: Class declarations may not be nested in C:\wamp\www\forum\code\ForumHolder.php on line 227 (SilverStripe 3.1 beta from github)
[User Error] Couldn't find field GroupID in any of Member's tables (SS 3.1 beta from github)Somebody has tried it with SS 3.1?
Is there any fix?
Thanks,
Regards,
Jose A. -
Re: Forum module in SilverStripe 3.1 beta

4 February 2013 at 11:35pm Last edited: 5 February 2013 6:53am
The same issue
fast and dirty solution is to replace 2 functions in ForumHolder.phpCurrentlyOnline()
function CurrentlyOnline() {
$groupIDs = array();
$where = '';
if($forumGroup = Group::get()->filter('Code', 'forum-members')->first()) {
//$groupIDs[] = $forumGroup->ID;
$where .= ' "GroupID" = \''.$forumGroup->ID.'\'';
}if($adminGroup = Group::get()->filter('Code', array('administrators', 'Administrators'))->first()) {
//$groupIDs[] = $adminGroup->ID;
if($where!=='') {$where .= ' OR';}
$where .= ' "GroupID" = \''.$adminGroup->ID.'\'';
}return Member::get()
->leftJoin('Group_Members', 'Member.ID = Group_Members.MemberID')
->where($where)
//->filter('GroupID', $groupIDs)
->filter("LastViewed:GreaterThan", DB::getConn()->datetimeIntervalClause('NOW', '-15 MINUTE'))
->sort('Member.FirstName, Member.Surname');
}and getLatestMembers()
function getLatestMembers($limit = 1) {
$groupIDs = array();
$where = '';
if($forumGroup = Group::get()->filter('Code', 'forum-members')->first()) {
//$groupIDs[] = $forumGroup->ID;
$where .= ' "GroupID" = \''.$forumGroup->ID.'\'';
}
if($adminGroup = Group::get()->filter('Code', array('administrators','Administrators'))->first()) {
//$groupIDs[] = $adminGroup->ID;
if($where!=='') {$where .= ' OR';}
$where .= ' "GroupID" = \''.$adminGroup->ID.'\'';
}
$latestMembers = Member::get()
->leftJoin('Group_Members', 'Member.ID = Group_Members.MemberID')
->where($where)
//->filter('GroupID', $groupIDs)
->sort('Member.ID DESC')
->limit($limit);return $latestMembers;
} -
Re: Forum module in SilverStripe 3.1 beta

24 April 2013 at 4:15am
Thanks for this hint, it helped me very much with SS 3.1 and the forums module.
| 421 Views | ||
|
Page:
1
|
Go to Top |



