NP_MembersOnline

Please take a look at NP_Online if you search for this function.

This plugin shows member names when they are online. It requires NP_Online to work properly.

General Plugin info
Author: Rodrigo Moraes
Current Version: 1.0
Download: -
Code: code
Demo: -
Forum Thread: forum thread

Code

Here's the code:

<?php 
class NP_MembersOnline extends NucleusPlugin { 
 
    /* Plugin data to be shown on the plugin list */
 
    function getName() { return 'Members Online'; } 
    function getAuthor() { return 'Rodrigo Moraes'; } 
    function getURL()  { return 'http://www.tipos.com.br/'; } 
    function getVersion() { return '1.0'; } 
    function supportsFeature($SqlTablePrefix) {	return 1; }
    function getDescription() {  
        return 'Show member names when they are online.'; 
    } 
 
    function doSkinVar($skinType) { 
        global $manager, $blog, $CONF, $REMOTE_ADDR;  
$conta = 1;
$query = "SELECT DISTINCT member FROM nucleus_plugin_online WHERE member !='0' and id='0'";
$res = mysql_query($query);
echo "<strong>members online:</strong> ";
while($row = mysql_fetch_object($res)) { 
$memberid = $row->member;
$query2 = "SELECT mname FROM nucleus_member WHERE mnumber = $memberid";
$res2 = mysql_query($query2);
$row = mysql_fetch_object($res2);
$membername = $row->mname;
// primeiro membro mostrado
if ($conta == 1){ 
echo $membername;
$conta++; }
// membros seguintes ganham uma v�rgula para separar...
else { echo ", ".$membername;}
}
} 
}
?>

Go to this forum thread for more info about this plugin.

membersonline.txt · Last modified: 2007/11/17 22:58 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki