Activity Stats MOD

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
iEric
Registered User
Posts: 249
Joined: Mon Apr 10, 2006 10:57 pm
Location: Falköping, Sweden
Contact:

Re: Activity Stats MOD

Post by iEric » Thu Mar 20, 2008 3:40 pm

Hi
Great Mod!

I have 2 questions.
1. When it lists the users over the past 24 hours they are sorted by alphabet, but there's a split on the "case".
Example: Adam, Bert, Carl, David, Google [Bot], Zorro, ape, barney, cooper, ÅÄÖnames, ...»
Can it be altered to Aa-Bb-Cc-listing?

2. And is there any way to exclude "Bot's" from the list?

Thanks.

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Spokane, WA
Name: David Lewis
Contact:

Re: Activity Stats MOD

Post by Highway of Life » Thu Mar 20, 2008 7:07 pm

iEric wrote:1. When it lists the users over the past 24 hours they are sorted by alphabet, but there's a split on the "case".
Example: Adam, Bert, Carl, David, Google [Bot], Zorro, ape, barney, cooper, ÅÄÖnames, ...»
Can it be altered to Aa-Bb-Cc-listing?
Ah, yes... how silly of me.
FIND:

Code: Select all

'ORDER_BY'    => 'u.username', 
REPLACE, WITH:

Code: Select all

'ORDER_BY'    => 'u.username_clean', 
iEric wrote:2. And is there any way to exclude "Bot's" from the list?
Yes...
FIND:

Code: Select all

'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' OR s.session_user_id <> ' . ANONYMOUS, 
REPLACE, WITH:

Code: Select all

'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE . ',
I’ve not tested this block, if you use it and you don’t mind, can I get an SQL report on that query?
Thanks!
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Spokane, WA
Name: David Lewis
Contact:

Re: Activity Stats MOD

Post by Highway of Life » Thu Mar 20, 2008 7:15 pm

xnitelifex wrote:Why the difference?
What is the question?
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

jomasaco
Registered User
Posts: 32
Joined: Tue Dec 04, 2007 1:59 pm

Re: Activity Stats MOD

Post by jomasaco » Thu Mar 20, 2008 9:03 pm

Thanks for more one great mod.
That for the bots are not working.

Here is the Portuguese Language.
http://www.snapdrive.net/files/361497/a ... _stats.zip

User avatar
iEric
Registered User
Posts: 249
Joined: Mon Apr 10, 2006 10:57 pm
Location: Falköping, Sweden
Contact:

Re: Activity Stats MOD

Post by iEric » Thu Mar 20, 2008 9:34 pm

Thanks - is sorts fine now. :)

The change for the Bot didn't work for me, it gave me a blank page with an error-msg. I removed in the end so it looked like the previous one. From: USER_IGNORE . ', => USER_IGNORE,
(Don't know if that was correct, but it works here).

It must be this one in the report.

Code: Select all

QUERY #11
SELECT u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour, s.session_ip, s.session_viewonline
FROM phpbb3_users u, phpbb3_sessions s
WHERE s.session_time >= 1206046227
AND u.user_id = s.session_user_id
ORDER BY u.username_clean ASC, s.session_ip ASC

ID	SELECT TYPE	TABLE	TYPE	POSSIBLE KEYS	KEY	KEY LEN	REF	ROWS	EXTRA
1	SIMPLE	s	range	session_time,session_user_id	session_time	4	 	3	Using where; Using temporary; Using filesort
1	SIMPLE	u	eq_ref	PRIMARY	PRIMARY	3	hostaccount_DBname.s.session_user_id	1	 
Before: 0.12649s | After: 0.12690s | Elapsed: 0.00041s
[/size]

xnitelifex
Registered User
Posts: 126
Joined: Wed Jun 27, 2007 6:35 pm

Re: Activity Stats MOD

Post by xnitelifex » Thu Mar 20, 2008 10:05 pm

Highway of Life wrote:
xnitelifex wrote:Why the difference?
What is the question?
I'm trying to figure out why the names are linked to their profile even when guests are not allowed to view, while I gave the same permission to registered users, it works as it should. Sorry if I'm confusing.

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Spokane, WA
Name: David Lewis
Contact:

Re: Activity Stats MOD

Post by Highway of Life » Fri Mar 21, 2008 8:27 am

iEric, okay... use this on the WHERE line:

Code: Select all

'WHERE'        => 'u.user_type <> ' . USER_IGNORE . ' AND (u.user_lastvisit > ' . (time() - 86400) . ' OR s.session_user_id <> ' . ANONYMOUS . ')', 
It shouldn’t have been issuing an error unless I made a typo. :?
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
iEric
Registered User
Posts: 249
Joined: Mon Apr 10, 2006 10:57 pm
Location: Falköping, Sweden
Contact:

Re: Activity Stats MOD

Post by iEric » Fri Mar 21, 2008 10:26 am

Thanks.
Hm... The last line didn't get to work for me. Bot's still showed up in the list.

# # #

About the error-msg I got. Here's what I got in return from the first line:

Code: Select all

            'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE . ',
            'GROUP_BY'    => 'u.user_id',
            'ORDER_BY'    => 'u.username_clean',
        );
And the error-msg was: Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/account/public_html/forum/includes/functions_activity_stats.php on line 89

And when I tried:

Code: Select all

'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE, 
(like the original line was ending . ANONYMOUS, )
It doesn't list the bots, but I don't know if it's right

...all 3:

Code: Select all

            'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE,
            'GROUP_BY'    => 'u.user_id',
            'ORDER_BY'    => 'u.username_clean',
        ); 
[/size]
:roll: Hope it is ok to go with that?

I tried all these by making a new user added to the bot-group. The old bots showed up in all versions. Had to be someone who haven't been online for 24h.

JasonWade
Registered User
Posts: 287
Joined: Mon Jun 05, 2006 9:22 am

Re: Activity Stats MOD

Post by JasonWade » Fri Mar 21, 2008 3:31 pm

JasonWade wrote:
Highway of Life wrote:
JasonWade wrote:Is this the same as the last RC or is it updated after? Cause I got the last RC version and it has a slight "error":

when in the last 24 hours 2 new people register and in the 24 hours after I delete someone and no new members register it still says 2 new people registered, how can I fix this?
It’s cached for 1 hour, see FAQ on the third post.

The only things that changed were the install instructions to increment instead of replace-with, though you won’t see any difference either way you go.
Also added the missing <edit></edit> tags to make it work properly with Blinky. Other than that, there are no other changes.
I know the one hour thing but like I typed in the last 24 hours (more even) 0 new members registered but it still said 2 so I figure that's because I deleted a member in those 24 hours, that's what the problem is ;)

And thnx for letting me know about the edits
Ahhh I already know what it is, there were new members, but they haven't activated their account yet, so it seemed like there were no new members (cause I don't always check if there are newbies who haven't activated their account yet), but I get it now ;)

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Spokane, WA
Name: David Lewis
Contact:

Re: Activity Stats MOD

Post by Highway of Life » Fri Mar 21, 2008 7:17 pm

iEric wrote:Thanks.
Hm... The last line didn't get to work for me. Bot's still showed up in the list.
That’s odd because I tested it and it omitted the bots. :?
I tested it on the STG DB, so I know it works.
iEric wrote:About the error-msg I got. Here's what I got in return from the first line:

Code: Select all

            'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE . ',
            'GROUP_BY'    => 'u.user_id',
            'ORDER_BY'    => 'u.username_clean',
        );
And the error-msg was: Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/account/public_html/forum/includes/functions_activity_stats.php on line 89
Yes, I see it now, I made a typo with the . '
iEric wrote:And when I tried:

Code: Select all

'WHERE'        => 'u.user_lastvisit > ' . (time() - 86400) . ' AND u.user_type <> ' . USER_IGNORE,  
(like the original line was ending . ANONYMOUS, )
It doesn't list the bots, but I don't know if it's right
I don’t think doing it this way shows the correct results... not tested though.

My last code change should work, it won’t show any deactivated or bots/spiders.
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
ChaosBurnt
Registered User
Posts: 194
Joined: Fri May 25, 2007 12:33 pm
Location: London, UK

Re: Activity Stats MOD

Post by ChaosBurnt » Sat Mar 22, 2008 10:11 am

Works like a charm Highway, thanks for this mod' :D
For everyone's information, the templates I provided are back under the copyright property of the original designer, EidolonHades.

JasonWade
Registered User
Posts: 287
Joined: Mon Jun 05, 2006 9:22 am

Re: Activity Stats MOD

Post by JasonWade » Sat Mar 22, 2008 12:33 pm

THnx for the edits above, "normal" sorting now and no more bots, perfect! :)

JasonWade
Registered User
Posts: 287
Joined: Mon Jun 05, 2006 9:22 am

Re: Activity Stats MOD

Post by JasonWade » Sat Mar 22, 2008 12:34 pm

Highway of Life wrote:iEric, okay... use this on the WHERE line:

Code: Select all

'WHERE'        => 'u.user_type <> ' . USER_IGNORE . ' AND (u.user_lastvisit > ' . (time() - 86400) . ' OR s.session_user_id <> ' . ANONYMOUS . ')', 
It shouldn’t have been issuing an error unless I made a typo. :?
^This one works perfect for me

hamali
Registered User
Posts: 57
Joined: Fri Mar 21, 2008 3:19 am

Re: Activity Stats MOD

Post by hamali » Sat Mar 22, 2008 2:27 pm

:) Thanks dudes. Followed the instructions on the xml file. Works like a charm. 1st coding (ever in life) and MODding.

:)

User avatar
Mr Fishy
Registered User
Posts: 11
Joined: Fri Feb 22, 2008 5:50 pm
Location: City under the Sea
Contact:

Re: Activity Stats MOD

Post by Mr Fishy » Sat Mar 22, 2008 8:50 pm

Excellent mod Highway, thanks. :D
Mr Fishy
ImageDover-Sea-Angling.com

Locked

Return to “[3.0.x] MOD Database Releases”

Who is online

Users browsing this forum: No registered users and 29 guests