Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

AJAX chat (instant messaging) module/widget


Go to End


12 Posts   7048 Views

Avatar
rino

Community Member, 12 Posts

26 January 2010 at 9:56pm

hello baba-papa :)

unfortunately, i haven't been able to test my module thoroughly on the latest version 2.3.x...

for the problem with the missing function "currentlyOnline" i have a solution, just add this to your Page class:

	/**
	 * Get a list of currently online users (last 15 minutes)
	 * @return Member Array
	 */
	public function currentlyOnline() {
		$currentlyonline = DataObject::get("Member", "LastVisited > (NOW() - INTERVAL 15 MINUTE)", "FirstName, Surname",
			"INNER JOIN Group_Members ON Group_Members.GroupID IN (1,2,3) AND Group_Members.MemberID = Member.ID");
		return $currentlyonline;
	}

}

this code i have copied from the forum module, if i'm not wrong... but you're right, i need to integrate that into the chat module instead asap.

Avatar
baba-papa

Community Member, 279 Posts

27 January 2010 at 5:26am

I added that method into the Page class. Isn´t that method supposed to be in the Controller? Why didn´t you call the method at it´s original lacation?
Meanwhile the chat module still doesnt work. I get an XML error when I try to call the chat page. Maybe me theme "holeinone" doesn´t work with the module.

Avatar
baba-papa

Community Member, 279 Posts

27 January 2010 at 5:42am

The template error was due to an error in the nested conditionals in the layout/ChatPage.ss tempate. I changed it and appended it to this post.

Avatar
rino

Community Member, 12 Posts

3 February 2010 at 12:00am

thanx for the fix!

Is the chat module now working for you?

Go to Top