Advertisement:

Author Topic: Moderator activity report  (Read 103932 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