Page 1 of 14

[ABD] Activity Stats (includes "who was here?")

Posted: Sun Sep 14, 2014 10:09 pm
by combuster
Please test the extension and provide feedback here or at github, THX!

Extension Name: Activity Stats
Author: combuster

Extension Description::

phpBB 3.1 extension that displays statistics of the latest activities on the boards index site.

This extension is the 3.1.x version of the 3.0.x Activity Stats MOD merged with 3.0.x Who was here? MOD.

NOTE: To increase performance the calculated data is cached (10min by default, adjustable in ACP) - so it might take a while until the stats are updated.

Extension Version:: 1.2.3-DEV

Features:
  • adjust the timespan that is considered for calculating the "lately" activities in ACP
  • show count of new topics, new posts and newly registered users in that timespan ("Activity Stats")
  • list of useres who have been active lately ("Who was here?")
  • en-/disable new topics in the list (adjustable in ACP)
  • en-/disable new posts in the list (adjustable in ACP)
  • en-/disable new users in the list (adjustable in ACP)
  • en-/disable bots in the list (adjustable in ACP)
  • en-/disable hidden users in the list (adjustable in ACP)
  • en-/disable guests in the record (adjustable in ACP)
  • en-/disable visit-time in the list or as "hover" on the name (adjustable in ACP)
  • display and store the record (in ACP)
  • reset-function (in ACP)
  • time is displayed with user-timezone and dst(daylight-saving-time) adjustment of the ucp
  • usernames are coloured
  • Data is cached to improve performance (cache-time adjustable in ACP)
  • permission who can see the stats:
    Disabled (default)=everybody can always see the stats (permission is ignored).
    Enabled=use user permission like configured in ACP. It can be assigned to users and/or groups. By default its assigned to the roles ROLE_ADMIN_FULL, ROLE_USER_FULL, ROLE_USER_STANDARD.
Screenshots:
Image
Image
Image

Downloads: Extension Repository:

Github: https://github.com/RobertHeim/phpbb3_1- ... ivitystats

Installation:
  1. Clone (or download an move) the repository into the folder phpBB3/ext/robertheim/activitystats:

    Code: Select all

    cd phpBB3
    git clone https://github.com/RobertHeim/phpbb3_1-ext-activitystats.git ext/robertheim/activitystats/
    
  2. Go to admin panel -> tab customise -> Manage extensions -> enable Activity Stats
  3. Go to admin panel -> tab Extensions -> Activity Stats -> Settings for configuration
Donation:
Please donate to any charity organisation or buyme a bear on my blog, Thanks!

Changelog:
Since 1.2.2-DEV
  • Bug-Fixes
Since 1.2.1-DEV
  • Bug-Fixes (especially timezone handling is now much better and phpbb3.1 conform)
  • plurals & typos
Since 1.2.0-DEV
  • *fixed* users that are not allowed to see the stats were not recorded
  • more plurals
  • improved documentation
  • removed permission assignments to forum-roles on installation
Since 1.1.2-DEV
  • fixed HTML
  • added permissions for viewing stats
Since 1.1.1-DEV
  • mode-selection fixed (e.g. switching from "period of time" to "today")
  • better explenation of today-mode
  • bug-fixes
Since 1.1.0-DEV:
  • minor bug fixes
Since 1.0.0-RC3:
  • all the "Who was here?"-Features
  • several bug fixes
  • caching time adjustable
  • en-/disable new topics/posts/users
  • plurals
Since 1.0.0-RC2:
  • added count of guests that were active in the last 24 hours

Re: [RC] Activity Stats

Posted: Mon Sep 15, 2014 7:45 am
by Meis2M
well done...

can u add number of guests who visited in 24 h ?

Re: [RC] Activity Stats

Posted: Mon Sep 15, 2014 1:43 pm
by combuster
Meis2M wrote:can u add number of guests who visited in 24 h ?
short: no

long:
  1. The ext should match the exact functionality as the MOD for 3.0.x
  2. We would need to store additional data to not count a guest twice, right?

Re: [RC] Activity Stats

Posted: Mon Sep 15, 2014 5:17 pm
by Raul [ThE KuKa]
Nice Extension!!! ;)

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 10:52 am
by RMcGirr83
combuster wrote:
Meis2M wrote:can u add number of guests who visited in 24 h ?
short: no
If you don't care if guests are counted more than once

Code: Select all

        // total guests in the last 24 hours
        $sql = 'SELECT COUNT(session_ip) AS num_guests
                FROM ' . SESSIONS_TABLE . '
                WHERE session_user_id = ' . ANONYMOUS . '
                AND session_time >= ' . $interval;                
        $result = $db->sql_query($sql);
        $activity['guests'] = $db->sql_fetchfield('num_guests');
        $db->sql_freeresult($result); 
and if you do care

Code: Select all

        // total guests in the last 24 hours
        $sql = 'SELECT COUNT(DISTINCT session_ip) AS num_guests
                FROM ' . SESSIONS_TABLE . '
                WHERE session_user_id = ' . ANONYMOUS . '
                AND session_time >= ' . $interval;                
        $result = $db->sql_query($sql);
        $activity['guests'] = $db->sql_fetchfield('num_guests');
        $db->sql_freeresult($result); 

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 3:48 pm
by combuster
Thanks RMcGirr83!

I added it and updated the downloads to 1.0.0-RC3.

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 5:05 pm
by RMcGirr83
You're welcome but you need to edit the html file, the lang file as well as the event php file to get it to display. Right now you have the query but the output from it isn't displaying anywhere.

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 6:45 pm
by combuster
RMcGirr83, my friend, look again, as I said I added it already: “1 users and 1guests have been active in the last 24h“

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 8:18 pm
by leschek
Interesting. I like "Who was here" MOD and this extension could replace it, when I'll update my board. I have a few questions:

1. Is possible to set permission who can see it?
2. Is possible to set time range or it is always 24 hours?
3. Do you plan to add plurals?

Re: [RC] Activity Stats

Posted: Tue Sep 16, 2014 9:22 pm
by Jessica
The "Who was here" MOD added an option to choose the last time visited to show in a hover when putting the mouse over a username. Can you add that to the extension please?

Re: [RC] Activity Stats

Posted: Wed Sep 17, 2014 1:45 am
by RMcGirr83
The "who was here mod" is not the same as this mod.

Re: [RC] Activity Stats

Posted: Wed Sep 17, 2014 2:14 am
by Jessica
I beg to differ.

Part of the Activity Stats mod/ext is the last users/guests visited in the last 24 hours feature. That's essentially the Who was Here mod (for the users last visited), even if it's not exact

Re: [RC] Activity Stats

Posted: Fri Sep 19, 2014 1:45 pm
by combuster
I think we can merge both 3.0 MODS "Activity Stats" with "Who was here" in this 3.1 extension.
leschek wrote:1. Is possible to set permission who can see it?
2. Is possible to set time range or it is always 24 hours?
3. Do you plan to add plurals?
Thx for ideas. I will add these things in 1.1.0. See https://github.com/RobertHeim/phpbb3_1- ... ats/issues
Jessica wrote:The "Who was here" MOD added an option to choose the last time visited to show in a hover when putting the mouse over a username. Can you add that to the extension please?
Was this feature available only at the part of the index-page where the last activity-stats were shown or everywhere where a user-name is shown (board-wide)?

Re: [RC] Activity Stats

Posted: Sat Sep 20, 2014 2:00 am
by RMcGirr83
combuster wrote:Was this feature available only at the part of the index-page where the last activity-stats were shown or everywhere where a user-name is shown (board-wide)?
As far as I recall, on the index page (it was a hover title thing).

Re: [RC] Activity Stats

Posted: Sat Sep 20, 2014 5:11 am
by combuster
:arrow: Huge *UPDATE*: integrated all features of "Who was here"-3.0.x-MOD as well as (adjustable) caching and some other tweaks! See first post for full feature list and screenshots!

Donate to some charity organisation. Thanks! :)