View Full Version : Making a Custom Flat-File CMS

01-11-2006, 03:14 AM
I want to make a very simple CMS, it will have one purpose - to allow a user to log in and add in a date and an event description. The info will then be displayed on a page.

There will be lots of events though, so I need a way of storing them, and then displaying them, with the latest date event at the top. Preferably there should be a method of deleting events as well.

One problem, I don't have access to MySQL so I want to do this with flat-files... I know, eek. But I'm sure it'll be possible (perhaps splitting each date/description with a character such as | and then exploding them?).

Can anyone give me a guidance on where to start - I really have no idea where to begin!?

.htpasswd security could suffice but I'd prefer a html login if possible - but I need to know it will be pretty safe!

I'll be doing it in PHP. :)

01-11-2006, 04:13 AM
Do you really have to remake one? There is already a decent one. Its called Cute News (http://cutephp.com). Its free, customizable if you find the right files. It stores its comments in text files.

01-11-2006, 04:29 AM
Well making it was part of the challenge, but thanks I'll take a look at Cute News anyway and perhaps alter to it to suite my needs.

01-11-2006, 04:33 AM
I customized it to be valid XHTML/CSS. You can see it in action here (http://prdesignz.inraged-inc.com/cutenews/example1.php).

01-11-2006, 04:59 AM
ive been playin with this a bunch, too...
dont know if its really helpful, but i had fun playin with it...
and its super little


01-11-2006, 03:47 PM
Thanks guys, it does look good but I really don't need all those options, hence me wanting to just create it myself.

I've created a login system which seems to work well (just a basic PHP one), now I guess I need to create a form which will add the date/event to a text file, and then the page which will somehow read each date/event from the file and display them nicely. How would I do this? Or is it best asking in the PHP section?

01-11-2006, 04:13 PM
For PHP-related issues you're probably better off in the PHP forum; for questions on how to create a form and how to process stored data on a web page, the HTML & CSS forum may be the better spot.

As an alternative to flat files, storing data in XML documents might be an interesting option; I found SitePoint's "No Nonsense XML Web Development With PHP (http://www.sitepoint.com/books/xml1/)" a rather compelling read (and no, I'm not associated to SitePoint in any way; I had to fork over the cash like the next guy).

01-11-2006, 04:29 PM
I can build the form etc OK (already done so), I'm just not too sure on the PHP.

Interesting you should mention XML, I just found this - http://www.sitepoint.com/article/management-system-php - definately seems quite a good way to do it.