How to reset category 'discussions' count, unban auto-banned user(by flood control), and one more.
I had a spam attack today that we actually dealt with nicely. On smf i had a system where the user needed approval to post the first post, after that he could post freely, that and questions in registration barred bots for good.
I only recently found the questions for registrations plugin for vanilla, and I'm not entirely sure how to implement the first one, but i found a work around for the moment.
For now, basically i have 3 questions:
Even after the spam posts were deleted the categories kept their huge number of post counts. I did it the old way, and reset the record in the db to the actual number of discussions.
But is that the best, only way?
Also, the flood control is great, it helped a lot, but I was looking into the code, and instead of temporary banning for x seconds, i'd want a perma ban of "manual" type so later on i could reverse or at least have it listed in the users panel.
It's uncool when vanilla does things in the back and it's not exposed in the dashboard, i think.
That said, if a user gets this temporary ban for x seconds, how can i unset it?
I'm still digging through the code but i haven't found where the users are listed, or how the countdown works, any help is appreciated.
Finally, the Q&A plugin, which is great btw, it sends a notification to the user saying, 'hey you have a question that needs your attention', something along those lines, and it keeps doing that until the user marks a question as answered or not. At least that's how it seems to works as far as i can tell.
Now removing that notice is simple enough, i can just delete the code that does that, but any ideas on how to get it to show only once per session?
Any comment on the above is welcome.
Comments
if you ask a single question or at least related questions per discussion vs 3 unrelated questions in a discussion; you may have better results in the future.
@Kiori said:
Be patient and wait x seconds.
or perhaps clear the entry in session table
https://github.com/vanilla/vanilla/search?utf8=✓&q=flood+control
ask questions under the plugin and give it a descriptive title.
https://vanillaforums.org/addon/qna-plugin
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
also for 2 - you want want to reset attributes either by one of the two functions that sets attributes or by manually changing in the user table column attribute. or perhaps changing flood conrol settings
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
@River
Thanks for answering. I was actually unsure how to proceed and thought asking too many questions in many posts was spammy.
I bookmarked the FAQ link, thanks for that.
Also, the plugin mentioned in the FAQs: preventweblinks-plugin, I couldn't find it.
Its has something that i thought would be nice to have which is no links for new members.
About 2, what I really wanted was to apply a ban of type const BAN_MANUAL = 0x1, along with the timer ban.
I tried searching in the files, but I don't really see function calls for it, all i see is functions returning $Spam= true.
I'm still getting my head around how Vanilla truly works.
You said "you want want to reset attributes either by one of the two functions that sets attributes" if you could list them that's even better. maybe that relates to "Gdn::userModel"?
About the user table column, in the attributes, i forced an example and it had this:
...i:1;s:24:"CountDiscussionSpamCheck";i:2;s:23:"DateDiscussionSpamCheck";s:19:"2016-08-28 19:46:04";s:21:"CountCommentSpamCheck";i:2;s:20:"DateCommentSpamCheck";s:19:"2016-08-28 22:22:36";
After login that is. So i should just delete all of that? I see the date stamp, 's:' and 'i:' I don't get.
I can do without it though I'm just asking out of curiosity.
Thanks for the reply though, appreciated. And sorry again for the over crowded post title.