Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Ataru Moroboshi on September 13, 2017, 07:22:56 AM

Title: Moderation logs. where are them in db?
Post by: Ataru Moroboshi on September 13, 2017, 07:22:56 AM
in the page index.php?action=moderate;area=modlog we can see all moderation actions, and i think they're all stored in smf_log_actions table in database.

it's all there? if i run a script every x hours pruning that table in db, it will work, or there are some dependencies?

i've got an auto publishing script for rss news and i have thousands of topic approval and deleting that i don't want to see in moderation log. is that possible or it needs to be deleted only by checking and deleting them from modlog page?

Thanks, anybody.
Title: Re: Moderation logs. where are them in db?
Post by: Arantor on September 13, 2017, 07:25:25 AM
It's really complicated because multiple logs are stored in the same place as the moderation log.
Title: Re: Moderation logs. where are them in db?
Post by: Ataru Moroboshi on September 13, 2017, 08:34:00 AM
Quote from: Arantor on September 13, 2017, 07:25:25 AM
It's really complicated because multiple logs are stored in the same place as the moderation log.

not so much, indeed, in my case. i need to delete only voices related to a single board, and only for deleting and approving posts
Title: Re: Moderation logs. where are them in db?
Post by: Arantor on September 13, 2017, 08:57:54 AM
Yeah it is because admin and profile edit logs are literally in the same table. And I don't remember if you can easily filter to board level with straight SQL.
Title: Re: Moderation logs. where are them in db?
Post by: Ataru Moroboshi on September 13, 2017, 09:11:48 AM
in smf_log_actions there are following keys:

id_action
id_log
log_time
id_member
ip
action
id_board
id_topic
id_msg
extra

so sure i can filter by member, board and action.

i don't know what does id_log mean, it's an integer between 1 and 3.
Title: Re: Moderation logs. where are them in db?
Post by: Arantor on September 13, 2017, 09:27:26 AM
and that's been my entire point. It stores three different logs here!

You want where id_log is 1.
Title: Re: Moderation logs. where are them in db?
Post by: Ataru Moroboshi on September 13, 2017, 09:46:57 AM
yes 1 is for moderation action, then i think 2 is for profile editing and 3 is for administrators actions.

could i simply delete filtered rows with a sql query?
Title: Re: Moderation logs. where are them in db?
Post by: Arantor on September 13, 2017, 10:53:18 AM
Yes, that would work.

Though from your described use case I wonder if a forum is the right fit for you.
Title: Re: Moderation logs. where are them in db?
Post by: Ataru Moroboshi on September 13, 2017, 11:01:09 AM
Quote from: Arantor on September 13, 2017, 10:53:18 AM
Yes, that would work.

Though from your described use case I wonder if a forum is the right fit for you.

yes, my site is basically a forum. those things are services we provide. maybe they would be ported to a CMS system, but I worked a lot in customizing simpleportal for it, and i cannot find a real user integration between SMF and a CMS like joomla or drupal or even wordpress.