Jump to content
Larry Ullman's Book Forums

[Very Simple] Content Management System?


Recommended Posts

Hey there,

 

How do I create a very simple CMS that basically does the following things:

 

  1. Creates a page as a .php script by accessing the page domain.com/create
  2. Creates the page using a notepad++ like editor (with colored syntax)
  3. Everytime a page is created, there will be a header include and footer include so you don't have to put HTML tags or specify a CSS every time.
  4. Possible to make instant preview?

So basically, how do I do this?

Link to comment
Share on other sites

Hmmm... I'm not sure what all you're asking, but here're my attempts at answering your questions:

 

1) In the create directory of your domain, add a file named index.php that contains all of the functionality listed below.

 

2) Do you know how to write a parser? If not, I wouldn't even attempt unless you're confident in your programming abilities. If you can't do that, then I'd find a free library that can do the color coding for you.

 

3) This is easy enough with file_put_contents (http://php.net/manual/en/function.file-put-contents.php).

 

4) This is easy to do with JavaScript. Just put a div or something below the text area you're typing in, and any HTML tags that are typed will automatically be rendered. If you want to go fancy, you can also create your own markdown language like Stack Overflow, et al.

 

That help?

Link to comment
Share on other sites

 Share

×
×
  • Create New...