Advanced search  

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

Pages: 1 [2]   Go Down

Author Topic: Users Online Today  (Read 92073 times)

0 Members and 1 Guest are viewing this topic.

dke

  • Guest
Re: Users Online Today
« Reply #20 on: January 05, 2008, 01:58:29 am »

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 :)
« Last Edit: January 05, 2008, 02:29:48 am by dke »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Users Online Today
« Reply #21 on: January 05, 2008, 06:27:26 am »

1. Is it possible to hide the admin user in the online list?
Yes , edit codebase.php around line #66
change this
Code: [Select]
$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%'");
With this
Code: [Select]
$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");

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
Code: [Select]
$qs = $_SERVER['QUERY_STRING']
if(!$qs){
starttable("100%", "Users Online Today ($total users)");

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

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

dke

  • Guest
Re: Users Online Today
« Reply #22 on: January 05, 2008, 01:10:30 pm »

Yes , edit codebase.php around line #66
change this
Code: [Select]
$result = cpg_db_query("SELECT user_id,user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_lastvisit LIKE '".date("Y-m-d", mktime())
."%'");
With this
Code: [Select]
$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
Code: [Select]
$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" :
Code: [Select]
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!


« Last Edit: January 05, 2008, 03:23:11 pm by dke »
Logged

Nibbler

  • Guest
Re: Users Online Today
« Reply #23 on: January 05, 2008, 03:45:16 pm »

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

Code: [Select]
$qs = $_SERVER['QUERY_STRING'];
Logged

dke

  • Guest
Re: Users Online Today
« Reply #24 on: January 05, 2008, 04:29:59 pm »

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

Code: [Select]
$qs = $_SERVER['QUERY_STRING'];

Thanks, now i get another message:
Code: [Select]
Parse error: syntax error, unexpected $end in plugins\online_today\codebase.php on line 102
Any idea?
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: Users Online Today
« Reply #25 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. }
Logged
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

  • Guest
Re: Users Online Today
« Reply #26 on: January 05, 2008, 04:42:37 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:

Code: [Select]
$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:

Code: [Select]
$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!
« Last Edit: January 05, 2008, 08:24:52 pm by dke »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Users Online Today
« Reply #27 on: January 06, 2008, 06:13:07 am »

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

haosev

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
  • Mr.Hao
    • www.tinhocbacninh.net
Re: Users Online Today
« Reply #28 on: May 21, 2008, 06:06:24 am »

Verry good and thanks
Logged
www . vietnamshare.net < Free download ebooks 100%, Links direct...
www . tinhocbacninh.net < Photo gallery Vietnam, Vietnam tour gallery...

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Users Online Today
« Reply #29 on: May 23, 2008, 12:50:45 am »

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

Catching up! :)

fran86

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
Re: Users Online Today
« Reply #30 on: October 18, 2008, 01:17:30 am »

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.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Users Online Today
« Reply #31 on: October 18, 2008, 05:59:34 am »

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

Quote
and 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,
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

fran86

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
Re: Users Online Today
« Reply #32 on: October 18, 2008, 06:35:02 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
Logged

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: Users Online Today
« Reply #33 on: January 10, 2009, 02:39:09 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?
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.

Criss

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Users Online Today
« Reply #34 on: February 15, 2009, 05:09:42 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Users Online Today
« Reply #35 on: February 17, 2009, 12:07:46 pm »

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.
Logged

Criss

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Users Online Today
« Reply #36 on: February 17, 2009, 02:27:28 pm »

Whatever. You bitch more than help.
Logged

Exal

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
Re: Users Online Today
« Reply #37 on: May 20, 2009, 09:37:30 pm »

Hereby attached the spanish.php
Logged

Toaster!77

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Users Online Today
« Reply #38 on: December 07, 2009, 09:00:38 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Users Online Today
« Reply #39 on: December 07, 2009, 09:35:43 am »

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.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.032 seconds with 20 queries.