So you've heard about it's checkered past, and you still want to take a look at the code and maybe use the forum on your site.
You either haven't been listening or you're far braver that I thought you were!
Oh well, here goes...
First the warnings!
Like I've told everyone whose asked, this code was never meant for public consumption.
Here's a quick run down of what I mean by that:
It makes sense to me because I wrote it. It won't to you because you didn't!
It's not commented to our normal standards. As low as those normally are, this is worse!
It's not very modular. (There's about 3 rolls of duct tape holding it all together!)
It's still constantly being changed, so whatever version you have... it's too old!
Watch out for ShowChildren!!! (Take a look and you'll see what I mean!)
Our e-mail notification isn't using CDONTS so you figure it out!
It'll run against both Access and SQL Server, if you know the secrets!
All kidding aside, don't put too much faith into this forum.
Don't get me wrong, it runs, but I don't want anyone to start using it, put it up on the internet, and then be upset when it breaks because you're getting a post every 2 seconds.
It hasn't been tested except for what you see here on the site, and with the constant changes to the code, I wouldn't thoroughly trust it even if it had.
Now that I've scared everyone away, let me seriously address some of the points I made above.
If anything doesn't make sense, or you're wondering what I was doing with a particular line of code, let me know and I'll try and explain my thinking.
There are some sparce comments, but they're mostly comments to myself so... see #1.
Before you hack and slash any code or make any adjustments, make sure you've found every place it's being called from and that your changes won't cause any nasty side effects.
Not too much you can do here, but before you spend too much time trying to fix something, check with me. It may already be fixed!
ShowChildren... This is actually somewhat embarassing.
This function absolutely pounds on your database.
It was written as a quick and dirty, let's try this approach, type of deal and somehow it made it into the production code.
It originally was used when we showed the open forum to show the entire forum tree.
(Actually from a code style point of view, I liked that version of the code more than the current one.)
The issue with the function is that each time it's called it opens a recordset.
That wouldn't be too big a deal, but it then recurses into itself!
You can imagine the number of recordsets we were opening when we were running the earlier implementation I was just talking about.
Luckily, we don't call it on as large sets of data anymore.
(It's only called to show the thread you're in when you view a message.)
It's still bad code, but what can I say but.... oops!
The notification is using Steve Genusa's ASPMail since that's what we had available.
It's a simple change to whatever component you normally use.
The code can be found in post_message.asp if you're interested.
To move back and forth from Access to SQL, you need to change the DB_CONNECTIONSTRING at the top of common.asp, and one line which you'll find a comment for in the InsertRecord function also in common.asp.
I think that should just about do it.
As long as I'm not in the middle of changing it again, the code is available here.
Good luck with the forum and if you have any questions or if it gives you any trouble, you can e-mail me at john@asp101.com and I'll be happy to speak to it on you're behalf.
Update: To ease support and version control, I've added a Forum Revision page which tracks versions and known issues with the current version of the forum. Please go to there to obtain the code.