Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 03-08-2003, 04:09 PM   #1
Solid State Member
 
Join Date: Mar 2003
Posts: 10
Default Code for users online...

Dave, its mike from LTI and 50megs,


On Matrix28.com you have a thing that says how many users are on this forum...

How did you do that?
__________________

Cascade is offline   Reply With Quote
Old 03-08-2003, 04:12 PM   #2
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

I had a hack from boardmod that would output a Javascrit file.
__________________

__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 03-08-2003, 06:02 PM   #3
Solid State Member
 
Join Date: Mar 2003
Posts: 10
Default

Can I have the code?

Can you post it?
Cascade is offline   Reply With Quote
Old 03-08-2003, 06:07 PM   #4
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

Open Sources\Subs.pl and search for 1; and add:


sub printwhoisonline {
print "Content-type: text/html\n\n";
$guests = 0;
$users = '';
fopen(FILE, "$vardir/log.txt");
@entries = <FILE>;
fclose(FILE);
foreach $curentry (@entries) {
chomp $curentry;
($name, $value) = split(/\|/, $curentry);
if( $name ) {
&LoadUser($name);
if( exists $userprofile{$name} ) {
$users .= qq~ <a href="$scripturl?action=viewprofile&username=$user account{$name}">$userprofile{$name}->[1]</a><font size=1>,</font> \n~;
}
else { ++$guests; }
}
}
$users =~ s~<font size=1>,</font> \n\Z~~;
if ($INFO{'group'} eq "guests") { print "$guests"; }
if ($INFO{'group'} eq "users") { print "$users"; }
exit;
}
Before it.
Save and open YaBB.pl and search for
elsif ($action eq 'profile2') { require "$sourcedir/Profile.pl"; &ModifyProfile2; }
and add after:
elsif ($action eq 'printwhoisonline') { require "$sourcedir/Subs.pl"; &printwhoisonline($INFO{'group'}); }
and then

To add the welcome message:
<script src="http://www.yourdomain.com/YaBB.pl?action=welcome"></script>

To add the number of private messages the user has received:
<script src="http://www.yourdomain.com/YaBB.pl?action=welcome2"></script>

To add the number of guests:
<script src="http://www.yourdomain.com/YaBB.pl?action=printwhoisonline&group=guests"></script>

To add the users that are online:
<script src="http://www.yourdomain.com/YaBB.pl?action=printwhoisonline&group=users"></script>

To display the latest topics (original script by S.M.art.Y):
<script src="http://www.yourdomain.com/YaBB.pl?action=recent1&display=7"></script>
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 03-08-2003, 06:26 PM   #5
In Runtime
 
Pipson's Avatar
 
Join Date: Mar 2003
Posts: 158
Default

can i have a code that show ppl in ur site and not forum
__________________
|Pipson.net|
Pipson is offline   Reply With Quote
Old 03-08-2003, 06:48 PM   #6
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

Have a look around @ scriptsearch or Google.
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 03-09-2003, 04:32 AM   #7
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

Mike, why did you change your username?
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 03-09-2003, 02:16 PM   #8
Solid State Member
 
Join Date: Mar 2003
Posts: 10
Default

Quote:
Originally posted by David Lindon
Mike, why did you change your username?
I was not cookied.

Thought we had to register again because you upgraded tyour fourm...
Cascade is offline   Reply With Quote
Old 03-09-2003, 02:21 PM   #9
Fully Optimized
 
Slayer's Avatar
 
Join Date: Mar 2003
Posts: 3,111
Send a message via AIM to Slayer Send a message via MSN to Slayer Send a message via Yahoo to Slayer
Default

people make mistakes you know
Slayer is offline   Reply With Quote
Old 03-09-2003, 02:25 PM   #10
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

Nope. I transfered all usernames and passwords.
__________________

__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0