Adroit - a (hopefully) simple cms.

First of all, hello! I’m Stewart, and yeah, that’s pretty much it.

But anyway, I was messing around with some installations of CMS’s and, in my humble opinion, they were either too complicated or lacked features or whatever. I probably just didn’t spend enough time on them, but lets not dwell on that.

So, I did what I suppose many of us do: I started my own, superly-ambitious project. The most exciting thing about it is it’s my first PHP project! Woot. I have a decent knowledge of C++ so don’t worry, it’s all good. Anyway, enough history. I’m just looking for some friendly advice on the design.

I am planning to (and in the process of coding) a modular system. If you want pages, install the pages module. If you want a forum, install the forum module, etcetera etcetera and so forth. Each item which is accesible to users, such as a page, an album (of images), a contact form or whatever, will have it’s own ‘id’, which is just going to be the end of the url, eg. http://mysite.com/[id here]. These will be stored in a database along with the type of the content. If, for example, the id is “home”, which happens to be a page (from the pages module), then my cms will load up the pages module, give it the ‘id’ then let it load it’s content.
Themes will have a .php file for each module they support. So I would ‘include’ the $theme/pages.php file and in it, it would load the content by calling functions like [php]<?php page::print_title(); ?>[/php].

I was thinking that the ‘core’ of the cms should provide a menu handler or something, so that there is an ‘official’ way to create a menu that hopefully all of the modules will utilise.

Anyway, I’d be really interested to hear your thoughts. Oh, and sorry if this is the wrong place to post this, I just really didn’t know where else to go.

Ok, sorry for double posting, but I was bored and couldn’t find an edit button (anyone know where that thing has gotten to?).

Anyway, I’ve made great progress (well, it’s going faster than I thought it would. PHP is much easier than C++, it seems). I have the CMS core bit working, it’s loading modules and stuff, so I have the pages module working as well, and the theme bit works too. I don’t have an admin section yet though, so that’ll be soon, after I finalise the code.

But yeah, are there any security issues I should worry about? And what is the correct way to include a file? I’ve been using “include( $file )” but, I don’t know, it just seems that the include function should be used for files that you KNOW are going to be there, instead of files which you find at runtime.

Oh and one last thing. I’m using static classes for my modules, should I have the theme ‘include’ the ones it needs, or should I include them all beforehand? I’m tempted to go with the latter, for simplicity, but I figure my cms will go faster if the theme only includes the files it needs.

Sponsor our Newsletter | Privacy Policy | Terms of Service