View Full Version : [Release vB2.0] PM Stats 1.0
the_sisko
04-19-2001, 10:00 PM
PM Stats 1.1 Hack | 28.05.2001-22:10 CET
What does it do:
This Hacks show some stats for your PM's, which includes:
Version 1.0
It show per page all users who stores PM's in the database, sort by users with the most PM's.
It shows: total PM's, new PM's and unread PM's
Total PM's in database
How many Users with at least one PM are in db
Users PM average
it highlight users who stores more then 90% of the current PM quota, so you can find those users fast.
Updated Version 1.1
link to userprofile for direct edit (this one was requested)
delete all PM's of one user (this one was requested)
the last part is a little big tricky to explain: you can know see the Last Visit, Last Activity, Last Post of an user in different colors. What is it good for? Lets say you can easy see if an user is inactive and you can delete his PM's to keep your database clean. If there need to explain more, take a look at the screenshot or ask me and I'll try to explain it more.
I found this very usefull so I can trackdown which user stores how many PM's and how to set the PM quota. This idea is only usefull for those of us, who had some server limitation and like to find ways to keep the diskquota of the database small.
For version: vBulletin 2.0.0 (should work with RC2 and RC3, but for odler versions the CSS is missing).
Files needed: pmstats.php
Files to edit: pmstats.php
Templates to create/edit: none
Instructions are in pmstats.php file.
Screenshot http://www.studenten-city.de/stf/pmstats.jpg
FEEDBACK WANTED! :D Likes/dislikes/modification requests all gladly accepted.
rockergrrl
04-20-2001, 06:19 PM
Works Great!!
I've been wondering about the numbers of PMs my girls have have storing... :)
Thanks!!
the_sisko
04-20-2001, 06:21 PM
For those of you who want a link form the CP:
In /admin/index.php find first instance:<tr><td><hr></td></tr>under it place:<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr bgcolor="#3F3849"><td><font color="#BCB6CD">
<b>PM Functions</b>
</font></td></tr></table>
<a href="pmstats.php?s=<?php echo $session[sessionhash]; ?>">PM Stats</a><br>
</td></tr>reupload it!
tubedogg
04-20-2001, 06:24 PM
I love it! :)
Even if you did borrow ;) my release wording.
the_sisko
04-20-2001, 07:41 PM
[QUOTE]Originally posted by tubedogg
I love it! :)
Even if you did borrow ;) my release wording.
SystemLogic
04-20-2001, 09:26 PM
Looks great!!!
bokhalifa
04-21-2001, 02:06 AM
Great ;)
Blue2000
04-29-2001, 11:35 PM
this is very nice Sisko.
i know its only a stats but is there anyway you could turn it into a maintains/stats hack and add a delete all read messages next to there names? (just an idea) great hack tho dude
the_sisko
04-30-2001, 05:57 PM
[QUOTE]Originally posted by Blue2000
this is very nice Sisko.
Blue2000
05-01-2001, 11:47 AM
Originally posted by The_Sisko
Thx :)didn't get it?:confused: Can you explain it a little more for me?
yeah you did get it :D
Great Idea, will try to add it in the next few days!
NickyNet
05-01-2001, 06:37 PM
great hack..
thx
Flare
05-01-2001, 07:11 PM
Nice hack! Thank you very much :)
jojo85
05-03-2001, 09:49 AM
It's a really nice idea cause at the moment there were only the page and threads stats
thx youuu
zarkov
05-23-2001, 02:48 PM
Thanks for this i could do with this to see who's doin what with the space
GhostMaster
05-26-2001, 03:15 PM
can Admin empty, insert also a User pm box?
that would not badly be if that possible were
krohn
05-27-2001, 11:32 PM
dear god.... We've got over 5k PM's sitting in our db! the average user has 10PM's
the_sisko
05-28-2001, 07:36 AM
[QUOTE]Originally posted by GhostMaster
can Admin empty, insert also a User pm box?
that would not badly be if that possible were
Did anyone recommend this for 2.1? It should be!:)
the_sisko
05-28-2001, 08:18 PM
UPDATED VERSION 1.1
Go to first post in this thread for more infos!!!!!
3 users have a last post of:
31-12-69
19:00:00
It shows these in red. Not likely they posted in 1969! :)
And there is a .php3 extension used in the file so if one doesn't use php3 extensions it will give you an error when clicking on the links for users.
Great hack. This should be put in the next release.
krohn
05-29-2001, 01:09 AM
How about something to auto delete all PM's stored by people who haven't visited in like a month?
Being able to delete things sure does help! Good job man :)
What are your plans on expanding even further? something like deleting messages older than like 2 months or something?
Vbulletin should be able to limit how long PM's are stored...
Blue2000
05-29-2001, 01:11 AM
nice update mate well done
Blue2000
05-29-2001, 01:26 AM
dude when i press 2 at the top of the page i get a page could not be displayed error
krohn
05-29-2001, 01:34 AM
yeah I noticed a few .php3 tags in the code
do a quick search for .php3 in the code and delete the 3... it's in either 2 or 3 places I can't remember. But everythings working great for me after that quick fix.
try the file I attached...
the_sisko
05-29-2001, 07:14 AM
I've updated the zip file and changed all .php3 to .php
3 users have a last post of:
31-12-69
19:00:00
It shows these in red. Not likely they posted in 1969!
the_sisko
05-29-2001, 11:42 AM
Did you import from UBB?
RobAC
05-29-2001, 12:14 PM
First of all nice job!!!
Second, I have that same problem with the last post showing up in 1969 for users that have never posted. I imported from UBB and ran an update script that Tubedogg told me about to fix the dates, which worked in some areas of my forums, but not in all. Any ideas?
the_sisko
05-29-2001, 01:21 PM
RobAC and jucs,
try to go and edit one of the 1969 user in the CP and take a look at last post time. Does it be the same prob with the time, or only in my hack?
RobAC
05-29-2001, 01:43 PM
No, it's not only in your hack but in other parts of the standard CP.
It is in the regular CP readout as well...
I did a clean install of V2.0. No importing from UBB was performed.
Now what?
Is this a V2.0 bug of some sort?
<a href="http://www.vbulletin.com/forum/showthread.php?postid=116787#post116787" target="_blank">Last Post Bug in V2.0?</a>
eva2000
05-29-2001, 05:41 PM
i just installed v1.1 and it's great but what's this about a bug ?
RobAC
05-29-2001, 05:53 PM
Originally posted by eva2000
i just installed v1.1 and it's great but what's this about a bug ?
Well, looks like we have 2 separate bugs going on. One was the use of php3 extensions which was causing a problem when trying to view the next page of pms, but Sisko fixed that and re-uploaded the pmstats.php file to the top of this thread this morning I believe. So...basically, that's fixed, but the next one is what a lot of us have been seeing and that's the 1969 dates. I don't think it's got to with Sisko's hack, but rather a UBB importation problem for those of us who imported from UBB. I could be wrong.
the_sisko
05-29-2001, 07:27 PM
All ZERO post users got this timestamp.......!
Blue2000
05-31-2001, 10:45 AM
nice one dude now you have fixed that php3 code it works great
the_sisko
05-31-2001, 10:48 AM
Just want to mention, a lot of people ask me to modify the hack to read the PM of an user.
I'll wont do this! Private means private and so it should be. Please stop asking me for this one!
etones
05-31-2001, 11:16 AM
Nice Hack Sisqo... great stuff.
I look forward to your upgrade on Overgrows Mod log hack... nice.
lichtflits
06-01-2001, 12:05 PM
when I deleted all post of a member I'll see this: All PM's from .... has been deleted!
that ok.
but is it posible that the page automatic going back to the main pmstats page? (admin/pmstats.php)
cditty
06-09-2001, 06:07 PM
I have seen mention of colors but no definition of them. What do the the colors stand for?
Thanks.
Nice mod.
Chris
zarkov
06-10-2001, 08:26 AM
the lastactivity, lostpost & lastvisit date & times are colour coded Green for less than a week, Blue for 1 - 2 weeks old, and red for any date older that 14 days.
zarkov
06-10-2001, 08:47 AM
Ive come up with this to stop the date problem
In pmstats.php
Find
$lastpost = strftime("%d-%m-%y<br>%H:%M:%S", "$user[lastpost]");
and replace with
if ($user[lastpost]==0){
$lastpost = "Never Posted";
} else {
$lastpost = strftime("%d-%m-%y<br>%H:%M:%S", "$user[lastpost]");
}
All it does it looks for a dateline of 0 (no date) and sets $lastpost to Never Posted instead of the date.
ibeblunt
06-20-2001, 05:27 PM
If the originator of this hack is reading this, how about a hack to be able to delete all PM's over a certain amount of days? Like delete PM's over [x] days old.
Warning: Division by zero in C:\HTTPD\upload\admin\pmstats.php on line 59
can anyone tell me why??
the_sisko
06-21-2001, 05:53 PM
You don't have any PM's on the board, so you got this error. I need to add a if command for fixing this one...
Originally posted by The_Sisko
You don't have any PM's on the board, so you got this error. I need to add a if command for fixing this one...
But i do!! I got 122 Pm's in the database, 19 users with at least one
the_sisko
06-21-2001, 08:58 PM
Did you installed this other stats hack you shows how many active user there are? This hacks adds a variable $limit to the boards, which I'm using too! You need to change then $limit in pmstats (all of it) to something else: e.g. $limit_pm
Originally posted by The_Sisko
Did you installed this other stats hack you shows how many active user there are? This hacks adds a variable $limit to the boards, which I'm using too! You need to change then $limit in pmstats (all of it) to something else: e.g. $limit_pm
Yes it helped :) Thank's a lot
pwr_sneak
07-04-2001, 01:31 PM
Hi,
i just installed this hack on my Board for the first time an tried to access the stats. I was wondering why it didn't show up, checked my server and saw one HTTP-Process using 150 Megs of RAM....
After restarting Apache i took a look at the script ;(
There are lots of MYSQL Queries returning huge unused arrays.
I like this hack, but i have to rewrite it for my board for better performance. If this still doesn't work i will create daily static HTML Pages containing the PMStats output.
BTW my Board at http://www.amihotornot.de has 30000 Users with 270000 stored messages.
If someone is interested in the fast version of this hack, please let me know.
sneak
ldydvr
07-05-2001, 11:47 AM
Always, you bet!
Anytime someone can increase performance and better something I'm all ears (and fingers and eyes)!
=-)
ibeblunt
07-05-2001, 02:29 PM
I would be.
My site has over 60,000 users with 414680 posts. It's crazy these days.
Steven
JackG
07-11-2001, 04:07 AM
Total PM's in database 2331
Users with at least one PM 441
Users PM average ~5
------------------------
Above is my stats. question, are these based on 'un read' messages?
Any chance of a search option ?
the_sisko
07-11-2001, 02:38 PM
I know, there are many querys but I couldn't think of it to make it better at this time. I'm getting better and better maybe I should try to remake it, but the problem is to get all PM of a user in a group....I 'll take a look at it.
I have:
~1100 Members
~80000 post
~2000 PM's
so it works. I'am on my own server (PIII 800, 128MB..)
JackG
07-11-2001, 02:40 PM
Good job on it The_Sisko, if you have time, you may want to add some features. It's a quality usefull hack.
ShadowTech
07-26-2001, 12:38 AM
I am now getting an error after having to swap databases the forum was running on.
<<
Warning: Division by zero in c:\inetpub\wwwroot\vB\admin\pmstats.php on line 59
>>
I read higher that you said it's because there are no posts.. which I don't see that as the problem considering the pmstats.php file is listing the total PMs under that error as :
Total PM's in database 5440
Users with at least one PM 300
Users PM average ~18
I don't know what is causing this.. I redownloaded the pmstats file from this thread and reuploaded it trying to fix it.. but it still gets the error.. worked perfectly before the DB swap.
Sinclair
07-26-2001, 10:34 PM
Originally posted by The_Sisko
...
I have:
~80000 post
...
90000 Posts! ;)
Sinclair
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.