Welcome!

Adobe Flex Authors: Matthew Lobas, PR.com Newswire, Shelly Palmer, Kevin Benedict

Related Topics: Adobe Flex

Adobe Flex: Article

Building a Forum with Macromedia Dreamweaver From Adobe

A forum can really help you build up a community around your website

Forums (message boards) are a great way to share ideas, debate on current issues, or offer technical assistance to your clients. A forum can really help you build up a community around your website, increase traffic, and improve communication with your clients. Although you can find a wealth of free forum applications out there, which you can install and customize for your needs, this article teaches you how to build your own forum from scratch to make it fit your specific requirements. (You can view this article in its original www.macromedia.com/devnet.)

We will walk you from designing and setting up your database to building a basic front end, adding user authentication, allowing subscription to message threads, and sending topic reply notifications by e-mail. You can have a fully functional forum in no time, with minimum effort and coding.

Planning the Forum
In this tutorial, you will use Dreamweaver 8 and ImpAKT to build a forum application which will allow users to:

  • View a list of discussion topics
  • Read the messages associated to each topic
  • Register an account with the forum, and upload a profile photo
  • Login and logout
  • Post a new message in any topic
  • Reply to other messages
  • Subscribe to a discussion thread (a chain of messages that are replies to an initial message)
  • Receive e-mail notifications when a new message is posted in a thread they have subscribed to
Before you start building the forum, please make sure that:
  • You have a running database server and web server with PHP language support
  • You have installed the required software: Dreamweaver and ImpAKT
  • You have correctly defined a Dreamweaver site with a PHP_MySQL testing server
  • You have set up the database provided with this tutorial and have created a connection to it
Setting Up the Development Framework
First you have to set up your application server environment and install Dreamweaver 8 and ImpAKT.

This article assumes that you have already installed and configured a web server with PHP and MySQL support. If this is not the case, take a look at the following articles from the Developer Center:

  • Setting Up Your PHP Server Environment Using Linux, Apache, MySQL and PHP (by David Sklar) if you use the LAMP platform
  • Setting Up the PHP, MySQL, and Apache Server Platform on Macintosh OS X for Dreamweaver MX (by Minh Huynh) if you're working in Mac OS
  • Setting up PHP for Microsoft IIS (by Andrew Stopford) if you're a fan of IIS
If you're using Windows, also take a look at WAMP Server, a free tool that automatically installs Apache, PHP 5, MySQL server, phpMyAdmin, and SQLiteManager. For detailed instructions on installing WAMP Server, see this technical note on the InterAKT site.

Before you install ImpAKT, you need to have installed Dreamweaver 8. You can install and manage the extensions using Extension Manager, an accessory to Dreamweaver.

What Is ImpAKT?
ImpAKT is a Dreamweaver extension that offers a collection of wizards and server behaviors that will help you set up a dynamic website from scratch, with no coding at all. ImpAKT automates most common programming tasks and patterns, and even helps inexperienced HTML designers perform complex tasks. For example, ImpAKT will help you set up your site for user authentication, validate your visitors' input, send e-mails after forms have been submitted, and upload files and images.

Extensions are software tools that enhance the standard functionality of Dreamweaver, much like plug-ins or add-ons. They can vary from simple code snippets to complex applications. Their purpose also varies: they can reduce manual coding, minimize repetitive tasks, fix certain bugs or errors, increase productivity, or build a specific object.

Extensions are usually delivered as executable MXP files. When you run them, the Extension Manager initiates the installation.

Start the installation by downloading the extension using the links at the beginning of this article. Then double-click the MXP file. After the ImpAKT installation is initiated, you'll see a disclaimer. If you agree to the terms, click Accept to continue the installation. When the Extension Manager finishes installing (usually just a few seconds), you'll see a dialog box notifying you that the installation is complete.

You'll notice that ImpAKT is listed in the Extension Manager window.

If Dreamweaver is open, close it and then relaunch it so the changes caused by ImpAKT can take effect. Each installed extension modifies the Dreamweaver standard workspace by adding its own commands, buttons, or menus. The ImpAKT elements are added to the Insert bar and to the Server Behaviors menu (in the Application panel).

Notice that a new tab called MX Kollection appears in the Insert bar.

ImpAKT is part of a bundle of Dreamweaver extensions, which is why the tab is called MX Kollection. For more information, visit the MX Kollection home page.

From the MX Kollection tab, you can access some of the most common wizards and commands in ImpAKT that help you build database-driven web forms for inserting, updating, and deleting information, and set up professional user authentication for your website.

The second area where you can access ImpAKT commands is the Server Behaviors tab of the Application panel.

In the next section, you will define your site in Dreamweaver.

Before you build the forum, you need to set up your site in Dreamweaver. For a quick site setup, take a look at this TechNote: How to Define a Site in Dreamweaver. A minimal setup requires you to configure at least these sections:

  • Local Info, which identifies the site files in Dreamweaver and enables the site management features
  • Remote Info, which defines the settings to access the remote web server where your site will be uploaded
  • Testing Sever, which defines a private place to act like a public server to test the application and connections to the database
Follow the instructions in this TechNote and make sure you set the server model to PHP MySQL in the Testing Server section.

Download the tutorial sample files and unzip them to your site's root folder.

In the next section, you will set up and connect to your database.

Setting Up Your Database
The forum is completely dynamic. It stores and extracts all information from a database. A typical forum is basically a collection of messages posted by users and organized by topics. Therefore you need at least these three tables for your forum database:

  • one for user information: user_usr
  • one for messages: message_msp
  • one for topics: topic_top
The SQL code that creates the topic_top table is pretty straightforward. Notice that the topic title is defined as a unique key, meaning there shouldn't be any topics with the same title:

CREATE TABLE topic_top (
    id_top int(11) NOT NULL auto_increment,
    title_top varchar(100) NOT NULL default '',
    description_top varchar(200) default NULL,
    PRIMARY KEY (id_top),
    UNIQUE KEY title_top (title_top)
);

Here is the code that creates the message_msg table:

CREATE TABLE message_msg (
    id_msg int(11) NOT NULL auto_increment,
    idtop_msg int(11) NOT NULL default '0',
    idmsg_msg int(11) default NULL,
    id_init_msg int(11) NOT NULL default '0',
    idusr_msg int(11) NOT NULL default '0',
    date_msg datetime NOT NULL default '0000-00-00 00:00:00',
    subject_msg varchar(100) default NULL,
    content_msg text NOT NULL,
    subscribe_msg tinyint(4) NOT NULL default '0',
    PRIMARY KEY (id_msg)
);

The following snippet shows the SQL code for setting up the table:

CREATE TABLE user_usr (
    id_usr int(11) NOT NULL auto_increment,
    name_usr varchar(100) NOT NULL default '',
    email_usr varchar(150) NOT NULL default '',
    password_usr varchar(100) NOT NULL default '',
    active_usr tinyint(2) NOT NULL default '0',
    randomkey_usr varchar(100) NOT NULL default '',
    PRIMARY KEY (id_usr),
    UNIQUE KEY name_usr (name_usr)
);

Notice that because the user name must be unique, it was defined as a unique key.

If you are unfamiliar with database terminology (primary keys, foreign keys, self foreign keys, and the like) and database architecture techniques, check out the Database Concepts article on the InterAKT site.

Now that you have an idea of how your database will look, fire up the sample SQL script in your MySQL console or in your favorite database management software (such as phpMyAdmin) and create the forum database. Include the following line at the beginning if you want to create a separate database:
create database mm_forum;

More Stories By Marius Zaharia

Marius Zaharia is the documentation manager at InterAKT Online, a developer of professional tools for dynamic web development. When he's not writing articles and tutorials to guide web developers, he enjoys learning new things and exploring new technologies. His interests range from web development to politics and avantgarde electronic music.

More Stories By Cristian Ivascu

Cristian Ivascu is a technical writer with InterAKT Online. He is a strong supporter of open-source software and a fan of Japanese culture and rock music.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SYS-CON Belgium News Desk 02/09/06 01:11:18 PM EST

Forums (message boards) are a great way to share ideas, debate on current issues, or offer technical assistance to your clients. A forum can really help you build up a community around your website, increase traffic, and improve communication with your clients. Although you can find a wealth of free forum applications out there, which you can install and customize for your needs, this article teaches you how to build your own forum from scratch to make it fit your specific requirements.

SYS-CON Australia News Desk 02/09/06 09:37:17 AM EST

Forums (message boards) are a great way to share ideas, debate on current issues, or offer technical assistance to your clients. A forum can really help you build up a community around your website, increase traffic, and improve communication with your clients. Although you can find a wealth of free forum applications out there, which you can install and customize for your needs, this article teaches you how to build your own forum from scratch to make it fit your specific requirements.

@ThingsExpo Stories
SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/.
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...
There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em...
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, will introduce two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a mu...
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...
SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
SYS-CON Events announced today that DXWorldExpo has been named “Global Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc.
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
SYS-CON Events announced today that Suzuki Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Suzuki Inc. is a semiconductor-related business, including sales of consuming parts, parts repair, and maintenance for semiconductor manufacturing machines, etc. It is also a health care business providing experimental research for...
SYS-CON Events announced today that Fusic will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Fusic Co. provides mocks as virtual IoT devices. You can customize mocks, and get any amount of data at any time in your test. For more information, visit https://fusic.co.jp/english/.
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
SYS-CON Events announced today that Mobile Create USA will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Mobile Create USA Inc. is an MVNO-based business model that uses portable communication devices and cellular-based infrastructure in the development, sales, operation and mobile communications systems incorporating GPS capabi...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...