Gossamer Forum
Home : Products : Gossamer Links : Discussions :

who is online in linkssql

Quote Reply
who is online in linkssql
Do you know haw to view who is online?
Quote Reply
Re: [Troja] who is online in linkssql In reply to
Im not sure you can as it uses cookies to authenticate.
Quote Reply
Re: [RedRum] who is online in linkssql In reply to
Yes I use cookies to athenticate.

Can you help me?
Quote Reply
Re: [Troja] who is online in linkssql In reply to
He just said he didn't think there is a way to do it Wink The problem is knowing who is online, because cookies are stored on the remote system, and the authentication method only stores the cookies on the users system, and not the website.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] who is online in linkssql In reply to
Hm

But do you kow the directory sessions in this directory saves files with the username?
Quote Reply
Re: [Troja] who is online in linkssql In reply to
hi i think this should be possible in general (i think only in dynamic mode) as it is working with gossamer forum.

but perhaps you just should wait until gossamer community is out. i have a feeling that there will be a "who's online"-function.



cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [Troja] who is online in linkssql In reply to
Hmm you could do it I guess using the sessions...

Code:
#!/perl/bin/perl

main();

sub main {
#----------------------------------------------------------
# Show who is online!

my @sess = ();
my @online = ();
my $path = "/Apache/cgi-bin/admin/sessions";
my $sess = {};

opendir (DIR, $path) or die "Can't read sessions : $path : $!";
@sess = grep { /^\w+$/ } readdir(DIR);
closedir DIR;

for (@sess) {
$sess = do("$path/$_");
push @online, $sess->{username};
}

print "Content-type: text/html\n\n";
print join(', ', @online) || 'No-one';

}

I'm not sure how reliable this way is.

Last edited by:

RedRum: Mar 13, 2002, 7:55 AM
Quote Reply
Re: [ManuGermany] who is online in linkssql In reply to
>>
hi i think this should be possible in general (i think only in dynamic mode) as it is working with gossamer forum.
<<

Gossamer Forum uses a different authentication process....a sessions table. Links SQL uses cookies and session files.
Quote Reply
Re: [Paul] who is online in linkssql In reply to
Thanks Paul,

It's work!
Quote Reply
Re: [Paul] who is online in linkssql In reply to
Perfect!! (thanks for the pvt message reply)

Thanks Paul - this is one for the resources area I reckon.Cool
Quote Reply
Re: [sooke] who is online in linkssql In reply to
Did you manage to get it to work?
Quote Reply
Re: [Paul] who is online in linkssql In reply to
Yes I did thanks Paul.

I am searching the posts for more info on the session variable and session expiry etc. I am interested in devloping this slightly, so it shows, the number of guests on as well as registered users.

When I refresh or reload the cgi, I am wondering how long a user is show as on-line for, once they leave? (the default session length)
Quote Reply
Re: [Paul] who is online in linkssql In reply to
I have 3 hours in my admin panel for session lenght. by the looks of it! Thought I saw it somewhere.
Quote Reply
Re: [sooke] who is online in linkssql In reply to
I think the session lasts an hour by default but uses the value in your admin panel first.

Last edited by:

Paul: Apr 23, 2002, 10:50 AM
Quote Reply
Re: [Paul] who is online in linkssql In reply to
So for a half-hour, if I change the "user_session_length" field in the admin to 0.5, will it recognize decimals?

Sean
Quote Reply
Re: [SeanP] who is online in linkssql In reply to
Yes it should do.

Im not certain but I think it just takes the value and multiplies it by 60 * 60 to get the number of seconds so it should work with decimals.
Quote Reply
Re: [Paul] who is online in linkssql In reply to
I notice the session file only contains a value for the username:

$SESSION = {
'username' => 'myusername'
};


Is there a way to get Links to produce more information in this file, such as IP, time on?

Ultimately it would be nice to see the actuall number of people on, including guests, with various stats realted to this. Perhaps get a name of 'guest01', 'guest02' like G Forum does, when the user is not known.
Quote Reply
Re: [Paul] who is online in linkssql In reply to
Hi,

I love this mod, but have a few newbie questions.

1. Where exactly do I put this code? Home page?

2. Where does it show what users are online? I would like it on the home page, under "There are 4542 possible links for you to choose from". Also, I have very few registered users, so would want it to only say something like "There are currently 10 people browsing the site", or something like that.

Thanks in advance.
Quote Reply
Re: [Chrisp] who is online in linkssql In reply to
Thats a good question! Where does this code go? I'm not sure if it's a global or code to be added directly to a page. Can someone help?

Thanks,

Craven
Quote Reply
Re: [craven32] who is online in linkssql In reply to
This version is very old... it runs on 2.1.0, which doesn't use session files now, but rather stores them in the database. Have a look at my mod here;

http://www.gossamer-threads.com/...rum.cgi?post=253121;

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!