Initial commit
This commit is contained in:
commit
43ad32700c
7085 changed files with 447606 additions and 0 deletions
22
modules/chatusers/chatusers.ajax.php
Normal file
22
modules/chatusers/chatusers.ajax.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("Chatusers Module", FALSE);
|
||||
include '../modules/chat/chatfunctions.inc.php';
|
||||
class chatusers extends ajax_module{
|
||||
|
||||
function ajax(){
|
||||
global $module,$config,$db,$cache, $session;
|
||||
$data=chat_online();
|
||||
if ($data["chat_offline"]===true){
|
||||
echo "offline";
|
||||
return;
|
||||
}else{
|
||||
echo $data['usercount'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
30
modules/chatusers/chatusers.module.php
Normal file
30
modules/chatusers/chatusers.module.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
class module_chatusers extends admin_module{
|
||||
|
||||
function admin_panels(){
|
||||
return "";
|
||||
}
|
||||
|
||||
function get_info(){
|
||||
$info["name"]="Chatusers AJAX";
|
||||
$info["file"]="chatusers";
|
||||
$info["author"]="genuineparts";
|
||||
$info["version"]="1.0.0";
|
||||
$info["url"]="http://www.ponytopia.net";
|
||||
$info["depends"]='chat';
|
||||
return $info;
|
||||
}
|
||||
|
||||
function install(){
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function uninstall(){
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
33
modules/chatusers/chatusers.plugins.php
Normal file
33
modules/chatusers/chatusers.plugins.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
class plugins_chatusers{
|
||||
|
||||
function register_plugins(& $plugin){
|
||||
$plugin->use_hook('frontpage_start',array($this,"chatuser_refresh"));
|
||||
}
|
||||
|
||||
function chatuser_refresh(){
|
||||
global $db, $config, $footer;
|
||||
$footer .= "<script type=\"text/javascript\">
|
||||
<!--
|
||||
function chatusers()
|
||||
{
|
||||
$.ajax({
|
||||
url: \"/ajax.php?task=chatusers\",
|
||||
timeout: 1000,
|
||||
success: function(data) {
|
||||
$('.odometer').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
chatusers();
|
||||
setInterval(\"chatusers()\",60000);
|
||||
// -->
|
||||
</script>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue