#1
I've built several discussion forums over the years, and this one is by far the worst. It’s riddled with bugs.

If you're thinking about building a forum, here’s my advice:

Don’t attempt anything fancy – absolutely nothing. Don’t rely on before and after hooks. Don’t introduce clever caching tricks. Don’t try to outsmart yourself. Just code like a caveman.

Eventually, you’ll end up with a forum that triggers a lot of SQL queries per page. Good. Live with it. Nobody cares. Keep coding like a caveman.

Only after you’ve embraced that caveman approach for at least three weeks should you introduce a file - based caching system that writes a static HTML file (for the forum homepage content) whenever a comment is created, updated, or deleted. This allows the homepage to load a simple HTML view file, drastically reducing the number of queries.

I did not follow that rule with this forum. Instead, I used a ridiculous before - / after - hooks system and tried to be clever. The result is a shambles. If I ever find the time, I’ll rebuild it properly.

Remember: code like a caveman. Get the basic thing working, then refine it later.

You're welcome!
#2
The forum has had an organic evolution and over time nuances have crept in. However, good advice DC.

FYI - I patched the forum home view the other day as localhost was hard coded into the anchor tags and you may not have noticed the url when the forum categories were reduced.
#3
Oh cool, thanks.