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 Outscale, a global pure play Infrastructure as a Service provider and strategic partner of Dassault Systèmes, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2010, Outscale simplifies infrastructure complexities and boosts the business agility of its customers. Outscale delivers a secure, reliable and industrial strength solution for its customers, which in...
As cloud adoption continues to transform business, today's global enterprises are challenged with managing a growing amount of information living outside of the data center. The rapid adoption of IoT and increasingly mobile workforce are exacerbating the problem. Ensuring secure data sharing and efficient backup poses capacity and bandwidth considerations as well as policy and regulatory compliance issues.
SYS-CON Events announced today that Cloud Academy will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Cloud Academy is the industry’s most innovative, vendor-neutral cloud technology training platform. Cloud Academy provides continuous learning solutions for individuals and enterprise teams for Amazon Web Services, Microsoft Azure, Google Cloud Platform, and the most popular cloud computing technologies. Ge...
SYS-CON Events announced today that Interoute has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Interoute is the owner operator of Europe's largest network and a global cloud services platform, which encompasses over 70,000 km of lit fiber, 15 data centers, 17 virtual data centers and 33 colocation centers, with connections to 195 additional partner data centers. Our full-service Unifie...
SYS-CON Events announced today that delaPlex will exhibit at SYS-CON's @ThingsExpo, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. delaPlex pioneered Software Development as a Service (SDaaS), which provides scalable resources to build, test, and deploy software. It’s a fast and more reliable way to develop a new product or expand your in-house team.
In his opening keynote at 20th Cloud Expo, Michael Maximilien, Research Scientist, Architect, and Engineer at IBM, will motivate why realizing the full potential of the cloud and social data requires artificial intelligence. By mixing Cloud Foundry and the rich set of Watson services, IBM's Bluemix is the best cloud operating system for enterprises today, providing rapid development and deployment of applications that can take advantage of the rich catalog of Watson services to help drive insigh...
The 21st International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with the 21st International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. @ThingsExpo Silicon Valley Call for Papers is now open.
Amazon started as an online bookseller 20 years ago. Since then, it has evolved into a technology juggernaut that has disrupted multiple markets and industries and touches many aspects of our lives. It is a relentless technology and business model innovator driving disruption throughout numerous ecosystems. Amazon’s AWS revenues alone are approaching $16B a year making it one of the largest IT companies in the world. With dominant offerings in Cloud, IoT, eCommerce, Big Data, AI, Digital Assis...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend @CloudExpo | @ThingsExpo, June 6-8, 2017, at the Javits Center in New York City, NY and October 31 - November 2, 2017, Santa Clara Convention Center, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
In order to meet the rapidly changing demands of today’s customers, companies are continually forced to redefine their business strategies in order to meet these needs, stay relevant and continue to see profitable growth. IoT deployment and development is integral in this transformation, and today businesses are increasingly seeing the value of investing their resources into IoT deployments. These technologies are able increase ROI through projects such as connecting supply chains or enabling sm...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.
SYS-CON Events announced today that Progress, a global leader in application development, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Enterprises today are rapidly adopting the cloud, while continuing to retain business-critical/sensitive data inside the firewall. This is creating two separate data silos – one inside the firewall and the other outside the firewall. Cloud ISVs ofte...
SYS-CON Events announced today that Tintri, Inc, a leading provider of enterprise cloud infrastructure, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Tintri offers an enterprise cloud platform built with public cloud-like web services and RESTful APIs. Organizations use Tintri all-flash storage with scale-out and automation as a foundation for their own clouds – to build agile development environments...
SYS-CON Events announced today that DivvyCloud will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. DivvyCloud software enables organizations to achieve their cloud computing goals by simplifying and automating security, compliance and cost optimization of public and private cloud infrastructure. Using DivvyCloud, customers can leverage programmatic Bots to identify and remediate common cloud problems in rea...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Cloudistics, an on-premises cloud computing company, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Cloudistics delivers a complete public cloud experience with composable on-premises infrastructures to medium and large enterprises. Its software-defined technology natively converges network, storage, compute, virtualization, and management into a ...
Every successful software product evolves from an idea to an enterprise system. Notably, the same way is passed by the product owner's company. In his session at 20th Cloud Expo, Oleg Lola, CEO of MobiDev, will provide a generalized overview of the evolution of a software product, the product owner, the needs that arise at various stages of this process, and the value brought by a software development partner to the product owner as a response to these needs.
SYS-CON Events announced today that Tappest will exhibit MooseFS at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. MooseFS is a breakthrough concept in the storage industry. It allows you to secure stored data with either duplication or erasure coding using any server. The newest – 4.0 version of the software enables users to maintain the redundancy level with even 50% less hard drive space required. The software func...
New competitors, disruptive technologies, and growing expectations are pushing every business to both adopt and deliver new digital services. This ‘Digital Transformation’ demands rapid delivery and continuous iteration of new competitive services via multiple channels, which in turn demands new service delivery techniques – including DevOps. In this power panel at @DevOpsSummit 20th Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, panelists will examine how DevOps helps to meet th...