ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash



 Top ASP 101 Stories Top ASP 101 Stories
The Top 10 ASP Links @ Microsoft.com
What is Adovbs.inc and Why Do I Need It?
An Overview of ASP.NET

QUICK TIP:
Compact An Access Database File From ASP
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates


The ASP 101 Discussion Forum The ASP 101 Discussion Forum by John Peterson

Changes To The Forum Since Version One

Like almost every script, the forum has gone through some revisions.  In fact, it had quite a few major changes in its first week alone. 

Page Layout

The first set of changes began when we tried to integrate the forum into ASP 101.  Now I know that one of the main reasons we decided to write it ourselves was so it would integrate with our site, but.... well let me back up and explain a few things.  First of all, every page on ASP 101 is basically one big table.  The logo and banner go at the top, the navigation is down the side, the footer is at the bottom, and we have a specific table cell reserved for the page contents.  This is all accomplished via include files which you can read more about in our Frames vs. Include Files Article.  Well, the point is, if you take a look at any of our pages, you'll see that there are a lot of things going on.  As a result, I usually develop outside of our template and then just pop the script into the preset framework when it's complete.  For the most part, it's been a great way to work.  I can preview things without having to load the ads, tips, navigation, etc., yet it's easy to publish to the live site.  When I got to this stage on the forum, I simply cleared out my ShowHead and ShowTail functions and placed the appropriate include files in the right places.  I fired up my browser.  I got an error about Option Explicit being called twice... easy fix.  Another one about the <%@ Language = VBScript %> not being the first command on the page... again no big deal.  I try it the third time and everything seems to be going fine.  I'm browsing around, viewing messages, and I decide I should probably try to post a new message.  Well that's when it hit me.  I got the dreaded "content has already been written, it's too late to modify header information" error. 

I realized I had integrated the section of code that stores cookies into the post_message.asp page.  Well, I had taken great care to do the cookie stuff before I wrote anything, at least until I pasted the whole thing into the middle of our template page.  A little while later, I had it working again and the forum had gained 2 new files: save_cookie.asp and save_cookie_response.asp.  The first script is outside the general ASP 101 framework and doesn't include anything except the code to save the cookies which effectively gets us around the problem. It then redirects to the second page which plugs them right back into the framework and allows the user to carry on along his merry way, none the wiser to the fact that they ever left.

The second issue was an Access/SQL server difference I had forgotten about.  I do most of my work in Access.  I find it more intuitive and simply easier to work in then SQL.  The other fact is that most of the scripts I write, work fine without adjustment when I go to upsize to SQL.  Well, I had forgotten that SQL doesn't like # as date delimiters which is what I usually use for Access so that took me another 15 minutes to track down and fix. 

Ok, now the forum is working perfectly!  We post it to the site and everything is peachy.  At this point I'm thinking I can lean back, answer some posts, and never see the code again.  Yeah right! 

Then the suggestions for improvements start rolling in.  First off, not everyone liked just having a link to the replies and the parent on the view message page.  They wanted to see the whole thread... Done!  We started to implement a expanding and contracting JavaScript treeview for the display of messages within the selected forum on the display forum page... that idea was killed in favor of just listing the root posts since people weren't doing anything except Re:'ing the previous subjects anyway... Done!  Then we finally got around to implementing a keyword search (we're still debating a more complex searching method, but the plan is to wait till the content grows some)... Done!  Then an idea I wish I had thought of came across my desk.  Why don't we notify people when someone posts a message in their thread.  This one took a little work, a new field in the message table, and a revised post message form and processor but... Done!  The last change as of this article is that we're in the process of splitting up the posts into 6 or so (more focused) categories instead of just the 2 (semi-focused) of which only 1 is getting posts.  Finally, people were asking for information about the forum and copies of the code to it.  Well... you're in the middle of reading our response to that! 

In case you missed the point of that paragraph, the bottom line is: As long as you keep making good suggestions, We'll keep making the forum better!

<-- Previous Page       Next Page -->

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers