Hi, ich will bei mir nicht
1 User Online
stehen haben sondern
User Online: 1
ich habe alle Dateien durchsucht und die DB aber ich finde es einfach nicht. Wo kann ich das ändern ?
User online ! Wo kann ich es ändern
Moderator: Thorsten
Hi,
suche mal in der functions.php die Funkltion userOnline(). Ändere dort die Zeile
in das hier:
bye
Thorsten
suche mal in der functions.php die Funkltion userOnline(). Ändere dort die Zeile
Code: Select all
return $alles.$msgUserOnline;
Code: Select all
return $msgUserOnline.": ".$alles;
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
I am changing this function to show me how many people have been in the FAQ today. I am new to php and have no idea it the "(time() - 3600)" is correct or not! How many minutes/hours is this?
Also, it would be very cool if I could do a real "Today" count - where I would go back to midnight today and count all the new session IDs. Is this possible?
Right now - The Today count goes up and down during the day
this is what I have:
Any help is very much appreciated 
I am changing this function to show me how many people have been in the FAQ today. I am new to php and have no idea it the "(time() - 3600)" is correct or not! How many minutes/hours is this?
Also, it would be very cool if I could do a real "Today" count - where I would go back to midnight today and count all the new session IDs. Is this possible?
Right now - The Today count goes up and down during the day

this is what I have:
Code: Select all
function userOnline() {
global $db, $sqltblpre, $tracking, $msgUserOnline;
if ($tracking) {
$timeToday = (time() - 3600);
$resultToday = $db->query("SELECT count(sid) FROM ".$sqltblpre."faqsessions WHERE time > '".$timeToday."' GROUP BY ip");
$timeNow = (time() - 300);
$result = $db->query("SELECT count(sid) FROM ".$sqltblpre."faqsessions WHERE time > '".$timeNow."' GROUP BY ip");
if (isset($result)) {
return $msgUserOnline.". Now: ".$db->num_rows($result)." Today: ".$db->num_rows($resultToday);
}
}
}

Hi Andrew,
your $timeToday gives you the visits from the last hour.
bye
Thorsten
your $timeToday gives you the visits from the last hour.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi Andrew,

bye
Thorsten
this should be possible.AndrewB wrote:I will try to learn some more php to see if it is possible to count all the new session IDs since midnight..

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
I did a little "teach myself" PHP...
I changed it to
this seems to work. Not tested it fully but the number is at least increasing so far.
I changed it to
Code: Select all
$timeToday = mktime(0, 0, 0);
Hiho,
mktime() should a possible result.
bye
Thorsten
mktime() should a possible result.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist