This has been converted into a Mod!
(http://mods.simplemachines.org/index.php?mod=345)
Screenshots
http://www.simplemachines.org/community/index.php?topic=82230.msg571761#msg571761
SQL code left here for the curious
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....
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....
MemberName | Total Mod Actions | Days Missing | MemberGroup |
Tony | 1232 | 0 | Administrator |
David | 43 | 2 | Global Moderator |
Julie | 678 | 8 | Global 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..
SELECT ID_GROUP,groupName FROM `membergroups`
if you have a prefix use
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.....
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
Update this today to fix a bug :)
If anyone finds this useful then please let me know.
Tony
this would be great mod!
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 :)
Which file should we edit and is there any screenshot preview of this mod ?
Quote from: Vinspire^ on May 05, 2006, 05:41:27 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?
Oh ... Query is PHPMyAdmin. Okie. I got it :P
Ive just made this into a mod ;)
Tony
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.
(http://www.absolutebreeze.co.uk/stars/modreport.png)
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
sweeeet, this is a must have :-* :-*
I Now have it showing Karma and its linked to profiles.
Will upload screenshots later.
I have other ideas for improvement too :)
Tony
Very nice!
Can't wait to see a packaged mod :)
Very cool! I'm looking forward to this one. :)
is there a file to install it or we have to do it manually
Quote from: mindvsmind on May 06, 2006, 02:55:15 PM
is there a file to install it or we have to do it manually
It will be installable via package manager :)
Looking nice. Good luck. :)
Quote from: Tony on May 06, 2006, 03:47:31 PM
Quote from: mindvsmind on May 06, 2006, 02:55:15 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 ?
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
(http://www.absolutebreeze.co.uk/stars/modreportsub.png)
Full screenshot
(http://www.absolutebreeze.co.uk/stars/moreport.gif)
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.
It has a link to moderator spefic actions already which can be accessed by clicking the moderator actions link ;)
Yes, I see now :P By the search box.
Nice! Looking forward to this one!
Yea ive been asking for such mod for a long time...
Wow ... this mod is so kewl .... is it fully working yet ?
Its working - I just havent had time to package it up.
Hopefully will get round to it tonight :)
Tony
Quote from: Tony 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
(http://www.absolutebreeze.co.uk/stars/modreportsub.png)
Full screenshot
(http://www.absolutebreeze.co.uk/stars/moreport.gif)
This look so kewl ... I am really excited and looking forward for this mods :)
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
Quote from: Tony 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
Okie ;D ;D ;D
Will this work with custom ranks? Like if I have created a status rank of Super Moderator between the Administrator and Global Moderator.
Quote from: Skipdawg 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.
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...
({$db_prefix}members.ID_group = '1' || {$db_prefix}members.ID_group = '2')
to
({$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
kewl thanks. This just may come in handy then soon. ;D
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
Cause the mod havent been authorized by SMF Staff ?
Quote from: Tony 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
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.
This mod should be made for SMF 2.X SMF. It's very interesting.
I love this idea, thank you.
When we can get this for 2.0.2
Quote from: Realinfo on August 16, 2012, 05:59:47 AM
When we can get this for 2.0.2
This is already built into 2.0.2 I believe.
:)
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
@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.
try to packaging it up............. we are waiting...........
also tell where we can see Moderator activity report after installing it...............
Quote from: Tony Reid 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.
Will you be giving the mod for 2.0.2 out to the public?
Ja, it's been over a year...