Advanced search  

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]

Pages: 1 [2] 3 4 5 6 ... 17   Go Down

Author Topic: "Who is online" plugin (onlinestats)  (Read 442660 times)

0 Members and 1 Guest are viewing this topic.

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: "Who is online" plugin *experimental*
« Reply #20 on: February 02, 2006, 08:15:43 pm »

Any thoughts on this subject?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: "Who is online" plugin *experimental*
« Reply #21 on: February 02, 2006, 11:16:25 pm »

this is not a hotline - allow days for answers, not hours! The plugin contrib board is meant as a place for questions on the plugins, not for additional feature requests. You have been speed-posting in the past few days - please understand that the coppermine staff is not your personal helpdesk, try solving your issues on your own first.
Logged

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: "Who is online" plugin *experimental*
« Reply #22 on: February 03, 2006, 03:38:33 pm »

Works brilliantly THANKYOU.
working on 2 standalone installs, and 1 bridged with phpbb.
Nice work nibbler.
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: "Who is online" plugin *experimental*
« Reply #23 on: February 03, 2006, 05:28:29 pm »

sorry GauGau. didnt meant to upset you or anyone else. :-[
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: "Who is online" plugin *experimental*
« Reply #24 on: February 05, 2006, 05:57:54 pm »

This is another great mod/plugin. thanks!

I wonder if there's an easy hack which would also enable you to see a full list of registered users (whether online or not), with the same clickable links to their profiles?  ;D
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "Who is online" plugin *experimental*
« Reply #25 on: February 05, 2006, 06:04:51 pm »

Have you seen the "Allow logged in users to view memberlist" setting in the config panel?  Then you should have a link to "usermgr.php" in the top menu.
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: "Who is online" plugin *experimental*
« Reply #26 on: February 05, 2006, 06:53:11 pm »

Ahh yes, what a fool I am!

I would really like to have this clickable 'memberlist' link as an extra (last) line of the 'who is online' list. Would it be an easy thing to hack myself? I presume it's just a question of copying the code from the relevant section of the main page somewhere into codebase.php

It just seems useful to see which users are actually online, and then click on the full list of members.
Thanks.
 :)
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "Who is online" plugin *experimental*
« Reply #27 on: February 05, 2006, 09:23:36 pm »

Yup.  You can modify plugins/online/codebase.php yourself to add in that link.  Look for this line:
Code: [Select]
echo "Registered Users: {$logged_in_names}</td></tr>";which is in the function online_mainpage().

Then, looking through this line at the lines above it, figure out where you want your link to be.  Then insert a line like the following:
Code: [Select]
echo '<a href="usermgr.php">Full Member List</a><br />';(Customize to your liking.  Remember to keep track of the single quotes and double quotes to nest them correctly.)

Oh, if you want to add it after the line I mentioned above, you need to move the tags "</td></tr>" out of that line and into your line, at the end.  These tags close the table cell & row that is used for the who is online block.

edit: Thinking about it some more, I decided that I like it best to replace this line:
Code: [Select]
echo ($num_users == 1) ? "We have 1 registered user<br>" : "We have {$num_users} registered users<br>";with this line:
Code: [Select]
echo "We have <a href=\"usermgr.php\">{$num_users} registered user".(($num_users > 1) ? 's' : '')."</a><br>";
Try it out and see if this is your "best" solution as well.   :)
« Last Edit: February 05, 2006, 09:37:20 pm by Paver »
Logged

scottking

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: "Who is online" plugin *experimental*
« Reply #28 on: February 05, 2006, 11:52:18 pm »

I tried installing the plugin as instructed but get the following "There was an error copying the package to the plugins folder."

Any suggestions why I an getting this? Enable plugins is set to yes.

Thanks
Scott
Logged

Nibbler

  • Guest
Re: "Who is online" plugin *experimental*
« Reply #29 on: February 05, 2006, 11:55:15 pm »

Ensure the plugins directory is writable. If all else fails just extract the archive and upload the folder via FTP then install.
Logged

scottking

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Re: "Who is online" plugin *experimental*
« Reply #30 on: February 06, 2006, 12:01:47 am »

Ensure the plugins directory is writable. If all else fails just extract the archive and upload the folder via FTP then install.


Thanks for the suggestion. It was a permisson issue.  How do I fix the date as it's out of wack. It's currently Feb 05, 2006 07:01 PM but the Users online is showing "Feb 06, 2006 at 04:01 AM"

We have 27 registered users
The newest registered user is nathy
In total there are 5 users online :: 3 Registered, and 2 Guests
Most users ever online: 5 on Feb 06, 2006 at 04:01 AM
Registered Users: Scott King, Catherine, tina
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "Who is online" plugin *experimental*
« Reply #31 on: February 06, 2006, 12:58:41 am »

There's a config option in general settings for "time difference from GMT".
Logged

Nibbler

  • Guest
Re: "Who is online" plugin *experimental*
« Reply #32 on: February 06, 2006, 01:02:36 am »

The plugin double counts the timezone I think, once when it writes to the db and then again when it reads.
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: "Who is online" plugin *experimental*
« Reply #33 on: February 06, 2006, 08:54:38 am »

Yup.  You can modify plugins/online/codebase.php yourself to add in that link.  Look for this line:
<snip>

Excellent! Thank you. I did a bit more hacking to remove the "most ever.." line. I'm really pleased with it. For any interested parties, my page header code is here: www.pontinshistory.co.uk/images/
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: "Who is online" plugin *experimental*
« Reply #34 on: February 06, 2006, 07:46:13 pm »

Hello everyone,

As written in my question above, I would like non registered visitors not to be able to view the profiles of registered people. In the "Who is online" block is listed the registered users online and the latest registered user as links to their profiles no matter if Im logged in or not. I think for visitors, the names should be listed as non links, and for registered users as links. How can this be done?

I appreciate your help. thanks.
Logged

Nibbler

  • Guest
Re: "Who is online" plugin *experimental*
« Reply #35 on: February 06, 2006, 07:54:08 pm »

Should be able to change

Code: [Select]
        while ($row = mysql_fetch_assoc($result)) {
                $logged_in_array[] = "<a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a>";
        }

to

Code: [Select]
        while ($row = mysql_fetch_assoc($result)) {
                $logged_in_array[] = USER_ID ? "<a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a>" : $row['user_name'];
        }
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "Who is online" plugin *experimental*
« Reply #36 on: February 06, 2006, 08:02:40 pm »

@lordprodigy: Even if this plugin does not provide links for guest users, if the guest user types in the profile URL manually, it will be shown.  Keeping this in mind, here's how to remove the links for guest users.

The first change is the one Nibbler posted while I was typing this.

The second is to look for this line:
Code: [Select]
echo "The newest registered user is <a href=\"profile.php?uid={$newest_user_id}\">{$newest_user_name}</a><br>";and replace it with this line:
Code: [Select]
echo "The newest registered user is ".(USER_ID ? "<a href=\"profile.php?uid={$newest_user_id}\">" : '') . $newest_user_name . (USER_ID ? "</a>" : '') . "<br>";
And that should do it.  If you are interested in blocking Guest Users from seeing user profiles, that's a support question outside the purview of this plugin.  You might think it's related, but it's really not since the user profiles are shown in a completely different file.  This plugin merely links to that file (or not, if you apply the changes I noted here).
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: "Who is online" plugin *experimental*
« Reply #37 on: February 06, 2006, 08:32:41 pm »

This is perfect. Its working great. Its exactly what I needed. Thank you very much for the quick response!
Logged

deejaymoni

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 59
    • jessicaalbafanatics.com
Re: "Who is online" plugin *experimental*
« Reply #38 on: February 11, 2006, 11:41:46 pm »

Hi Paver,

awesome plugin thanks.

But I have a little problem. If I install the Add to Lightbox plugin and this plugin here the lightbox plugin doesn't work correctly the add to lightbox button at the bottom of every thumbnail view is missing.

I have tried to fix it by myself but no chance maybe you have an idea?
Logged

Nibbler

  • Guest
Re: "Who is online" plugin *experimental*
« Reply #39 on: February 11, 2006, 11:54:53 pm »

Adjust the plugin priority in the plugin manager so that the lightbox plugin is at the end of the list.
Logged
Pages: 1 [2] 3 4 5 6 ... 17   Go Up
 

Page created in 0.045 seconds with 20 queries.