Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jul 2006
Posts: 62
C
journeyman
journeyman
C Offline
Joined: Jul 2006
Posts: 62
Hi all,

I posted this Mod suggestion over at UBBDev here.

Thought I would mention it here because there at least seems to be more activity here than there.

I'm guessing due to the request from Rick for mod/hacks to be done there, replies, solutions should be done there smile

Quote
I'm thinking about a mod to display in a portal island, or better yet, as part of forum statistics portal, the # of users that have been active over some configurable period of time. Even better would be to have it display possibly 3 periods of time, for instance, the # of active users over the past day, week, month.

To define active user, I'm thinking ostensibly of those who've logged in in that time period. Another variant or a modification to this theme would be # who've posted over those time frames.

To wrap that up with a nice bow, even to have an option of expressing that # as a percentage of your total user base. Also, some ability to possibly display right in your face (rather than have to do the math yourself) the percentage of active posters against the overall logging in base on those same time periods.

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Here's the query....

SQL Query
SELECT Count( * ) AS UserPosts, POST_POSTER_NAME
FROM ubbt_POSTS
WHERE POST_POSTED_TIME > UNIX_TIMESTAMP( CURRENT_DATE ) -86400 *30
GROUP BY POST_POSTER_NAME
ORDER BY UserPosts DESC
LIMIT 60

replace 30 with the number of days
...and 60 with the total number wanted on the list.

I think Rick provided me with this code smile

Joined: Jul 2006
Posts: 62
C
journeyman
journeyman
C Offline
Joined: Jul 2006
Posts: 62
Nah, that's not quite what I'm after. That's a listing of top posters.

What I'm really trying to get to is 1) How many of my users are logging in within the time frame. 2) out of that set, how many of them are actually even making a post. I don't care WHO they are, just the number of users who've logged in that are making posts.

While the number of users making posts is probably the true sense of "active", I'm curious as well to how much of my userbase is at least coming by for a read, even if they're not commenting, and I'm just wanting raw numbers so it's easy to get a feel of it as a percentage of my overall total base.

So, I've got just under 2000 registered users. I kind of want to know, at a easily viewed place, how many of those 2000 are logging in over the past day, week, month. Let's say it's only 300. Then I know that rougly only 1/7th of my total user base is logging in regularly.

Next to that then, if I'm seeing 300 logging in over x period....hmmm...how many are actually posting, let's say I've only got 100 actually posting.

Anyway, that's what I'm looking for.

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Originally Posted by Carte Blanche
That's a listing of top posters.

Not so.
It is a list of 'active' posters - which is a part of what you are looking for.

But, whatever...

Joined: Jul 2006
Posts: 62
C
journeyman
journeyman
C Offline
Joined: Jul 2006
Posts: 62
You are correct, my mistake.

Joined: Jan 2009
Posts: 22
W
stranger
stranger
W Offline
Joined: Jan 2009
Posts: 22
Where would I put this code? I'm interested in it.

Thanks

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Code didn't work for me

Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
have you tried creating a search based one hose parameters and saving it?



"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
I saved it to a thing in the message board.

Joined: Aug 2006
Posts: 1,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
Originally Posted by driv
Here's the query....

There is a an easier query without grouping for this:

SQL Query
select count(*) from ubbt_USER_DATA where
USER_LAST_POST_TIME > UNIX_TIMESTAMP( CURRENT_DATE ) -86400 *30

for posting activity in the last 30 days

Replace USER_LAST_POST_TIME with USER_LAST_VISIT_TIME if "active" for you is also a user that logged in.

Small job to add this to the stats island.

Last edited by Yarp™; 12/05/2009 6:25 PM.

[Linked Image from siemons.org]

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Member Permissions Help
by domspeak - 02/27/2024 5:31 PM
Forum Privacy Policy
by ECNet - 02/26/2024 10:58 AM
search error on this site.
by Ruben - 02/24/2024 12:52 PM
UBB 20 Years button
by Morgan - 02/20/2024 4:21 PM
Attachment/Cloudflar
e issue

by Morgan - 02/15/2024 5:47 AM
Who's Online Now
1 members (Geoff), 322 guests, and 399 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)