Subscribe To FeedSubscribe To Feed


Add to Technorati Favorites

  •  
  •  
  •  
  •  

loading

Loading recent articles...

loading

Failed to load articles list...


{title}
{article_date}

loading

Loading recent articles...

loading

Failed to load articles list...


{title}
{article_date}

loading

Loading recent articles...

loading

Failed to load articles list...


{title}
{article_date}



Foxkeh




 

 

Creating An Advanced CMS - Part 1






In this tutorial, we will be looking at creating an advanced CMS system using Dreamweaver CS3 and ADDT.  There are loads of CMS solutions available on the internet, but I have found it pretty interesting and challenging to say the least when building my own.  To make things a lot easier as well, I will use the current system that I have on my website as a basis for this tutorial.

What do we hope to achieve with this CMS? 

The CMS file structure

First of all, let's plan the CMS system.  Make sure you have configured your Dreamweaver site and that you also have a working database. connection. If you are looking to install your first PHP server, then I suggest you follow my tutorial here. The image below is the a typical structure that I use on all my websites.  It allows me to locate files pretty easily hence making work go a lot faster.

structure.png

I have provided a zipped file containing the site structure here.  You can download it and unpack the ZIP file to your site root.  Now that we have created the files required for the CMS application, we now need to get onto the database.  For this tutorial, we will be using four tables.

Planning the database

The diagram below shows the database structure that is will be used.  An SQL file containing this structure can be found in the ZIP file that you downloaded earlier.

db_structure.png

This is a breakdown of the columns used in this database.

blog_categories table:

blog_posts table:

blog_comments table:

users table:

To login into the admin section of the site, use the following details:

Open the main index.php page and create a new connection named gktut_CONN_CMS and configure it to connect to your newly created database:

connection_create.png

Configuring the Login Settings

We now need to create a login page for the CMS.  We first have to configure the login settings, and the apply the Login Form Wizard on the login page in the site root.  To do this, start off by clicking on the Control Panel button the Developer Toolbox bar.

login_settings_buttons.png

This will bring up the Control Panel interface.  From here, click on the Login Settings button.

login_settings_button.png

This will bring up the Option tab.

login_setting_options.png

To start off, we will encrypt the password stored in our database.  So make sure that the Enccrypt password  is checked.  Since we will also be getting users to register on the site, thus having different login levels, make sure that Username, password and access level is selected.  We will leave the Auto login validity at its default value which is currently 30 days.  Click on the Database tab.

login_settings_database.png

To configure this dialog box options, follow the next steps:

login_settings_session.png

Here we will add what extra session values we want stored.  Click on the (+) and from the dialog box that appears, select FirstName_usr, LastName_usr and displayName_usr.  Click on the OK button to close the dialog box.  The new session riables will be created as shown in the image above.  Click on the User Levels tab to continue configuring the login settings.

login_settings_levels.png

To configure this user interface, follow the next steps:

Creating the Login page

To create the login page, open the login.php file.  From the Develop Toolbox bar, click on the Login Wizard button.

login_wizard_button.png

This will start the Login Wizard.

lwizrd_step1.png

The database setting are automatically configure for you.  Click on the Next button to move to step 2.

lwizrd_step2.png

Click on the Remember me checkbox to enable automatic login and on the Forgot password checkbox to allow ADDT to create forgot password page which will allow users to request their password in case they forget it.  Click on Finish to close the Login Wizard and to generate the form.  The image below shows the generated user login form.

user_login_form.png

Creating the user registration form

Seeing as our blog will be given users the option to register, we need to create a registration form.  Create a new file called register.php as save it at the site root.

From the Developer Toolbox toolbar, click on the User Registration Wizard.

uregister_wizard_button.png

This will launch the user Registration Wizard.

In Step 1, the database details are automatically selected and set up.  So nothing needs to be done here.  Click on the Next button to move to Step 2.

ureg_wizrd_step2.png

In Step 2, all the fields except for id_usr will be listed here.  Name_usr, email_usr and password_usr will be setup properly for you, (i.e name_usr and email_usr will be assigned text fields and password_usr will be assigned a password field).  Set the Display as value for the registrationdate_usr as Text and then set the Default value to {NOW_DT}.  Do the same for active_usr but set the Default value  to 0.  Delete all the other fields listed as they will not be needed.  Click on the Next button to move to Step 3.

ureg_wizrd_step3.png

In Step 3 make sure that all the value are required for validation.  Click on the Next button to move to Step 4.

ureg_wizrd_step4.png

In Step 4, click on Send welcome email and Use account activation so that upon registration, a new user will received an email welcoming him to the CMS and another email prompting him to activate his account.  Click on the Finish button to generate the Registration form show below.

generated_ureg_form.png

Finally, we don't really want to display the Registration date and account status on the registration form, so select the two rows holding the information and delete them.  The final registration form should look like the image below.

final_ureg_form.png

This concludes Part 1 of this tutorial.  In Part 2, we will look at trying to add categories, articles to our blog as well as managing them.

 

loading

...Loading comments for this article...

loading

...Failed to load comments for this article...

0 Comments

There are no comments for this article!

  1. author icon {dsArticleComments::poster_name}
    author icon {dsArticleComments::poster_name}
    {dsArticleComments::text_com}
    time icon {dsArticleComments::comment_date}

 

Feel free to leave a comment

Comments will be approved before appearing on the site!


   

Comment Policy: