Jump to content

Designing a CMS


Stew_822

Recommended Posts

Hi! I'm Stewart, nice to meet you all :)

 

So I was running my little, personal site fine, everything was going smoothly (I had even create this superly-duperly awesome theme) when KA-BAM! All that shows up is "setup scripts missing". 'Well,' I think to myself, 'is that really a reason to implode?' Apparently, it is. Anyhoo, I saved my theme to my hard drive and decided, as my first PHP project (discounting a crappy quiz I once failed to make) I would create a CMS.

 

So, having tried many (and I mean many) of the CMS's out there, I knew what I wanted: A modular, robust, simple, yet versatile system, without bloat. Is that even possible? I think not, but hey, you gotta try things, right?

 

So I have coded most of the frameworky bit, and was looking for advice. I figure you guys'll be able to spot a couple of flaws in my design, right?

 

I will (hopefully) have a database containing 'id's of content (each separate page will have its own id) and the type of content. My module manager class will load the module pertaining (I hope that's the right word ;) ) to the type of content, and then my 'cms' class will load the theme. Themes will have different files depending on which modules they support. So, if I have the 'page' module installed, my theme would need to have a 'page.php' file to be able to show pages. So, my 'cms' class will pretty much just use PHP's 'include' function to include the 'theme/page.php' file, which will then call the 'page's class's static function to get the data (which was initialised when I 'included' it).

 

So, what I'm wondering is, should I be using another function than 'include' when I include the theme? Should I replace all 'includes' with 'requires'? What do you think of my design? Any improvements, critiques?

 

If I missed anything, just, yeah, ask away :) I attached what I have so far, which is basically most of what I outlined above, without any admin panels or anything. It runs fine on my apache server.

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.