anti-spam questions April 05, 2013, 06:36:45 pm 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.
Re: anti-spam questions Reply #1 – April 05, 2013, 06:42:47 pm 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 – April 06, 2013, 03:57:53 am mmm...lolI'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...
Re: anti-spam questions Reply #3 – April 06, 2013, 05:25:04 am 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.
Re: anti-spam questions Reply #4 – April 06, 2013, 09:53:40 am 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 – April 08, 2013, 08:30:05 am 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
Re: anti-spam questions Reply #6 – April 08, 2013, 09:54:56 am You wait until you play with the moderation/warnings code! That's lots of fun.
Re: anti-spam questions Reply #7 – April 08, 2013, 10:13:54 am emanuele doesn't plan to live that long...
Re: Quick question regarding Recount Posts in ManageMaintenance Reply #8 – April 08, 2013, 11:05:09 am Done (well, at least the idea):https://github.com/emanuele45/Dialogo/commits/antispam_questionsdoes the commit before the last work for you? (I mean in general, I know it's probably broken )
Re: anti-spam questions Reply #9 – April 08, 2013, 11:13:59 am emanuele posted in the wrong topic... lol
Re: anti-spam questions Reply #10 – April 09, 2013, 12:31:44 pm Quote from: emanuele – April 08, 2013, 11:05:09 amDone (well, at least the idea):https://github.com/emanuele45/Dialogo/commits/antispam_questionsdoes the commit before the last work for you? 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 )LOL!
Re: anti-spam questions Reply #11 – April 14, 2013, 04:54:06 pm Well, sent: https://github.com/elkarte/Elkarte/pull/324