Click here to Skip to main content
15,861,125 members
Articles / Programming Languages / ASP

The Code Project Discussion boards

,
Rate me:
Please Sign up or sign in to vote.
4.78/5 (39 votes)
25 Aug 2001CPOL 2.9M   15.2K   144   508
The Discussion board ASP scripts as used in The Code Project. This is an open source project for the Code Project community.

Sample Image - CodeProject-forum.jpg

Welcome to the CodeProject Discussion board scripts

Introduction

This is the first of the "projects" that inspired the original concept of the Code Project. We have provided these scripts to help developers, and we hope that developers such as yourself will help us in return by testing, submitting bug reports, suggesting improvements, and submitting extensions.

We invite you to use these scripts in your own sites, but we ask that you keep the "powered by CodeProject" logo in the top left corner. We also ask, in advance, for your patience and understanding. These scripts will no doubt change a lot, so we suggest you check back regularly to see the latest developments, or subscribe to the Newsletter to receive notifications of updates.

As of July 5, 2000 we are providing the source code to the ActiveX control that handles the main work of organising the messages into a semblance of order. We would have loved to have commented the code heavily, and even provide a step by step on how the code works, but we simply haven't had the time, and decided that posting as-is is better than not posting at all. If you find bugs or make improvements, please send them in.

August 26, 2001 - Philip Andrew has supplied a PHP version of the forums.

The Boards

The discussion board used at CodeProject was written by Uwe Keim, and comprises an ActiveX control (written using Visual C++) and a set of ASP scripts. The ActiveX control provides low level access to the forum message database and provides functionality to ease the way in which parameters are passed from one page to another. The ActiveX control is released in DLL form only at present, partly because we have not yet finished writing it, and partly because we have barely even started documenting it :)

New: A new version of the boards has been written by Uwe that are ASP-only, so no more messing around with ActiveX controls. The boards a minimal in implementation but will give you everything you need to get a set of discussion boards up and running. They are Access-only at the moment, but moving to SQLServer is a simple excercise left to the reader. See the download section at the top of this page for the files.

So - onto the scripts. All discussions from here on will concentrate only on the ActiveX version. The non-activeX version is sufficiently similar, though directory structures and file nesting is a little different.

These are divided into a number of categories:

  • Application scripts - these do the hard work
  • Include files - these provide configuration, general routines and plug-in HTML
  • General user interface scripts - these display the forum, provide means to add and edit messages, plus admin and error handling.

There is also:

  • a directory of common images used by these forum scripts, as well as other scripts we will release
  • a directory of common scripts that are also used by other scripts we will release
  • a data directory, containing the forum database
  • a bin directory, containing the ActiveX control

It's assumed that you are running NT4 Server or above with IIS4 or above, or Win9X with PWS. The forum is stored in an Access database and uses the Jet Engine to access.

Quick start

OK, so you've got the files and you want to start playing instead of reading the rest of this article. I don't blame you. Here's what you do then:

  1. Extract the zip file into a directory (say, 'CodeProject') ensuring that the directory structure stored within the zip remains intact.
  2. Register the ActiveX control in the /CodeProject/forum/bin directory
  3. Edit /CodeProject/common/config.asp to suit your site.
  4. Edit /CodeProject/forum/includes/config.asp to suit your discussion boards.
  5. Ensure that your visitors have read and write access to the file /CodeProject/forum/data/forum.mdb.
  6. (Optional) Register an Email component on your system and edit /CodeProject/common/email.inc to suit.

Now simply point your browser at /CodeProject/forum/index.asp and you're away

How it works

The scripts are made up of a set of main user interface scripts (in the root directory) that make use of worker scripts (in the /forum/app directory) to actually do the work. These in turn redirect the browser back to the user-interface scripts.

The guts of the system is in /forum/includes/forum.inc. This file contains the definition of the forum class and is a wrapper for the main forum ActiveX control. This class is the main communication point that contains all forum-related functionality. You never communicate with the forum ActiveX control directly, but always indirectly via this class.

The class not only contains methods that perform the work, but also functions to return URLs to the various application scripts. By doing this we are able to set the names of the various scripts in the /forum/includes/config.asp file which makes it extremely simple to change the directory structure.

Administering the forums

Each message has a password set by the author of that message that allows the author to modify or delete a message. As well as this you can modify or delete messages by using the global password. This is defined in /forum/includes/config.asp and is used by simply appending a "&ad=<password>" onto the end of whatever URL you are currently viewing.

For instance, if you are viewing the index of the forum with ID 1, and your URL is http://www.myserver.com/codeproject/forum/index.asp?forumid=1 then to go into admin mode simply modify the URL to:

http://www.myserver.com/codeproject/forum/index.asp?forumid=1&ad=12345

where "12345" is the password (defined in /forum/includes/config.asp as ADMIN_PW. This then gives you options to administer the forum (set the forum name and description, as well as email address to be emailed when new messages or reply messages are posted).

To add or delete forums themselves you have to physically modify the database. This is just one of those things we haven't yet done...

In admin mode you also get the option of modifying or deleting messages. Also, once in admin mode you will continue to be in admin mode as you move through the forum scripts. Simply remove the "&ad=<password>" to step out of admin mode.

What's new...

The latest version of the scripts has an enhanced user interface, plus some internal changes designed to fix a few problems with the first version. In a nut shell:

  • Message replies at the same level are now sorted in ascending order. This makes the message view more intuitive
  • "Preview" mode has been added, where the first few words of each message is displayed under each message title
  • The ActiveX control has been completely rewritten to be more efficient
  • The user interface has been redesigned and cleaned up

To do...

Too much. This is merely a sketch of the forums and does not even describe what each file does, nor how we plan on expanding the scripts. We will constantly be working on improvng these scripts and all extensions and modifications made to the main CodeProject forums will be included in these downloadable files.

Consider this a work in progress!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CodeProject
Canada Canada
Chris Maunder is the co-founder of CodeProject and ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.

In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project, CodeProject.AI.

In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.

Written By
Chief Technology Officer Zeta Software GmbH
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

➡️ Give me a tip 🙂

In his free time, he does climbing, running and mountain biking. In 2012 he became a father of a cute boy and in 2014 of an awesome girl.

Some cool, free software from us:

Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans.  
Homepage erstellen - Intuitive, very easy to use.  
Offline-Homepage-Baukasten

Comments and Discussions

 
Questionstep by step Pin
MUDANZAS VALENCIA mudanzasvalemcia.com16-Feb-16 23:29
MUDANZAS VALENCIA mudanzasvalemcia.com16-Feb-16 23:29 
GeneralProject Discussion boards Pin
MUDANZAS VALENCIA mudanzasvalemcia.com16-Feb-16 23:20
MUDANZAS VALENCIA mudanzasvalemcia.com16-Feb-16 23:20 
QuestionBLOG in asp.net without using (.dll) Pin
verma.vivek9-Mar-14 21:08
verma.vivek9-Mar-14 21:08 
GeneralASP.NET version Pin
thatraja3-Apr-11 6:48
professionalthatraja3-Apr-11 6:48 
GeneralRe: ASP.NET version Pin
Chris Maunder6-Apr-11 4:27
cofounderChris Maunder6-Apr-11 4:27 
It's on our wishlist too, but can't be done until we break the nasty dependancies we added.
cheers,
Chris Maunder

The Code Project | Co-founder
Microsoft C++ MVP

GeneralRe: ASP.NET version Pin
thatraja6-Apr-11 6:45
professionalthatraja6-Apr-11 6:45 
GeneralRe: ASP.NET version Pin
sumeshakshaya27-Jun-11 20:48
sumeshakshaya27-Jun-11 20:48 
QuestionWhere can i get latest code of this forum? Pin
Divyang Mithaiwala24-Apr-09 4:27
Divyang Mithaiwala24-Apr-09 4:27 
AnswerRe: Where can i get latest code of this forum? [modified] Pin
Chris Maunder24-Apr-09 4:46
cofounderChris Maunder24-Apr-09 4:46 
QuestionRe: Where can i get latest code of this forum? Pin
Divyang Mithaiwala24-Apr-09 19:38
Divyang Mithaiwala24-Apr-09 19:38 
GeneralRe: Where can i get latest code of this forum? Pin
Dan Neely19-Aug-09 8:22
Dan Neely19-Aug-09 8:22 
GeneralRe: Where can i get latest code of this forum? Pin
Dan Neely19-Aug-09 8:26
Dan Neely19-Aug-09 8:26 
GeneralRe: Where can i get latest code of this forum? Pin
Chris Maunder19-Aug-09 8:50
cofounderChris Maunder19-Aug-09 8:50 
GeneralRe: Where can i get latest code of this forum? Pin
Dan Neely19-Aug-09 9:11
Dan Neely19-Aug-09 9:11 
GeneralRe: Where can i get latest code of this forum? Pin
Chris Maunder19-Aug-09 9:12
cofounderChris Maunder19-Aug-09 9:12 
GeneralRe: Where can i get latest code of this forum? Pin
Dan Neely20-Aug-09 2:52
Dan Neely20-Aug-09 2:52 
GeneralRe: Where can i get latest code of this forum? Pin
Chris Maunder20-Aug-09 3:53
cofounderChris Maunder20-Aug-09 3:53 
GeneralRe: Where can i get latest code of this forum? Pin
naresh125220-Jul-11 3:00
naresh125220-Jul-11 3:00 
AnswerRe: Where can i get latest code of this forum? Pin
Member 395625718-Jan-10 22:38
Member 395625718-Jan-10 22:38 
Questioncan i get c# version of this source code Pin
Roshani Desai15-Jun-08 20:34
Roshani Desai15-Jun-08 20:34 
AnswerRe: can i get c# version of this source code Pin
Narendra Reddy Vajrala30-Aug-10 0:46
Narendra Reddy Vajrala30-Aug-10 0:46 
GeneralDnd Pin
TheFrnd2-Jun-08 1:47
TheFrnd2-Jun-08 1:47 
GeneralASP forum -&gt; fatal error C1083: Cannot open type library file: 'msado15.dll': Pin
alibaba06917-May-08 9:39
alibaba06917-May-08 9:39 
GeneralReply is not working Pin
Rateesh4-Dec-07 19:41
Rateesh4-Dec-07 19:41 
GeneralRe: Reply is not working Pin
Member 42675386-Feb-08 22:56
Member 42675386-Feb-08 22:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.