UBB.Dev
Posted By: Brett [6.6 - 6.7] [beta] Statistics - 11/17/2003 4:39 PM
Modification Name: Statistics

Author(s): Brett

Description: This hack displays statistics for your UBB like a separate category at the bottom of forum home and provides a detailed stats page.

Demo: Click Here

Requirements: UBB 6.6.x, 6.7.x

Download Link:
For UBB 6.6.x ONLY: https://www.ubbdev.com/ubb/upload/00006378/Statistics6.6.zip
For UBB 6.7 Beta ONLY: https://www.ubbdev.com/ubb/upload/00006378/Statistics6.7.zip

Credits: Tovok7, LK, Gizzy, Wierd Al

Instructions / Other Info: Updates:
  • ubb_statistics.cgi has been completely renovated. It takes advantage of 6.x's file structure, CI's, etc for less file usage. And a few other things, 'spiced' up. (now using strict, wink )
  • CSS Template compatible

Besides that, nothing really new. Any ideas?
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/17/2003 6:19 PM
*goes off to test*


I hope you fixed the SSI part, I just noticed it wasn't working in my version
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 11/17/2003 10:07 PM
Thank you rockband
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 11/18/2003 2:36 AM
Quote
quote:
Originally posted by Brett:
ubb_statistics.cgi has been completely renovated. It takes advantage of 6.x's file structure, CI's, etc for less file usage. And a few other things, 'spiced' up. (now using strict, wink )
Jeese Brett lol... Can I not half ass things anymore :x...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/18/2003 4:27 PM
everything works except the most recent topic. He used the active topics file, but those topics aren't store in order there
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 5:51 AM
When I installed this before it was a real resource hog. Has anything been modified to change that?
Posted By: Charles Capps Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 6:45 AM
Code suggestions...

&TotalsLastUser: %vars_forums is your friend.

&GetLatestPost: Please use the Get* routine from ubb_lib_files, as the active topics datafile may not be in a sane state. I built the routines for a reason, you know. Also, the keys function returns in the hash order, which is never right. Use a sort and drop the reverse, as it isn't working right as-is.

&GetMemberCount: Again, please use the proper Get* routine from ubb_lib_files...

&CreateChart: Please use &DirExists.
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 2:33 PM
Thanks CC laugh

Yea, i don't know what i was thinking when i didn't sort the active topics. shocked On the bright side, it's better than going into each meta file and looking at each date then opening the topic file. wink I updated the zip, updating those mentioned by Charles. The only file changed is ubb_statistics.cgi. smile

RandyM: A definite Yes. smile
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 2:42 PM
Quote
quote:
Originally posted by RandyM:
When I installed this before it was a real resource hog. Has anything been modified to change that?
Yeh well my perl scripting sucks ok frown it's why I have Wierd Al and Brett on my coding team :x...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 2:48 PM
Quote
quote:
Originally posted by Gizzy:
quote:
[qb]Originally posted by RandyM:
When I installed this before it was a real resource hog. Has anything been modified to change that?[/qb]
Yeh well my perl scripting sucks ok frown it's why I have Wierd Al and Brett on my coding team :x...
lol, he was talking about my version tipsy


Brett, I get javascript errors and "Last post by in at on "

I don't think that's right shocked
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 3:27 PM
Can someone else please test this? For some reason, Al, your active topics file isn't being loaded through the GetTodaysActiveTopics sub. When i loaded your active topics file, it loaded fine. I even did a mini port to 6.5 that i still have installed and it loads fine.

I dunno, maybe my sorting method is flawed... :

lol smash
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 4:06 PM
I meant the versions going way back as well. I would love to be able to use this again. If it is less hoggish I'm going to give it a shot. Maybe CC can add more info about the resources used?
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 4:32 PM
My guess is until someone turns it into a php solution, it will always be a resource hog. Just think about how many things it has to open. Every cache folder you ever had, all of those calculations that it requires. It's kinda like working without the cache if I understand correctly. Every time someone posts, it's called on the forum summary. Everytime someone views the statistics page, all of those folders are opened and closed, and calculations are made. Don't forget that this also happens anytime someone views a page that has the SSI version on it.

Brett, I don't know why my board is giving you so much trouble. First the universal headers, now this shocked
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 5:13 PM
Quote
quote:
Originally posted by Weird Al:
My guess is until someone turns it into a php solution, it will always be a resource hog.
What do you mean? Make a PHP Stat hack? Now THAT would be a feat in and out itself. Requiring files with hashes incompatible with php. Or are you saying turn UBB into PHP? Like PHP isn't capable of being a resource hog? *coughyabbsbcough* tipsy
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 5:20 PM
sure, you pick the one sentence that makes no sense out of that very nice post I made wink
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 11/19/2003 5:26 PM
Alright, from what i got my response is that statistics page, forum page, profile page, it doesn't matter. Each time you view those pages(cached or not), files are opened, there's other way. It just depends on how many/much is opened. This hack opens about 1/4 of previous versions, resource hog less, no? wink
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/21/2003 8:25 PM
any word on a fix?
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/22/2003 8:46 AM
Quote
quote:
Originally posted by Weird Al:
any word on a fix?
I'm slow, which fix are we waiting for?
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/22/2003 3:33 PM
the one for the most recent post
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/22/2003 8:57 PM
ubb_statistics.cgi needs to reference vars_wordlets_mods{stuff} instead of vars_wordlets{stuff}.
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/22/2003 10:22 PM
I found something that may or may not be a problem but for me it caused the right column of stats on the summary page to have the wrong size font.

In ubb_statistics.cgi at line 440 you have this;

Code
<font size="1" face="$vars_style{FontFace}">$Misc[2]</font>
Then on line 670 you close the tags and the to start the next column with this;

Code
		return qq~</font></td><td align="left" colspan="$statcolspan" width="50%" bgcolor="$vars_style{AltColumnColor1}" valign="top" class="darktable"><font color="$vars_style{TextColor}" face="$vars_style{FontFace}">~; 
Since the size wasn't specified at "1" again it reverted to the boards font size.
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/22/2003 10:28 PM
Quote
quote:
Originally posted by Weird Al:
the one for the most recent post
So far this is working fine for me. Sorry about spamming the posts but each one relates to something different. I didn't want to confuse anyone (especially me).
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/23/2003 3:09 AM
shocked would you be able to PM me the contents of your activetopics file? noncgi/cache-********/search-index/activetopics.cgi

Just want to compare them
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/23/2003 3:18 AM
You have a new PM Al.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/23/2003 3:32 AM
I reuploaded the file (I hadn't modified the old one) and for some reason it now works. :-/


Thanks Randy smile You obviously fixed it by sending me the file wink
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/23/2003 3:51 AM
Haha, that's the way it works sometimes. This version of the stats hasn't slowed my board down at all.It seems to run really well.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/23/2003 4:13 AM
Quote
quote:
Last post by Al in For Brett at on November 20, 2003 11:29 AM
Brett, anyway to get 11:29AM to be between at and on?
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 4:48 PM
Hi,

I have the problem that I only get numbers, but all ist hacked correctly in vars_wordlets_mods.cgi....

What can I do?

Thanks
d-talk
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 5:14 PM
*sigh* I guess Brett didn't update the install.

All of the stuff you added to vars_wordlets_mods.cgi, move that to vars_wordlets.cgi
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 5:51 PM
Thank you verry much Weird All, it works now!!!
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 6:00 PM
Hi,

I have yet another problem with this hack!

Look at:

http://www.ubb-test.board-world.net/cgi-bin/ultimatebb.cgi

There ist now one column to much, with the last Post data...

What can I do?

Thanks
d-talk
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 7:17 PM
you need to increase your colspan= number in the code above it... you might re-check the insructions smile
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 7:39 PM
...but there is no ColSpan in the new code...
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 7:43 PM
the base code smile
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 7:48 PM
Hi Allen,

can you look at my files when i give you my ftp-datas? Please...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 8:04 PM
would you do me a favor and just try enabling one more thing to show? ie. Posts Per Forum? I think it's just a miscalculation with the ubb_stastics.cgi code
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 8:18 PM
Hi, now it works, but i dont want to show one more thing...

Also the font is an other as on the left side...
Can you look at my files?
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 8:41 PM
to fix the font size, in ubb_statistics.cgi

FIND:
Code
		return qq~</font></td><td align="left" colspan="$statcolspan" width="50%" bgcolor="$vars_style{AltColumnColor1}" valign="top" class="darktable"><font color="$vars_style{TextColor}" face="$vars_style{FontFace}">~; 
REPLACE WITH:

Code
		return qq~</font></td><td align="left" colspan="$statcolspan" width="50%" bgcolor="$vars_style{AltColumnColor1}" valign="top" class="darktable"><font color="$vars_style{TextColor}" face="$vars_style{FontFace}" size="$vars_style{FDTextSize}">~; 
Now this is just something to test, find

Code
		$Misc[2] .= &Template($vars_wordlets{statistics_last_post}, 
{ DATE => &DateFormatJS($Statistics{LastestPost}->[12], $Statistics{LastestPost}->[13], 1, 1, 1, 1),
NAME => $Statistics{LastestPost}[15], SUBJECT => qq~<a href="$ULTIMATEBB?ubb=get_topic;f=$f;t=$t"><b>$Statistics{LastestPost}[3]</b></a>~
});
ADD AFTER:
Code
		$Misc[2] .= &AppendTD;
The first part will work, the second part is untested
Posted By: d-talk Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 9:11 PM
Hi it does not work look at

http://www.ubb-test.board-world.net/cgi-bin/ultimatebb.cgi

I want it to look like here:

http://www.d-talk.tv/cgi-bin/ultimatebb.cgi

The Last post centered ...
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 11/25/2003 10:59 PM
It looks just fine by what I see... If there is data for it to be side by side it is, i see just as much data on the left than on the right...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 11/29/2003 8:16 PM
brett, one last bug.

In the title of the statistics page, it says "Statistics", you might want to fix that wordlet in the install
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 11/29/2003 9:47 PM
Quote
quote:
Originally posted by d-talk:
Hi, now it works, but i dont want to show one more thing...

Also the font is an other as on the left side...
Can you look at my files?

quote:
[qb]Originally posted by RandyM:
I found something that may or may not be a problem but for me it caused the right column of stats on the summary page to have the wrong size font.

In ubb_statistics.cgi at line 440 you have this;

Code
<font size="1" face="$vars_style{FontFace}">$Misc[2]</font>
Then on line 670 you close the tags and the to start the next column with this;

Code
		return qq~</font></td><td align="left" colspan="$statcolspan" width="50%" bgcolor="$vars_style{AltColumnColor1}" valign="top" class="darktable"><font color="$vars_style{TextColor}" face="$vars_style{FontFace}">~; 
Since the size wasn't specified at "1" again it reverted to the boards font size.
[/qb]
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 12/13/2003 4:20 AM
One thing that I think would be beneficial... Allen's script for total members: https://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=33;t=000114;p=1#000008 possibly integrate the members to reflect that as well, as an option anyway...
Posted By: Tovok7 Re: [6.6 - 6.7] [beta] Statistics - 12/14/2003 2:19 PM
I'm glad to see that there is motion in the development of my old hack. You did great work in code improvement. Btw, the sub PerformCheckUp is no longer needed and save to remove.
Thanks for crediting me.
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/15/2003 7:47 PM
Quick question. If I want to add a break between the stats and the bottom of the main section, where do I go to add that? Other than that, everything runs perfectly!

- MT
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 12:44 AM
I also noted that there is a problem with "Last Post By..." It doesn't update like it's supposed to. Any suggestions?

- MT
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 12:50 AM
Could we have a link to your board and if it requires you to log in, a test account?
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 1:05 AM
Man, I wish I could give you one. I'm working on an Intranet site that is behind some pretty big guns. What is it that you need to see? Maybe I can email you a screenshot?

- MT
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 2:15 AM
Well what do you mean doesn't update like it's supposed to?
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 4:18 PM
Um... nevermind. Man, I overlooked something very obvious.

- MT
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/16/2003 11:48 PM
Oh, I did forget to ask. I'd like to have a break in between the main board and the stats block. Anyone have any quick suggestions?

- MT
Posted By: LK Re: [6.6 - 6.7] [beta] Statistics - 12/17/2003 1:24 AM
Try to add $TBB
$TBT before the stats part in sub PageBottom of public_forum_summary.pl
Posted By: Digital Boy Re: [6.6 - 6.7] [beta] Statistics - 12/17/2003 4:26 PM
Sorry, can't seem to get it to work.....


- MT
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 12/17/2003 11:33 PM
Quote
quote:
Originally posted by Matt Torbin:
Sorry, can't seem to get it to work.....


- MT
That's what I did here <--- click this...

I made other changes to the summary page before I added the stats but that is basically what I did.
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 12/18/2003 12:04 AM
I have updated the zip file, namely only the ubb_statistics.cgi file fixing the triple column bug and font.

Matt: The html in the summary is located in the ubb_statistics file, not the public_forum_summary. The forum part in particular is around line 428.

Code
add:
$TBB
$TBT

above:
<tr bgcolor="$vars_style{CategoryStripColor}" class="tdheader">
That should work
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 12/18/2003 8:08 AM
Quote
quote:
Originally posted by Gizzy:
One thing that I think would be beneficial... Allen's script for total members: https://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=33;t=000114;p=1#000008 possibly integrate the members to reflect that as well, as an option anyway...
:hint:
Posted By: RandyM Re: [6.6 - 6.7] [beta] Statistics - 12/18/2003 9:01 AM
I did it in the summary page like this;

Code
sub PageBottom {
# Fixed for strict - 20030426


my $Bottom = &DisplayStats . qq~
$TBB

$TBT
I use graphics around the tables so I didn't have to add a
after $TBB
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 01/09/2004 6:27 AM
Added a 6.7 Download Link.

Only thing new is the spider url friendness thingy. Trimmed up some code here and there.
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/07/2004 12:11 AM
Quote
Originally posted by Gizzy:

quote:
[qb]Originally posted by Gizzy:
One thing that I think would be beneficial... Allen's script for total members: https://www.ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=33;t=000114;p=1#000008 possibly integrate the members to reflect that as well, as an option anyway...[/qb]
:hint:

this is now a standard option in ubb_lib.cgi in 6.7 smile
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/07/2004 3:08 PM
I know :x... I saw the notice just for you lol...
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/10/2004 2:52 AM
The install instructions for 6.7 have a buglet or 2, just needs to be updated for 6.7 in regards to finding sections of code in ubb:

Code
$location = qq($vars_wordlets_pntf{pntf_forum}: <a href="$ULTIMATEBB{"ubb=forum;f=$f"}">) . (&GetForumRecord($f))[1] . qq(</a>);
I think there's one other place, but I can't remember right now if I caught one other, but it was the same type thing smile Nice work smile
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 02/10/2004 11:06 AM
ZIP file updated with two bugfixs in public_display_profile.pl and public_pntf_admin.pl. Thanks Allen! laugh
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 1:56 AM
Welcome smile

I've installed this twice and each time I get a 500 ISE on the ultimatebb page. Anyone else seen this? I've chmodded all files correctly smirk
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 2:32 AM
I got it working just fine on my test board.
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 4:21 AM
Would be nice to see it functioning on a 6.7 site, any takers?
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 4:36 AM
I have seen this working on d-talk's test site, but he's added colorforums, so it's been removed
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 4:50 AM
I'll have it up by the weekend.
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 7:09 AM
Ok, done...

Demo: UGN Security - BBS
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 7:29 AM
hmm.. thank you smile Did you make any changes from the default install? I have no idea why I got a 500 ise
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 10:00 AM
No changes; did it exactly as the file sais. Only change I did was filing the data in vars_wordlets down in alphabetacal order...
Posted By: Ellen Re: [6.6 - 6.7] [beta] Statistics - 02/13/2004 11:37 PM
Worked perfectly for me on a new 6.7 install.
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/15/2004 2:12 AM
ok, thanks... I'll try it again smile
Posted By: AllenAyres Re: [6.6 - 6.7] [beta] Statistics - 02/15/2004 2:29 AM
Found my mistake, thank you smile
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 02/15/2004 7:02 AM
hehe, i have to ask; what was it...
Posted By: Poopy Pants Re: [6.6 - 6.7] [beta] Statistics - 03/13/2004 6:10 AM
The download link is gone frown
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 03/13/2004 6:15 AM
https://www.ubbdev.com/ubb/upload/00017811/Statistics6.7.zip
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 03/13/2004 6:19 AM
Sorry, seems hypermart ended all free accounts recently. Gotta get my server up and going so i don't have to worry about these issues. wink
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/13/2004 6:24 AM
Quote
Originally posted by Brett:

Sorry, seems hypermart ended all free accounts recently. Gotta get my server up and going so i don't have to worry about these issues. wink


FlareUpload laugh
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 03/13/2004 6:34 AM
Quote
Originally posted by Brett:

Sorry, seems hypermart ended all free accounts recently. Gotta get my server up and going so i don't have to worry about these issues. wink

See the wink? Can we say NS35? :x...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/29/2004 2:42 AM
For those who want this to work with the fake member total, do this.

In ubb_statistics.cgi,
FIND:
Code
use strict;
ADD AFTER:
Code
&RequireCode("$vars_config{CGIPath}/ubb_forum_summary.cgi");
FIND:
Code
sub GetMemberCount {
$Statistics{TotalMembers} = &GetMemberTotal;
} # endsub
REPLACE WITH:
Code
sub GetMemberCount {
if($vars_misc{ShowFakeMemberTotal} == 1) {
my @newest = &GetNewestMember;
$Statistics{TotalMembers} = $newest[1] + 0;
} else {
$Statistics{TotalMembers} = &GetMemberTotal;
}
} # endsub
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 03/29/2004 3:29 AM
Lol, works perfectly. Be sure to clear your cache however... I hated having my total members up top using the fakemembertotal but the stats using the standard... Made it a pain to prune heh...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/29/2004 3:55 AM
Also, for those who'd rather have " Page Views for March 2004:" than "Page Views 2004-03:"

In ubb_statistics.cgi
FIND:
Code
			my $bar = int(($Statistics{Hits}{$_} / $Statistics{Hits}{TotalViews}) * $vars_statistics{MaxBarLength});
ADD AFTER:
Code
			my $when = $_;
my @when = split(/-/, $when);
$when[1] = $when[1] + 0;
my $month = qq~month_~ . $when[1];
FIND:
Code
$vars_wordlets{statistics_monthly_hits} $_:
REPLACE WITH:
Code
$vars_wordlets{statistics_monthly_hits} for $vars_wordlets_date{$month} $when[0]:
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 04/01/2004 8:59 PM
Zip file updated with the fake member update. And the page views for month, year is now based on what user preference the date is on. So depending, you could get 04-2004 or April 2004. And there's other misc updates mainly with the spidering of urls.

The only file to update is ubb_statistics.cgi.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 04/02/2004 1:23 AM
Brett, I was wondering if this would help make the hack less server intensive.

For the page views, how about making it so it uses a vars_statistics_views.cgi that saves the pageviews of older months, as my pageviews from 3 months ago won't change. This would make it so you would only open the one file for all those previous months, instead of at least one file per month. For really old sites that still use this (ie netwerkin), this could lead to a much better experience, wouldn't it?

That way, only the current month would need to have the pageviews be calculated, as it's always changing. Once the month changes, that is added to the vars file and you start the new month.


Sorry in advance if that's a really dumb idea
Posted By: HamrWebDesign Re: [6.6 - 6.7] [beta] Statistics - 04/05/2004 6:26 AM
I'm having issues with this hack and my board is down!

The funny thing is that the statistics page is working fine but I am getting an error screen from my forum home.

Undefined subroutine &main::DisplayStats called at NonCGIPath/Templates/public_forum_summary.pl line 409.

http://www.firearmforums.com/cgi/ultimatebb.cgi

Please help!
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 04/05/2004 6:34 AM
Make sure you made and uploaded the changes in ubb_forum_summary.cgi.
Code
####################
# In ubb_forum_summary.cgi
####################
Find: #
##############
&set_page_elements;

##############
# Add Below: #
##############
&RequireCode("$vars_config{CGIPath}/ubb_statistics.cgi");
Posted By: HamrWebDesign Re: [6.6 - 6.7] [beta] Statistics - 04/05/2004 6:46 AM
Yeah ... I'm dumarse and uploaded that file to my non-cgi directory instead of my cgi directory. Problem fixed. Thank you so much !
Posted By: Jango Re: [6.6 - 6.7] [beta] Statistics - 04/24/2004 1:31 AM
Hi, i've made a test installing this hack on my 6.6 boards and everything seems to be ok but for some issues: the statistics link in the upper line doesn't appear, just the space | |, and i cannot apply my ubb style to the statistics page, what could be wrong? Thanks!
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 04/24/2004 3:28 AM
Did you upload the updated vars_wordlets.cgi file?
Posted By: Jango Re: [6.6 - 6.7] [beta] Statistics - 04/28/2004 6:46 AM
Hi, yes, i updated it. I've tested it again and i get the same problems, in the Style Template Associations the statistics doesn't appear.
The docummentation says the Style Template Associations is located in: Primary Settings -> Style Templates -> Edit Style but in the 6.6 is located in Styles -> Style Associations. Is that wrong? or the docummentation is wrong?
Posted By: PhillipBurum Re: [6.6 - 6.7] [beta] Statistics - 05/06/2004 5:56 AM
Help???

Undefined subroutine &main::PageBottom called at CGIPath/ubb_forum_summary.cgi line 374.
Posted By: PhillipBurum Re: [6.6 - 6.7] [beta] Statistics - 05/06/2004 6:24 AM
I Found the problem to be in the public_forum_summary.pl
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 05/06/2004 9:15 AM
That's definitely not the stats hack. I would say rehack from a fresh file.

What is isle 6.7? Why would you need to change ubb_statistics.cgi?
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 06/06/2004 12:49 PM
6.7 zip updated with some new adjustments.

-Last topic now directly links to last post.
-Page views only tracks 6 months instead of loading all counter files that may extend further. smile
Posted By: Gizmo Re: [6.6 - 6.7] [beta] Statistics - 06/07/2004 1:18 AM
MMMK, how about publishing the changes so those of us running it can update our boards without having to rehack everything :x...
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 06/07/2004 2:13 AM
reupload ubb_statistics.cgi smile
Posted By: Charles Re: [6.6 - 6.7] [beta] Statistics - 06/20/2004 4:11 PM
I would to have, instead of averages, posts today, yesterday, posts this week, last week and posts this month, last month is it possible to gather such data?

thanks
Posted By: havoq Re: [6.6 - 6.7] [beta] Statistics - 07/11/2004 9:43 PM
How would one go about displaying the featured member at the top of public_forum_summary? I tried calling $DisplayFH like at the bottom, that didnt work, then I tried a print command right from ubb_statistics.cgi. No go...

Any ideas..
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 07/16/2004 12:01 PM
Charles: Not without diving deeper into the files, but that would require a ton more load, depending on the size of the forum. Because it would need to actually look at the date. The best i could think of is to create a maintaince routine to calculate all posts dates in a forum and append it to a main file with each row being week 1, week 2, so on, seperated by year. And then, increment by new posts. That would be the easiest on load.

Havoq:
Code
# before the print
&FeaturedMember;

# this variable holds featured
$Statistics{FeaturedMember}
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 07/17/2004 5:09 AM
Brett,

Code
		<tr bgcolor="$vars_style{AltColumnColor2}" class="darktable">
<td width="45%" valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$vars_wordlets{statistics_average_posts}
</font>
</td>
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$Statistics{ForumStats}[2]
</font>
</td>
</tr>

<tr bgcolor="$vars_style{AltColumnColor1}" class="lighttable">
<td width="45%" valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$vars_wordlets{statistics_average_topic}
</font>
</td>
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$Statistics{ForumStats}[1]
</font>
</td>
</tr>~;
should be

Code
		<tr bgcolor="$vars_style{AltColumnColor2}" class="darktable">
<td width="45%" valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$vars_wordlets{statistics_average_posts}
</font>
</td>
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$Statistics{Average}[2]
</font>
</td>
</tr>

<tr bgcolor="$vars_style{AltColumnColor1}" class="lighttable">
<td width="45%" valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$vars_wordlets{statistics_average_topic}
</font>
</td>
<td valign="top">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
$Statistics{Average}[1]
</font>
</td>
</tr>~;
I believe (changing ForumStats to Average)
Posted By: havoq Re: [6.6 - 6.7] [beta] Statistics - 07/17/2004 7:35 PM
Quote
Originally posted by Brett:

Havoq:
Code
# before the print
&FeaturedMember;
# this variable holds featured
$Statistics{FeaturedMember}


So how do you print it in forum summary? I've tried multiple things. qq~, print command, displayFH = qq~, etc etc
Posted By: havoq Re: [6.6 - 6.7] [beta] Statistics - 07/17/2004 7:47 PM
N/M, figured it out:

open ubb_forum_summary.cgi

Find:
Code
$ThisHTML = $Header;
Add Above:
Code
&FeaturedMember;
Posted By: havoq Re: [6.6 - 6.7] [beta] Statistics - 07/18/2004 7:30 PM
How many hours can the featured member stay? Whats the max? Because last night, I set it for a specific member at 12:01am. However, it switched members this morning I think around 12pm. Which means thats only 12 hours. I set it to update every 24. Hmmmm...
Posted By: havoq Re: [6.6 - 6.7] [beta] Statistics - 07/21/2004 2:07 AM
My featured member isn't even working correctly. I keep setting the user #, and then 1 hour for the random rotation. After an hour, it keeps setting itself to member #1, which is me, and it doesnt change. Very strange....
Posted By: radrico Re: [6.6 - 6.7] [beta] Statistics - 09/24/2004 12:35 PM
usually i have problems when i try to modify mine, but this one worked fine! Only problem i found was somehow it doesnt space from my last forum it just kinda goes right into it and looks crammed.. any help on that?

http://www.neverendingrejection.com/cgi-bin/ultimatebb.cgi
Posted By: jsteinborn Re: [6.6 - 6.7] [beta] Statistics - 03/11/2005 11:31 PM
Help!

Just installed the stats package on a 6.7 board.

Code
An error has occurred: 

Unmatched ( in regex; marked by <-- HERE in m/(2005|2004)-( <-- HERE [01]([0-3]|[10-12])(-dynamic|-cache|).cgi$/ at CGIPath/ubb_statistics.cgi line 684.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/11/2005 11:49 PM
try editing the following line in ubb_statistics.cgi

Code
$g_month = $raffle[0] . ']([' . $raffle[1] . "|[$back" . '-12]';
to become

Code
$g_month = $raffle[0] . ']([' . $raffle[1] . "|[$back" . '-12])';
Posted By: jsteinborn Re: [6.6 - 6.7] [beta] Statistics - 03/12/2005 12:28 AM
Praise to Ian!

That did it.
Posted By: jsteinborn Re: [6.6 - 6.7] [beta] Statistics - 03/12/2005 12:42 AM
Does "Statistics" show page views for a given forum? For instance i want to see which forums are the most popular.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/12/2005 12:57 AM
no it does not. refer to my reply to you in the other topic.
Posted By: jsteinborn Re: [6.6 - 6.7] [beta] Statistics - 03/12/2005 1:05 AM
Maybe the "hits hack" is what i should try.
Posted By: Ian Spence Re: [6.6 - 6.7] [beta] Statistics - 03/12/2005 1:21 AM
that would give you totals, but it wouldn't tell you how many in a certain month
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 03/13/2005 10:55 PM
Updated the zip file per Ian's fix. Thankya much! smile
Posted By: AshtarRose Re: [6.6 - 6.7] [beta] Statistics - 02/21/2006 3:38 AM
An error has occurred:

/(2006|2005)-([01]([0-2]|[9-12]))(-dynamic|-cache|).cgi$/: invalid [] range "9-1" in regexp at CGIPath/ubb_statistics.cgi line 684.

Please inform the board administration of this error so that they may fix the problem. Thank you!
Posted By: Brett Re: [6.6 - 6.7] [beta] Statistics - 02/21/2006 7:45 AM
AshtarRose / Any who are receiving this error,

I have updated the zip file, with ubb_statistics.cgi having the only changes to fix this bug once and for all.

https://www.ubbdev.com/ubb/upload/00006378/Statistics6.7.zip

Let me know if something comes up.
© UBB.Developers