Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.3k views
in Q2A Core by

This could be a little improvement on the spam system: 

1. change qa_posts.flagcount (tinyint) to (varchar(100) ) ... → or add another field "flaggedby"

2. that enables us to save the id of the user/s who flagged, we can also show the user/s frontend (requested here and here)

3. of course, core functions have to be changed accordingly.

 

Alternative: We write a plugin that catches the "flag" and writes it into a separate table (which is created by the plugin).

I give +1 for core ;)

1 Answer

0 votes
by
The raw information about flagging is there in the qa_uservotes table so thre's no need to save it with the post itself. So it should not be hard to make a plugin which shows who is responsible for the flags.
by
Cool! I have not know this. Now it gets easy to read the flaggers!

And yes, if I find time I could do a plugin that even shows the user who flagged next to the spam "marker".

Thank you!
by
Alright, I have my tiny plugin "who-flagged-posts", that basically does that list all "flaggers":


$queryRecentFlags = qa_db_query_sub("SELECT postid,userid,flag
FROM `^uservotes`
WHERE `flag` = 1
ORDER BY userid DESC
LIMIT 0,50;");
// then transform postid to appropriate links
// and transform userid to avatar with link

I can publish this v0.1 if you like in github?

Well, actually I think you could just implement this in core, so that we see the users under >Admin >Flagged... because this is such a basic but necessary thing.

What do you think?
...