Jump to content

Archived

This topic is now archived and is closed to further replies.

rmwebs

Creating a CMS/Portal

Recommended Posts

Hi,

 

Ok im new here (so im stupid :) )

 

I have Dreamweaver MX 2004 and want to create a CMS/Portal which i can use on all my sites & be able to add/edit/deleat things via the admin cp

 

can somebody direct me in the right place to start.

 

A good tutorial would help because everybody keeps saying to me that its easy to create an admin system in DWMX and im so confused :'( please help me

 

 

Thank You

 

Rick

Share this post


Link to post
Share on other sites

Since noone else replied I'll take a stab. Nothing Fancy!

 

First you will need a server running php/MySQL (obviously)

 

Next, you need a basic log in page:

 

Add a table to you db via phpmyadmin(or whatever) with three fields. One named id(make auto increment, primary), one named username, and one named password. Go ahead and insert a couple users into the db for testing. Create a form with two fields, user and password. Using the Application Menu in DW, add a recordset to the page using the DB you just set up. Select Log in User from the same menu and set that up as you like.

 

OK, so you have a db, and you have the users stored in it. keep in mind the passwords are stored in the db as plain text, so it's not that secure. You can similarly make pages to add records to the db, modify ect... You can protect pages via user/pass or level as well. This should get you started. Good Luck! Add content the same way.

Share this post


Link to post
Share on other sites

IMHO, a good design eg: database design is important...

you need to have pages like: Insert Content, Delete Conten, and Edit Content...

then you have to have a navigation/links to lead you to those pages that have just placed in your db... like for example, imo, the simplest way to do a links is: http://www.yoursite.com/index.php?target=page_to_load

OR

http://www.yoursite.com/index.php?target=about_us

 

in your database, it would look something like this:

Unique_Content_Name Content_of_page

about_us blahblahblah....

 

what it does is when you load the page, you can use $_POST['target'] in an SQL query...

you do a seach in your database using $_POST['target'] as your basis... the sql returns the row when it has found the $target... when u have the row, you can display Conten_of_page...

 

hopes that makes sense... also, there are lots of tutorials out there... you should look up tutorials such as "Inserting data to a database" tutorials... or you could get a good book...

 

at least thats what i think and based on the little experience that i have... :) i am after all a newbie too :P

Share this post


Link to post
Share on other sites

oh made a mistake above, use $_GET['target'] instead of the $_POST['target'] ...

too lazy to edit the post :P

Share this post


Link to post
Share on other sites
Ok im new here (so im stupid  )

you are not alone.

 

I think the best place for you to start is to read throught the tutorials @ phpfreaks & also do a big Google search.

 

I am an advanced designer who uses macromedia, but when it comes time to designing a Db CMS, I turn to help bigtime. The last couple of posts are good if you know what they mean, so use them as a basis of understanding.

 

I found a nice little script from this guy in Uk i think, called php update . If anything it will help you understand usage of databases, functions etc. He is constantly updating it, but after all my searching, I have found I can really start to understand it.

 

Anyhow, if you already know this stuff i apologise, but this may help someone else viewing this thread.

 

Do like i do, think big, start small, and if you can design nicely, why not swap design for code, I do & it works out well!.

 

All the best with your search!.

 

72dpi :ph34r:

Share this post


Link to post
Share on other sites

Thank you everybody for posting replies,

 

im going to have a stab at it, so far scince i started learning php i have produced a news script with a comment function for each piece of news but i find forms a bugger, i cant figure out how to create a form to add/edit/deleat but im sure i can do it in DW-MX.

 

If anybody has some tips, or any links to tutorials regarding cms design, etc it would be greatly appreciated.

 

Thank You

 

Rick

Share this post


Link to post
Share on other sites
oh made a mistake above, use $_GET['target'] instead of the $_POST['target'] ...

too lazy to edit the post

 

Not a good idea to use GET, with get hackers or even anyone could use the passthru command to upload and file to your server, they could also view your servers password file which will include your username and password needed to login to your cpanel(or whatever your webhost uses). I reccomend using $_REQUEST['target'] and putting the following code into a file like grabpage.php then including grabpage.php(or whatever you called it) on the index page where you want the content to show up

 

<?php

   $page = $_REQUEST['page'];
   if(eregi("[a-z0-9\-_\.]+", $page, $regs)) //make sure $page is alphanumeric
   {
       $dir = "includes/"; //not strictly necessary, can be blank.
       $ext = ".php"; //.php, .html, .txt, whatever
       if(file_exists($dir . $page . $ext))
       {
           include($dir . $page . $ext); //or readfile if not expecting php code
       }
       else
           echo '404 - Not Found'; //or something similar
   }
   else
       echo 'Not a recognized page.';

?>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.