Customizing SMF > SMF Coding Discussion

For the love of SMF gods...

(1/2) > >>

Arantor:
Why, just why, did the questions and answers to the anti-spam feature go in the reported comments table?

(I suspect I know the answer, which is for much the same reason that the custom fields go in the themes table, it's a convenient place where such things can be stored. See, it's not just the Q&A in the reported comments table, other stuff like the moderator notepad in the mod centre also lives there too)

But seriously, why do that? Would it have been so bad to give it its own table?

Antechinus:
It does? Must admit I'd never looked, but it sounds a bit funny.

Arantor:
Oh, yes, it does.

Look in smf_log_comments where comment_type = 'ver_test', or 'mod_note' for moderator notes, 'warning' or 'warntpl' for warning related logging, or 'reportc' for report comments.

I found this little gem while in the process of rewriting the Q&A to support different questions for each language (and to have multiple answers per question)

Antechinus:
TBH I think having custom fields in their own table would make a certain amount of sense too. The themes table is already chockers with all sorts of bollocks, so it's hard enough to find stuff there as it is.

ETA: In fact you could probably make a decent argument for having a separate table for each theme.

Arantor:
Custom themes in a separate table has both good and bad points to it, just as it does for being in the themes table. The one thing in favour of using smf_themes is that the profile code is a fair bit simpler as a result of being able to scoop up the existing theme information for user preferences.

Navigation

[0] Message Index

[#] Next page

Go to full version