10447 Posts in 2223 Topics by 1719 members
| Go to End | ||
| Author | Topic: | 4715 Views |
-
Re: AJAX chat (instant messaging) module/widget

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.
-
Re: AJAX chat (instant messaging) module/widget

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. -
Re: AJAX chat (instant messaging) module/widget

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.
-
Re: AJAX chat (instant messaging) module/widget

3 February 2010 at 12:00am
thanx for the fix!
Is the chat module now working for you?
| 4715 Views | ||
| Go to Top |


