Advertisement:

Author Topic: Moderator activity report  (Read 103910 times)

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Moderator activity report
« on: April 15, 2006, 07:05:26 PM »



If my moderators are off for more than a week then I want to know. So I thought of a quick way to generate info on my moderator activity.

The report needed to tell me

1) Moderators Name
2) How many modification actions they have done
3) How many days they have been inactive
4) Their Member Group

I dont use a db prefix so here is the SQL to generate the report....

Code: [Select]
SELECT
  `members`.`memberName` AS `Member Name`,
  COUNT(`members`.`memberName`) AS `Total Mod Actions`,
  TO_DAYS(now()) - TO_DAYS(from_unixtime(`members`.`lastLogin`)) AS `Days Missing`,
  `membergroups`.`groupName` AS `Member Group`
FROM
  `log_actions`
  RIGHT OUTER JOIN `members` ON (`log_actions`.`ID_MEMBER` = `members`.`ID_MEMBER`)
  INNER JOIN `membergroups` ON (`members`.`ID_GROUP` = `membergroups`.`ID_GROUP`)
WHERE
  (`members`.`ID_group` = 1|| `members`.`ID_group` = 102 || `members`.`ID_group` = 2)
GROUP BY
  `members`.`memberName`,
  `membergroups`.`groupName`
ORDER BY
  `membergroups`.`ID_GROUP`

This is the output....

MemberNameTotal Mod ActionsDays MissingMemberGroup
Tony12320Administrator
David432Global Moderator
Julie6788Global Moderator

The ID_GROUP values in the above sql are the different membergroup ID's. If you dont know what your membergroup ID's are then this query will output them for you..

Code: [Select]
SELECT ID_GROUP,groupName FROM `membergroups`
if you have a prefix use

Code: [Select]
SELECT ID_GROUP,groupName FROM `{db_prefix}membergroups`
It should give you something like...


 GROUP_ID groupName
 
     1 Administrator
     2 Global Moderator
     4 Un-Ranked
     5 Jr. Member
     6 Full Member
     7 Sr. Member
     8 Gold Member
     91 Banned
     102 Site Moderator
 





If you use a db prefix then you will need to modify the {db_prefix} to be whatever you have chosen - although I havent tested it here it is.....

Code: [Select]
SELECT
  `{db_prefix}members`.`memberName` AS `Member Name`,
  COUNT(`{db_prefix}members`.`memberName`) AS `Total Mod Actions`,
  TO_DAYS(now()) - TO_DAYS(from_unixtime(`{db_prefix}members`.`lastLogin`)) AS `Days Missing`,
  `{db_prefix}membergroups`.`groupName` AS `Member Group`
FROM
  `log_actions`
  RIGHT OUTER JOIN `{db_prefix}members` ON (`{db_prefix}log_actions`.`ID_MEMBER` = `{db_prefix}members`.`ID_MEMBER`)
  INNER JOIN `membergroups` ON (`{db_prefix}members`.`ID_GROUP` = `{db_prefix}membergroups`.`ID_GROUP`)
WHERE
  (`{db_prefix}members`.`ID_group` = 1|| `{db_prefix}members`.`ID_group` = 102 || `{db_prefix}members`.`ID_group` = 2)
GROUP BY
  `{db_prefix}members`.`memberName`,
  `{db_prefix}membergroups`.`groupName`
ORDER BY
  `{db_prefix}membergroups`.`ID_GROUP`


If any mod writers are reading this I think It would be nice to see a pretty version of this in the report section of the admin area :)

*note to moderator  - Not sure if this is of use to anyone - but it might be worth putting in Tips & Tricks
« Last Edit: May 16, 2006, 07:18:00 PM by Tony »
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #1 on: April 16, 2006, 04:19:38 AM »
Update this today to fix a bug :)

If anyone finds this useful then please let me know.

Tony
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline rosoner

  • Semi-Newbie
  • *
  • Posts: 17
  • Gender: Male
  • Gromoglasnik
    • FM Serbia
Re: Moderator activity report
« Reply #2 on: April 21, 2006, 05:50:25 AM »
this would be great mod!
Ko je ukrao moj sir?

Offline Surfy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Male
Re: Moderator activity report
« Reply #3 on: April 28, 2006, 05:38:18 AM »


Wow, this would be usefull.. But i have no idea, how to use it, or how i made an entry in my Admin section for it.. My skill is noobie  :'(  -  i hope someone could made a mod  :)

Offline Vinspire^

  • Semi-Newbie
  • *
  • Posts: 82
Re: Moderator activity report
« Reply #4 on: May 05, 2006, 05:41:27 AM »
Which file should we edit and is there any screenshot preview of this mod ?

Offline Anakin_holland

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
  • universe malfunction, restart reality.sys ?
Re: Moderator activity report
« Reply #5 on: May 05, 2006, 06:09:06 AM »
Which file should we edit and is there any screenshot preview of this mod ?

This isn't a mod, but a query to be executed in PHPMyAdmin directly. Inside PHPMyAdmin click on the database to acces it, then click on the button "SQL" and copy/paste your edited query. Next, click on "Go" and watch the result.

It could become a mod one thay though. Maybe as an extra report inside Admin CP/Generate reports?

Thanks for this one! Might come in handy one day!

Note: If you want to use this query, you have to stop clearing out the Moderation Log! ;) And by default it shows me a value of '1' if no moderation-action have been done?
« Last Edit: May 05, 2006, 06:11:06 AM by Anakin_holland »

Offline Vinspire^

  • Semi-Newbie
  • *
  • Posts: 82
Re: Moderator activity report
« Reply #6 on: May 05, 2006, 06:18:51 AM »
Oh ... Query is PHPMyAdmin. Okie. I got it :P

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #7 on: May 05, 2006, 09:41:23 AM »
Ive just made this into a mod ;)


Tony
« Last Edit: May 05, 2006, 03:36:43 PM by Tony »
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report [Preview]
« Reply #8 on: May 05, 2006, 04:16:20 PM »
I've still got a few things to do - add a link to the mod report in admin cp and also some other tidying up - but for now - Here is a screenshot of the mod.


I may bring in Karma stats also and make the Names link to profiles.

Then all I have to do is work out how to package it :)

Hopefully this will be finished in a couple of days.

Tony
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Surfy

  • Jr. Member
  • **
  • Posts: 156
  • Gender: Male
Re: Moderator activity report
« Reply #9 on: May 05, 2006, 09:15:05 PM »

sweeeet, this is a must have  :-* :-*

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #10 on: May 06, 2006, 06:08:37 AM »
I Now have it showing Karma and its linked to profiles.

Will upload screenshots later.

I have other ideas for improvement too :)

Tony
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Trekkie101

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,157
  • Gender: Male
  • Ad Astra!
    • https://www.facebook.com/DLRPRoundup on Facebook
    • @dlrproundup on Twitter
    • DLRP Roundup
Re: Moderator activity report
« Reply #11 on: May 06, 2006, 06:48:50 AM »
Very nice!

Can't wait to see a packaged mod :)

Offline Aaron

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,711
  • Gender: Male
    • Aaronweb.net
Re: Moderator activity report
« Reply #12 on: May 06, 2006, 06:49:34 AM »
Very cool! I'm looking forward to this one. :)

Offline mindvsmind

  • Newbie
  • *
  • Posts: 7
Re: Moderator activity report
« Reply #13 on: May 06, 2006, 02:55:15 PM »
is there a file to install it or we have to do it manually

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #14 on: May 06, 2006, 03:47:31 PM »
is there a file to install it or we have to do it manually

It will be installable via package manager :)
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: Moderator activity report
« Reply #15 on: May 06, 2006, 03:54:04 PM »
Looking nice. Good luck. :)
Dev Consultant
Former SMF Doc Coordinator

Offline mindvsmind

  • Newbie
  • *
  • Posts: 7
Re: Moderator activity report
« Reply #16 on: May 07, 2006, 01:08:03 PM »
is there a file to install it or we have to do it manually

It will be installable via package manager :)

when r u releasing this mod ?

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #17 on: May 07, 2006, 05:01:38 PM »
Version 1.0 of this mod is finished - all thats left to do is package it up, its just that I haven't had time to learn how to do packaging today so will do that tomorrow night sometime.

The mod was originally designed as a quick way for me to find out how many days each moderator had been inactive but it has been enhanced to provide:

1) Moderators Name (linked to profile)
2) How many modification actions they have done (Drill down link to view their moderator actions)
3) How many days they have been inactive (since last logged in)
4) Karma points - both good and bad
4) Their Member Group

Overview Screenshot


Full screenshot

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Harzem

  • SMF Hero
  • ******
  • Posts: 5,384
  • Gender: Male
  • I know, my avatar is nerve-wracking!
Re: Moderator activity report
« Reply #18 on: May 07, 2006, 05:10:43 PM »
Why are you adding karma functionality? Most of the boards don't even use karma, and most of the rest don't bother the karma of the moderators.

Instead, having a link to "moderator specific" actions would be great. I click on a link for a mod and see what he/she has done.

I can help you in coding it also.

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #19 on: May 07, 2006, 05:25:15 PM »
It has a link to moderator spefic actions already which can be accessed by clicking the moderator actions link ;)

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Harzem

  • SMF Hero
  • ******
  • Posts: 5,384
  • Gender: Male
  • I know, my avatar is nerve-wracking!
Re: Moderator activity report
« Reply #20 on: May 07, 2006, 05:50:42 PM »
Yes, I see now :P By the search box.

Offline Anakin_holland

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
  • universe malfunction, restart reality.sys ?
Re: Moderator activity report
« Reply #21 on: May 08, 2006, 02:06:59 AM »
Nice! Looking forward to this one!

Offline Ryan

  • Full Member
  • ***
  • Posts: 594
  • Gender: Male
Re: Moderator activity report
« Reply #22 on: May 10, 2006, 07:49:42 PM »
Yea ive been asking for such mod for a long time...

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Moderator activity report
« Reply #23 on: May 10, 2006, 11:44:34 PM »
Wow ... this mod is so kewl .... is it fully working yet ?

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #24 on: May 11, 2006, 05:33:31 AM »
Its working - I just havent had time to package it up.

Hopefully will get round to it tonight :)

Tony
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Moderator activity report
« Reply #25 on: May 14, 2006, 06:41:57 PM »
Version 1.0 of this mod is finished - all thats left to do is package it up, its just that I haven't had time to learn how to do packaging today so will do that tomorrow night sometime.

The mod was originally designed as a quick way for me to find out how many days each moderator had been inactive but it has been enhanced to provide:

1) Moderators Name (linked to profile)
2) How many modification actions they have done (Drill down link to view their moderator actions)
3) How many days they have been inactive (since last logged in)
4) Karma points - both good and bad
4) Their Member Group

Overview Screenshot


Full screenshot
This look so kewl ... I am really excited and looking forward for this mods :)

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #26 on: May 16, 2006, 06:59:16 PM »
The mod team have yet to approve it, so usual disclaimer and back up before applying! - but here it is when they have OK'd it... (hopefully)

http://mods.simplemachines.org/index.php?mod=345
« Last Edit: May 16, 2006, 07:03:45 PM by Tony »
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Moderator activity report
« Reply #27 on: May 17, 2006, 11:03:58 AM »
The mod team have yet to approve it, so usual disclaimer and back up before applying! - but here it is when they have OK'd it... (hopefully)

http://mods.simplemachines.org/index.php?mod=345

Okie  ;D ;D ;D

Offline Skipdawg

  • Sr. Member
  • ****
  • Posts: 895
  • Gender: Male
  • SMF Über Fan!
    • Skipdawg Central
Re: Moderator activity report
« Reply #28 on: May 17, 2006, 11:59:10 AM »
Will this work with custom ranks? Like if I have created a status rank of Super Moderator between the Administrator and Global Moderator.
Skipdawg's Community

Powered by SMF 1.1.3

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #29 on: May 17, 2006, 12:29:08 PM »
Will this work with custom ranks? Like if I have created a status rank of Super Moderator between the Administrator and Global Moderator.

Yeah.. in fact I have a similar thing and use memberroup '102' you just need to open up modreport.php and change the where clause from...

Code: [Select]

({$db_prefix}members.ID_group = '1' || {$db_prefix}members.ID_group = '2')



to

Code: [Select]

({$db_prefix}members.ID_group = '1' || {$db_prefix} members.ID_group = '2'
|| {$db_prefix}members.ID_group = 'NEWGROUPID' )


You can add as many groups as you want that way.

NEWGROUPID obvisouly being the id number of the additional group.

Tony
« Last Edit: May 17, 2006, 12:35:57 PM by Tony »
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Skipdawg

  • Sr. Member
  • ****
  • Posts: 895
  • Gender: Male
  • SMF Über Fan!
    • Skipdawg Central
Re: Moderator activity report
« Reply #30 on: May 17, 2006, 10:00:39 PM »
kewl thanks. This just may come in handy then soon.  ;D
Skipdawg's Community

Powered by SMF 1.1.3

Offline Miyagi

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Male
Re: Moderator activity report
« Reply #31 on: May 20, 2006, 01:17:21 PM »
Not sure why.. (unless you cannot d/l unauthorised mods) but when i go to the mod page (http://mods.simplemachines.org/index.php?mod=345) and click on the file to d/l it just times out... help! This sounds like a great mod, i just cant get it :)

Cheers,
Miyagi
FordXR5Turbo.com - Dedicated to the Ford Focus & Mondeo XR5 Turbo in Australia
FordXR4.com - Dedicated to the Ford Fiesta XR4 in Australia

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Moderator activity report
« Reply #32 on: May 20, 2006, 10:02:02 PM »
Cause the mod havent been authorized by SMF Staff ?

Offline wimvincken

  • Semi-Newbie
  • *
  • Posts: 36
  • Gender: Male
    • HP Fanfiction
Re: Moderator activity report
« Reply #33 on: February 07, 2008, 07:08:14 PM »
The mod team have yet to approve it, so usual disclaimer and back up before applying! - but here it is when they have OK'd it... (hopefully)

http://mods.simplemachines.org/index.php?mod=345
And it works like a train for the 1.1.4. Thanks for this mod.

I have special groups, which are not really mods, but close. And suddenly I can monitor their activity. Thanks, very useful mod.

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: Moderator activity report
« Reply #34 on: October 24, 2008, 09:58:57 AM »
This mod should be made for SMF 2.X SMF. It's very interesting.

Offline MsAdvantageous

  • Semi-Newbie
  • *
  • Posts: 12
  • down the rabbit hole & into my heart we go.. ♥
Re: Moderator activity report
« Reply #35 on: December 08, 2010, 06:47:07 PM »
I love this idea, thank you.

Offline Realinfo

  • Full Member
  • ***
  • Posts: 626
    • Real Info
Re: Moderator activity report
« Reply #36 on: August 16, 2012, 05:59:47 AM »
When we can get this for 2.0.2

TheListener

  • Guest
Re: Moderator activity report
« Reply #37 on: August 16, 2012, 07:01:03 PM »
When we can get this for 2.0.2

This is already built into 2.0.2 I believe.

 :)

Offline Realinfo

  • Full Member
  • ***
  • Posts: 626
    • Real Info
Re: Moderator activity report
« Reply #38 on: August 16, 2012, 08:57:16 PM »
1.    Execute Modification    ./index.php    Test failed
      1.    Add Before    ./index.php    Test failed
*    2.    Execute Modification    ./Sources/Subs.php    Test failed
      1.    Replace    ./Sources/Subs.php    Test failed
*    3.    Execute Modification    ./Sources/ManageMembergroups.php    Test failed
      1.    Replace    ./Sources/ManageMembergroups.php    Test failed
      2.    Add After    ./Sources/ManageMembergroups.php    Test successful
      3.    Replace    ./Sources/ManageMembergroups.php    Test failed
      4.    Add After    ./Sources/ManageMembergroups.php    Test successful
*    4.    Execute Modification    ./Themes/default/ManageMembergroups.template.php    Test failed
      1.    Replace    ./Themes/default/ManageMembergroups.template.php    Test failed
*    5.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
   6.    Extract File    ./Themes/default/ModReporting.template.php    
   7.    Extract File    ./Sources/ModReport.php    
   8.    Execute Code    addsql.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,149
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: Moderator activity report
« Reply #39 on: August 17, 2012, 04:05:58 AM »
@RealInfo - your installing a mod made for 1.x and not SMF 2 - that's why you have errors.

To get this working on 2 - the underlying code is different.

I do have it running on 2.0.2, but haven't got around to packaging it up.

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Realinfo

  • Full Member
  • ***
  • Posts: 626
    • Real Info
Re: Moderator activity report
« Reply #40 on: August 17, 2012, 10:16:47 PM »
try to packaging it up............. we are waiting...........

also tell where we can see Moderator activity report after installing it...............

Offline Crozz

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
Re: Moderator activity report
« Reply #41 on: August 26, 2012, 03:58:44 AM »
@RealInfo - your installing a mod made for 1.x and not SMF 2 - that's why you have errors.

To get this working on 2 - the underlying code is different.

I do have it running on 2.0.2, but haven't got around to packaging it up.
Will you be giving the mod for 2.0.2 out to the public?

Offline sturmkatze

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
  • really?
    • sturmkatze on Facebook
    • @sturmkatze on Twitter
    • reenactor.Net
Re: Moderator activity report
« Reply #42 on: September 25, 2013, 07:54:59 PM »
Ja, it's been over a year...