"Who is online" plugin (onlinestats) - Page 16 "Who is online" plugin (onlinestats) - Page 16
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

"Who is online" plugin (onlinestats)

Started by Joachim Müller, January 16, 2006, 02:34:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SimonH

I am confused with something, I have set it up to show users online in the last 3o mins, but i got another member to login and yes i could see him, but then he logged out and i logged in, then it only showed me as being online in the last 30 mins, when it should of shown us both?? any help appreciated

Nibbler

That's not how the plugin works. When you logout you are no longer online. The timeout is for people who do not logout. They are presumed to be offline after 30 minutes of inactivity. I think there is another mod that does what you want though.

SimonH

Thanks for your swift reply, I dont understand why you have users online in the last 30mins etc.. there then? surely it should still show them even if they log out, providing they are still with the timescale that was setup when it was installed, in my case i set it to 30mins...

Nibbler

I didn't - someone else added that message. I was describing how the code actually works.

hgl

Hi Sir

Could you please tell me how to hide the online state when the manager online

I am look forward to receiving your reply soon

Many Thanks

Blain

Greetings Nibbler, thanks for the fantastic, appealing plugin here. Well done.

I am having an issue with installing the plugin. I am receiving this error after pressing the install button:

Fatal error: require() [function.require]: Failed opening required './plugins/onlinestats/include/init.inc.php' (include_path='.:/usr/lib/php') in /home/fakirsso/public_html/plugins/onlinestats/codebase.php on line 46

Have you any idea on any suggestions to fix this.

----------

Thank you,

Joachim Müller

The error complains about a missing file? Is the file there and accessible? Do as suggested per board rules and post a link to your gallery.

antonio_just

Hi,

When i try to install this plugin appear the error msg:

Fatal error: require() [function.require]: Failed opening required './plugins/onlinestats/include/init.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jcacoweb/public_html/plugins/onlinestats/codebase.php on line 46

Why?

Thks

Antonio

Joachim Müller

Because you haven't uploaded all files. Upload/Install as suggested in the docs, second option.

antonio_just

Hello,

Why the script dont show me the last 10 minutes the users have in the web page?

$lang_plugin_onlinestats_config = array(
'config_text'        =>'How long do you want to keep users listed as online for before they are assumed to have gone ?',
'minute'        =>' Minutes',
'remove'        =>'Remove the table that was used to store online data ?',
'yes'                =>'Yes',
'no'                =>'No',
);
$lang_plugin_onlinestats_date_fmt='%A, %B.%d.%Y at %H:%M';
?>



What is wrong?when the user logout, dont keep in the last users listed as online for before they are assumed to have gone  users !!

Help!!!!!

Thks for the help

Antonio

antonio_just



This is the code i have:

function online_page_start()

{

        global $raw_ip, $CONFIG;



        $CONFIG['TABLE_ONLINE'] = $CONFIG['TABLE_PREFIX']."mod_online";



        $user_id = USER_ID;

        $user_name = USER_NAME;



        if (defined('LOGIN_PHP')){

                cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE user_id = 0 AND user_ip = '$raw_ip'");

                return;

        }



        if (defined('LOGOUT_PHP')){

                cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE user_id = $user_id");

                return;

        }



        cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE last_action < NOW() - INTERVAL {$CONFIG['mod_updates_duration']} MINUTE");







        if ($user_id) {

                cpg_db_query("REPLACE INTO {$CONFIG['TABLE_ONLINE']} (user_id, user_name, user_ip, last_action) VALUES ('$user_id', '$user_name', '$raw_ip', NOW())");



        } else{

                $testarray = explode('.',$raw_ip);

                $teststr = $testarray[0] . '.' . $testarray[1];

                $sel = cpg_db_query("SELECT user_ip FROM {$CONFIG['TABLE_ONLINE']} WHERE user_ip LIKE '$teststr%'");

                $res = mysql_fetch_row($sel);

                $result = $res[0];



                if (mysql_num_rows($sel)){

                        cpg_db_query("UPDATE {$CONFIG['TABLE_ONLINE']} SET last_action = NOW() WHERE user_ip = '$result' LIMIT 1");

                } else {

                        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ONLINE']} (user_id, user_name, user_ip, last_action) VALUES ('$user_id', '$user_name', '$raw_ip', NOW())");

                }


Help,

Thks,

Antonio

antonio_just

Quote from: antonio_just on July 13, 2009, 02:50:37 PM

This is the code i have:

function online_page_start()

{

        global $raw_ip, $CONFIG;



        $CONFIG['TABLE_ONLINE'] = $CONFIG['TABLE_PREFIX']."mod_online";



        $user_id = USER_ID;

        $user_name = USER_NAME;



        if (defined('LOGIN_PHP')){

                cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE user_id = 0 AND user_ip = '$raw_ip'");

                return;

        }



        if (defined('LOGOUT_PHP')){

                cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE user_id = $user_id");

                return;

        }



        cpg_db_query("DELETE FROM {$CONFIG['TABLE_ONLINE']} WHERE last_action < NOW() - INTERVAL {$CONFIG['mod_updates_duration']} MINUTE");







        if ($user_id) {

                cpg_db_query("REPLACE INTO {$CONFIG['TABLE_ONLINE']} (user_id, user_name, user_ip, last_action) VALUES ('$user_id', '$user_name', '$raw_ip', NOW())");



        } else{

                $testarray = explode('.',$raw_ip);

                $teststr = $testarray[0] . '.' . $testarray[1];

                $sel = cpg_db_query("SELECT user_ip FROM {$CONFIG['TABLE_ONLINE']} WHERE user_ip LIKE '$teststr%'");

                $res = mysql_fetch_row($sel);

                $result = $res[0];



                if (mysql_num_rows($sel)){

                        cpg_db_query("UPDATE {$CONFIG['TABLE_ONLINE']} SET last_action = NOW() WHERE user_ip = '$result' LIMIT 1");

                } else {

                        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ONLINE']} (user_id, user_name, user_ip, last_action) VALUES ('$user_id', '$user_name', '$raw_ip', NOW())");

                }


Help,

Thks,

Antonio

Any help please,

Antonio

antonio_just

Any sugestions? can be possible , nobody help me  :( :( :( :'(

Joachim Müller

Stop it, will you? Posting four times in a row is not a bright idea. Start a thread of your own on the support board, doing as suggested per board rules (posting a link to your page etc.).

antonio_just

Quote from: Joachim Müller on July 14, 2009, 06:27:15 PM
Stop it, will you? Posting four times in a row is not a bright idea. Start a thread of your own on the support board, doing as suggested per board rules (posting a link to your page etc.).

Thks for nothing.

Your reply need to do more fast not before my 4 posts .

Bye,

Antonio

tjiepie

Great plugin

Is there a option for protection the server.

Example:
if we have 50users online, board will close for more members.
(protection high server load and protetion for time outs)




Joachim Müller

Such an option is not built into this plugin, no.

tjiepie


Joachim Müller

I have no idea if it's easy for you or hard, as this depends on your skills. Find it out by looking at the existing code. But judging from your questions I rather guess it's impossible for you. In fact it's something completely else as what this plugin is designed to do. Tracking your users through the entire site is not trivial.
Instead of worrying about a tool that keeps out the visitors of your site I suggest moving to a more powerfull server that can handle the load. Everything else is crap.
Anyway, your issue should not be discussed further in this thread, as it's completely unrelated. You haven't even done as suggested per board rules, so keep out of this thread. Start a fresh thread of your own inside the support board instead, doing exactly as suggested per board rules if you need more support.

Bash

How would I go about making a tag for this plugin so it can be added anywhere in template.html? Could someone point me in the right direction or pass on the info if they're already done it? Thanks in advance.