This is the first post on this site, which is the demo of a custom Content Management System I made after getting frustrated with existing offerings. I wanted something much simpler than the gruesomely complicated and over-engineered systems I've worked with, with as few moving parts as possible. I only need a few basic features; a weblog, comments, free-form pages, and the ability to edit it all through the website without having to ftp files or use a cumbersome CMS interface.
What I came up with is a fairly simple basic system that allows for flexibility. The core of the system is made up of a .htaccess file and an index.php file, and the content is stored in various xml files.
- the .htaccess file just redirects requests for 'foo' to index.php?q=foo
- index.php looks for foo.xml in the 'content' folder.
- the xml file is loaded and fed into a 'process' function that processes each tag recursively.
- tags in the xml files can just be displayed as-is, either using a CDATA section or real XHTML if you're feeling saucy.
- any tag in the xml file may specify a 'processor' attribute, which identifies a PHP class that should be invoked to process the contents of the tag and do something special to it.
The 'processors' are where it gets interesting, they provide all kinds of special functions like including other xml files, wiki-style content processing, admin login and access control, post/comment support and formatting, etc. These can be added onto or replaced as necessary, or removed entirely, although at the very least, the Include processor is pretty helpful.
It is still a work in progress, I may put it up here for download eventually, but I'd like to observe it in action for awhile and work out any kinks.
Comments
Add a comment