forum.coppermine-gallery.net
Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Sami on August 22, 2006, 06:51:26 am
-
Users Online Today (Like SMF add-on package) ver 1.0
Main mod: http://forum.coppermine-gallery.net/index.php?topic=17308.0
Main idea: probinson77 (http://forum.coppermine-gallery.net/index.php?action=profile;u=16029)
Special thanks to razorbiker (http://forum.coppermine-gallery.net/index.php?action=profile;u=33051) , who ordered ;) this plugin
Install:
- unzip package to plugins folder and use plugin manager to install it
- after installation add onlinetoday to :
config => Album list view => The content of the main page
config:
- if you want to show this stat to admin only , open up plugins/online_oday/codebase.php and replace (around line 63)
this
if($matches[1] != 'onlinetoday') {
with this
if($matches[1] != 'onlinetoday' || !GALLERY_ADMIN_MODE) {
- if you want to show this stat to Registered user only , open up plugins/online_oday/codebase.php and replace (around line 63)
this
if($matches[1] != 'onlinetoday') {
with this
if($matches[1] != 'onlinetoday' || !USER_ID) {
There isn't any configuration page for this plugin , yet !
-
Very cool.
It looks likes it works
Only one strange thing.
it not alway's shows if the user was online.
It looks likes it doesnt show a user if u use the remember me function
-
yes this plugin use xxx_users table as a reference and that table doesn't change the user-last-visit value for those who select remember me option there is two solution:
- changing the core files of CPG to change that value
- use custom table to store this plugin data
-
yes this plugin use xxx_users table as a reference and that table doesn't change the user-last-visit value for those who select remember me option there is two solution:
- changing the core files of CPG to change that value
- use custom table to store this plugin data
Nice Mod, thank you!
Could you help me a little and explain how to use a custom table to store the plugin data? I guess it would be the most elegant way to solve the "problem" mentioned above, right?
I´m running version 1.4.9 with the modpack and the "Who is online"-plugin.
Greetings!
-
Morning Sami ;)
All,
CODEBASE.PHP in French here (http://forum.coppermine-gallery.net/index.php?topic=36474.msg171596#msg171596) ;D
Thanx
PYAP
-
Nice Mod!
Could you help me a little and explain how to use a custom table to store the plugin data? I guess it would be the most elegant way to solve the "problem" mentioned above, right?
I´m running version 1.4.9 with the modpack and the "Who is online"-plugin.
-
- Create a custom table like xxx_uotlog
- Run custom Mysql query at authentication to add some user info to xxx_uotlog
-
thanks Sami - got it.
-
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
-
French.php lang file attached ;)
-
This plugin only shows the registered users, has as to also show how many guests they are connected?
http://www.orTubes.com
Http://orGames.ortubes.com
-
You probably want the who's online plugin.
http://forum.coppermine-gallery.net/index.php?topic=26532.0
-
I am new to this, so kindly tell me what file(s) will be uploaded.
I first unzipped cpg1.4.x_plugin_pack_v3, found online_today, so wanted to install it. So I used Plugin Manager to install it, but uploading configuration.php and codebase.php gives a message "The file uploaded is not a plugin package."
What should I do?
Thanks
-
You should upload "online_today" folder to plugins folder
-
very nice plugin. thanx :)
is it possible to change this to show Users online in last 24 Hours ?
thanx
fotovagu
-
I install this plugin, yet it doesn't work. It always shows 0 users online. I made the change to show to only register users. Does this mod work if you have turn on the bridge between CPG and BBS? Being that it doesn't use the user table anymore and if so is there a work around for this?
-
No, this plugin is not bridge compatible.
-
dutch.php attached
-
Had this plugin a while but I haven't used it until now, I get this database query error and this mysql error:
While executing query "SELECT user_id,user_lastvisit FROM `newgallery2007`.ibf_members WHERE user_lastvisit LIKE '2007-11-19%'" on 0
mySQL error: Unknown column 'user_id' in 'field list'
My gallery is bridged, is this why? If so is there a way of making it work with my bridged gallery ;)
-
No, this plugin is not bridge compatible.
-
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 :)
-
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");
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();
}
-
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!
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!
-
You need a semi-colon at the end of each statement in PHP, so
$qs = $_SERVER['QUERY_STRING'];
-
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?
-
You might be missing a curly brace, just add one of these at the end - that might fix it. }
-
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!
-
Sorry for missed semi-colon I didn't test that !
-
Verry good and thanks
-
Spanish file attached...
-
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.
-
This is the newest and oldest version. ;D There is not another version of this plugin.
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,
-
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
-
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?
-
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.
-
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.
-
Whatever. You bitch more than help.
-
Hereby attached the spanish.php
-
- 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
-
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 (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616).