Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
Modification Name: *Recent Visitors Stats

Author: havoq

Description: Displays PNTF stats in summary category

Demo: Demo

Download Link: Download

Note: This works in conjunction with Ians Hidden User Hack located here If this isnt installed then you will not get the hidden users stats. Also this version isn't worditezed. That can be done as well if one so inclined

2nd Note: This hack probably will work on 6.7 if the code is equivalent. In fact I encourage anyone to port it over. I just didn't wanna post it in there and have the code be possibly wrong. However, consider this a 6.7 hack really... tipsy

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Nice one Jon thumbsup


- Allen wavey
- What Drives You?
Joined: Oct 2001
Posts: 572
Member
Member
Offline
Joined: Oct 2001
Posts: 572
Installed good job.

Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Jon,

you mentioned you need Ian's Mod ( for 6.7x) but
how did you addressed this:

Code
 In ubb_lib_pntf.cgi

FIND:

&& ($main::vars_pntf{AllowHidden} eq "no")
) {
$users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]} = $uniqs{$uniq};


ADD AFTER:

} elsif (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/)
&& (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 1)
&& ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)
)
&& (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})
&& ($main::vars_pntf{AllowHidden} ne "no")
) {
$results->{"hidden"}++;
6.3.1 has something like this instead:

Code
 FOR 6.3.1       # Set the UNIQ's pref data properly
$self->{DATA}->{uniq}->{logins}->{$uniq} = [$user_number, $nologin, $hidden, $daysprune];
Thank you,

Felix

Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
ops, sorry double post.

LK, please delete.

smile

Sponsored Links
Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
I dont think I ever said to modify that file

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
He was refering to my mod. I don't have a copy of 6.3, so I won't be able to help. Hopefully someone will be able to though

Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
no, I think you have the wrong line of code there felix. I looked up that code in my file and its unchanged. What you need to find is this.

Find: ubb_lib_pntf.cgi
Code
	# Okay, figure out guests
foreach my $uniq (keys %uniqs) {
Replace With:
Code
	# Okay, figure out guests
foreach my $uniq (keys %uniqs) {

if (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/) && (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 0) && ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)) && (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})) {
$users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]} = $uniqs{$uniq};

} elsif (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/)
&& (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 1)
&& ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)
)
&& (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})
&& ($main::vars_pntf{AllowHidden} ne "no")
) {
$results->{"hidden"}++;

} else {
$results->{"guests"}++;
}
} # end foreach

Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
hm...not quite, you can't replace that, you will end up with the same routine twice, but I got it.
Here, this is the whole Ian's Invisible Mod for 6.3x. Just in case someone else running absolete versions, like us, would need it:

Code
 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x In public_pntf_summary.pl x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

FIND:


if($r->{"overflow"} > 0) {
if($userstring[0] =~ m/d{8}/) {
push(@userstring, qq($r->{"overflow"} $vars_wordlets_pntf{pntf_more_logged_in_users}));
} else {
push(@userstring, qq($r->{"overflow"} $vars_wordlets_pntf{pntf_logged_in_users}));
} # end if
} # end if

ADD AFTER:

if($r->{"hidden"} > 0) {
if($r->{"hidden"} == 1) {
push(@userstring, qq~$r->{'hidden'} $vars_wordlets_pntf{pntf_hidden_one}~);
} else {
push(@userstring, qq~$r->{'hidden'} $vars_wordlets_pntf{pntf_hidden_more}~);
}
}


xxxxxxxxxxxxxxxxxxxxxxxx
x In ubb_lib_pntf.cgi x
xxxxxxxxxxxxxxxxxxxxxxxx

FIND:

$results->{"overflow"} = 0;
$results->{"guests"} = 0;

ADD AFTER:

$results->{"hidden"} = 0;

FIND:


if (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/) && (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 0) && ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)) && (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})) {
$users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]} = $uniqs{$uniq};
} else {
$results->{"guests"}++;
}
} # end foreach



REPLACE WITH:

if (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/) && (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 0) && ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)) && (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})) {
$users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]} = $uniqs{$uniq};

} elsif (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/)
&& (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 1)
&& ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)
)
&& (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})
&& ($main::vars_pntf{AllowHidden} ne "no")
) {
$results->{"hidden"}++;

} else {
$results->{"guests"}++;
}
} # end foreach


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x In vars_wordlets_pntf.cgi x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


FIND:

q!pntf_guests! => q!guest(s)!,

ADD AFTER:

q!pntf_hidden_one! => q!hidden user!,
q!pntf_hidden_more! => q!hidden users!,

#############
# End Hack #
#############
as far as your Mod is concerned, good job smile

I only had to change, in this line:

Code
 <font face="$vars_style{FontFace}"  size="1" color="%%SPANTCOLOR%%"><b>
$title $vars_wordlets_pntf{pntf_simple_title} $r->{'raw_total'}
Code
 size="1" 
with
Code
 size="$vars_style{TextSize}" 
and get rid of
Code
 $title  
.

Thanks Jon
smile

Felix

Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
Yup n/p, now sure how you'd have the same routine twice. Maybe you misunderstood me. Because the same code you posted, is what I have, so maybe I could have explained it better.

In any case....glad you got it workin wink

Sponsored Links
Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
Read up and you'll understand, if you replace ONLY
Code
 # Okay, figure out guests	foreach my $uniq (keys %uniqs) { 
with the whole thing you will have what is after the
Code
 # Okay, figure out guests	foreach my $uniq (keys %uniqs) { 
twice and will give major headaches. But dont worry about it.

Now, I have multiple templates which I change with the seasons and I added a few more graphics in the CP style templates. they are on the summary page HERE and I dont have to change them every time I change the template. see here: style Summer and Style Blue


Do you want the 'recipe" ?

smile

Joined: Sep 2001
Posts: 672
Member
Member
Offline
Joined: Sep 2001
Posts: 672
Felix, I didnt mean add it twice. Why would I use a piece of code twice? I could have said after
Code
# Okay, figure out guests	foreach my $uniq (keys %uniqs) { 
Add this:
Code
if (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/) && (($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 0) && ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)) && (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})) {
$users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]} = $uniqs{$uniq};

} elsif (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0] =~ m/^d{8}$/)
&& (
($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[2] == 1)
&& ($self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[1] == 0)
)
&& (!exists $users{$self->{DATA}->{'uniq'}->{'logins'}->{$uniq}->[0]})
&& ($main::vars_pntf{AllowHidden} ne "no")
) {
$results->{"hidden"}++;

} else {
$results->{"guests"}++;
}
} # end foreach
Because thats what i meant. But its fine.

What do u have the recipe for now? Changing the graphic for the calendar? Because thats the only screenshot I see circled for. I dont see how the timezone graphic you have in the second/third screenshot, reflect the first screenshot

Joined: Oct 2002
Posts: 394
Enthusiast
Enthusiast
Offline
Joined: Oct 2002
Posts: 394
there is more at the bottom, pass by my site, you'll see
smile


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)