Advertisement:

Author Topic: Moderation logs. where are them in db?  (Read 366 times)

Offline Ataru Moroboshi

  • Semi-Newbie
  • *
  • Posts: 88
Moderation logs. where are them in db?
« 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,881
    • Arantor on GitHub
Re: Moderation logs. where are them in db?
« Reply #1 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Ataru Moroboshi

  • Semi-Newbie
  • *
  • Posts: 88
Re: Moderation logs. where are them in db?
« Reply #2 on: September 13, 2017, 08:34:00 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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,881
    • Arantor on GitHub
Re: Moderation logs. where are them in db?
« Reply #3 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Ataru Moroboshi

  • Semi-Newbie
  • *
  • Posts: 88
Re: Moderation logs. where are them in db?
« Reply #4 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,881
    • Arantor on GitHub
Re: Moderation logs. where are them in db?
« Reply #5 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Ataru Moroboshi

  • Semi-Newbie
  • *
  • Posts: 88
Re: Moderation logs. where are them in db?
« Reply #6 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?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,881
    • Arantor on GitHub
Re: Moderation logs. where are them in db?
« Reply #7 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Ataru Moroboshi

  • Semi-Newbie
  • *
  • Posts: 88
Re: Moderation logs. where are them in db?
« Reply #8 on: September 13, 2017, 11:01:09 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.