Skip to main content
Topic: anti-spam questions (Read 7118 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

anti-spam questions

Since I was a bit bored and thought it was something easy (except I wasted some time because of the upgrade issue lol) I moved the anti-spam questions from log_comments to their own table.
Doing this I also added a new field "language" to the table to start thinking about questions in multiple languages.

I remember once Arantor suggested also multiple answers for each question, that would probably be nice too. If I'm not wrong from the db-side the best way to handle that would be to split the table in two: questions and answers. Maybe we could use some other trick (like add another field referencing to the question.
Not sure what is more practical.
Bugs creator.
Features destroyer.
Template killer.

Re: anti-spam questions

Reply #1

Eh, I think you're overcomplicating it. I certainly didn't get as fancy as that, especially given all the scenarios where questions might be called for. I simply took the possibilities and stuffed them into arrays, and serialized it before storing in _settings, subdividing by language, then question then answer.

Re: anti-spam questions

Reply #2

mmm...lol
I'm known to make things complex! (especially at that time of the day)
Funny thing is that I "like" serialize and it's strange I didn't thought about it...
Bugs creator.
Features destroyer.
Template killer.

Re: anti-spam questions

Reply #3

What are all the scenarios where questions might be used?

I'd love to see all this cleaned-up, at the level of code design/implementation, I mean. As for db, it sounds better (if a little over-), considering that querying that table will not be very often anyway, will it? If it will - I don't see it atm - we might want to "cache" (as Ema put it on another issue) in settings.
Database design-wise, normalization vs serialization. Performance-wise, serialization vs normalization.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: anti-spam questions

Reply #4

Questions may be used anywhere that the CAPTCHA might be used: registration, posting, searching.

Typically, though, it will be the first registration and maybe the first few posts for users.

Re: anti-spam questions

Reply #5

Another FYI: while doing that I decided to destroy the entire anti-spam thing, so expect few changes to the area next time I push something...meaningful? Heck, did you ever see meaningful code coming from my fingers? O_o
Bugs creator.
Features destroyer.
Template killer.

Re: anti-spam questions

Reply #6

You wait until you play with the moderation/warnings code! That's lots of fun.

Re: anti-spam questions

Reply #7

 emanuele doesn't plan to live that long... :P
Bugs creator.
Features destroyer.
Template killer.


Re: anti-spam questions

Reply #9

 emanuele posted in the wrong topic... lol
Bugs creator.
Features destroyer.
Template killer.

Re: anti-spam questions

Reply #10


Oh, thank you, this is cool! Much more readable and quite similar to other design (can't speak for the details on the run)

Names for the classes would be Control_Verification_Something, in tone with the pattern.

Quote(I mean in general, I know it's probably broken :P)
LOL! :D
The best moment for testing your PR is right after you merge it. Can't miss with that one.