Non-techies, you can safely ignore this post and go on with your day. But, tech people, if you’re still reading… a little help for an ignorant soul, please? 😅
I’m planning to add a comment section to the main part of my website. The problem is, of course, that i’ve barely ever touched PHP and Sql before, let alone tried to make something like a comment system, and as such, i have no fucking idea what i’m doing.
I’ve got a design figured out — see above — and a rough idea of what the database will look like:
- postId: Integer, generated by adding some random digits to the end of a Unix timestamp
- timestamp: Integer, just a Unix timestamp of when the comment was submitted
- commentLocation: Unicode string, max. 32 chars?, indicating on which comments section the comment was posted
- displayName: Unicode, max. 128 chars?, is what it says on the can
- emailAddress: Unicode, max. 128 chars?, used to generate the avatar via Gravatar and maybe filter spam if it comes to that
- website: Unicode, max. 128 chars?, used to… link to the commenter’s website
- commentText: Unicode, max. 4096 chars?, the actual text of the comment; will be processed as a subset of Markdown
- planet: Unicode, max. 16 chars?, any comment for which the response isn't earth will get thrown out
So, erm… any suggestions? Improvements? Ways of not getting my site hacked? Polite ways of telling me that this was a terrible idea? are welcome in the comments below.