Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
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?

1 member likes this: Gizmo
Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
*goes off to test*


I hope you fixed the SSI part, I just noticed it wasn't working in my version

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thank you rockband


- Allen wavey
- What Drives You?
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
everything works except the most recent topic. He used the active topics file, but those topics aren't store in order there

Sponsored Links
Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
When I installed this before it was a real resource hog. Has anything been modified to change that?

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
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.


UBB.classic: Love it or hate it, it was mine.
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
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

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Sponsored Links
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
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

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
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?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
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

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
sure, you pick the one sentence that makes no sense out of that very nice post I made wink

Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
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

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
any word on a fix?

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
Quote
quote:
Originally posted by Weird Al:
any word on a fix?
I'm slow, which fix are we waiting for?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
the one for the most recent post

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
ubb_statistics.cgi needs to reference vars_wordlets_mods{stuff} instead of vars_wordlets{stuff}.

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
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.
Code
In ubb_statistics.cgi at line 440 you have this;<br><br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>&lt;font size=&quot;1&quot; face=&quot;$vars_style{FontFace}&quot;&gt;$Misc[2]&lt;/font&gt;</pre></div></div>Then on line 670 you close the tags and the <td> to start the next column with this;<br><br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>		return qq~&lt;/font&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; colspan=&quot;$statcolspan&quot; width=&quot;50%&quot; bgcolor=&quot;$vars_style{AltColumnColor1}&quot; valign=&quot;top&quot; class=&quot;darktable&quot;&gt;&lt;font color=&quot;$vars_style{TextColor}&quot; face=&quot;$vars_style{FontFace}&quot;&gt;~; </pre></div></div>Since the size wasn't specified at "1" again it reverted to the boards font size.

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
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).

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
You have a new PM Al.

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: Jun 2001
Posts: 2,849
Spotlight Winner
Spotlight Winner
Offline
Joined: Jun 2001
Posts: 2,849
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.

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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?

Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
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


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
*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

Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
Thank you verry much Weird All, it works now!!!


Webmaster of d-talk & Kabel-Forum.com
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
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


Webmaster of d-talk & Kabel-Forum.com
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
you need to increase your colspan= number in the code above it... you might re-check the insructions smile


- Allen wavey
- What Drives You?
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
...but there is no ColSpan in the new code...


Webmaster of d-talk & Kabel-Forum.com
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
the base code smile


- Allen wavey
- What Drives You?
Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
Hi Allen,

can you look at my files when i give you my ftp-datas? Please...


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
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?


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
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

Joined: May 2001
Posts: 684
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 684
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 ...


Webmaster of d-talk & Kabel-Forum.com
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Page 1 of 3 1 2 3

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)