Users Online Today - Page 2 Users Online Today - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Users Online Today

Started by Sami, August 22, 2006, 06:51:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dke

#20
I have some questions.

1. Is it possible to hide the admin user in the online list?
2. Is it possible to remove the online stats on the other "index" pages like if i click a category it will go to index.php?cat=XX i will still see the users online table.

Thank you for the good modification :)

Sami

Quote from: dke on January 05, 2008, 01:58:29 AM
1. Is it possible to hide the admin user in the online list?
Yes , edit codebase.php around line #66
change this

$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%'");

With this

$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%' AND user_group <> 1");


Quote from: dke on January 05, 2008, 01:58:29 AM
2. Is it possible to remove the online stats on the other "index" pages like if i click a category it will go to index.php?cat=XX i will still see the users online table.
Yes you can check $_SERVER['QUERY_STRING'] and if it was null then show the online users table
something like this

$qs = $_SERVER['QUERY_STRING']
if(!$qs){
starttable("100%", "Users Online Today ($total users)");

echo '<tr><td class="tableb">';
echo "{$online_today}</td></tr>";

endtable();
}
‍I don't answer to PM with support question
Please post your issue to related board

dke

#22
Quote from: Sami on January 05, 2008, 06:27:26 AM
Yes , edit codebase.php around line #66
change this

$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%'");

With this

$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%' AND user_group <> 1");


Thank you, this worked perfectly!

Quote
Yes you can check $_SERVER['QUERY_STRING'] and if it was null then show the online users table
something like this

$qs = $_SERVER['QUERY_STRING']
if(!$qs){
starttable("100%", "Users Online Today ($total users)");

echo '<tr><td class="tableb">';
echo "{$online_today}</td></tr>";

endtable();
}


I don't fully understand how to find the correct query to replace "SERVER_STRING" or am i doing it wrong?

I get a error message when i use your code "untouched" : Parse error: syntax error, unexpected T_IF in plugins\online_today\codebase.php on line 90

I'm no coder as you might understand :)

Thank you for support!



Nibbler

You need a semi-colon at the end of each statement in PHP, so

$qs = $_SERVER['QUERY_STRING'];

dke

Quote from: Nibbler on January 05, 2008, 03:45:16 PM
You need a semi-colon at the end of each statement in PHP, so

$qs = $_SERVER['QUERY_STRING'];

Thanks, now i get another message: Parse error: syntax error, unexpected $end in plugins\online_today\codebase.php on line 102

Any idea?

just_some_guy

You might be missing a curly brace, just add one of these at the end - that might fix it. }
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

dke

#26
Quote from: just_some_guy on January 05, 2008, 04:31:53 PM
You might be missing a curly brace, just add one of these at the end - that might fix it. }

I have one of those, i'm not sure if its correctly placed.

This is the code that generates error:

$qs = $_SERVER['QUERY_STRING'];
if(!$qs){

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Users online today</b></td></tr>';
echo '<td class="tableb">';
echo "{$online_today}</td>";

endtable();

}
?>


Anything wrong with it?

EDIT:

Managed to solve this my self, apparently i needed 2 curly braces? This code worked for me:

$qs = $_SERVER['QUERY_STRING'];
if(!$qs){

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Users online today</b></td></tr>';
echo '<td class="tableb">';
echo "{$online_today}</td>";

endtable();
}
}
?>


Thank you guys for all the help!

Sami

Sorry for missed semi-colon I didn't test that !
‍I don't answer to PM with support question
Please post your issue to related board

haosev

www . vietnamshare.net < Free download ebooks 100%, Links direct...
www . tinhocbacninh.net < Photo gallery Vietnam, Vietnam tour gallery...

Fabricio Ferrero

Spanish file attached...
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

fran86

Sorry, im probably not allowed to post here now but i have no clue where the new version is! Searched but i kept getting leading to this 2006 one, and its not even a zip so i cant install it.

Can anyone help me?!

Thankyou.

Fabricio Ferrero

This is the newest and oldest version. ;D There is not another version of this plugin.

Quoteand its not even a zip so i cant install it.
Login and go to the first post. Just below you will find the file zipped. Download it and installed as any plugin.

Regards,
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

fran86

Quote from: fabri on October 18, 2008, 05:59:34 AM
This is the newest and oldest version. ;D There is not another version of this plugin.
Login and go to the first post. Just below you will find the file zipped. Download it and installed as any plugin.

Regards,

Thanks hun, must of missed that! Lol! Installed and works  ;D

Deus

Quote from: m@rk on December 29, 2006, 04:03:39 PM
I made a modification and permit to name it v1.1.

Modifications:


  • Internationalisation (languages English, German included)
  • Layout modification
  • Links to user profiles only for members
  • Display Your IP and ISP

Nice additions M@rk, I'd just like to know, is there a way of displaying all Ip's but to the admin only?
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

Criss

Quote from: Deus on January 10, 2009, 02:39:09 PM
Nice additions M@rk, I'd just like to know, is there a way of displaying all Ip's but to the admin only?


Yes, I'd like to know it too, please.

Joachim Müller

The plugin does what it does. If you need additional features, you'll have to code them in. There's no point in repeating the request of others that went unanswered in the first place.

Criss

Whatever. You bitch more than help.

Exal

Hereby attached the spanish.php

Toaster!77

Quote from: Sami on December 17, 2006, 06:59:08 AM
- Create a custom table like xxx_uotlog
- Run custom Mysql query at authentication to add some user info to xxx_uotlog

hi guys,

can anyone give me an detail manual how to change that?
i'm bot realy a programmer so i dont understand what todo :)

thanks in advance

Markus

Joachim Müller

That piece of advice was aimed at a programmer. If you can't come up with the code to create a table, you won't be able to come up the rest of the code needed neither. If you need documentation how to create database tables using the programming language PHP, you could look at the PHP documentation itself at http://www.php.net/manual/en/ref.mysql.php, but that won't help if you're not a coder.
I'm sorry, but it's beyond the scope of this forum to teach you how to code. To use this plugin, you don't need any particular coding skills nor do you have to perform the actions you quoted - just use the plugin as it is, as suggested in the initial posting. If you need actual help, do as suggested per board rules.