Page 1 of 1

Designing my own CMS

Posted: Sun Apr 19, 2009 11:20 am
by warom
Hey everyone, before I start, I will say that I rate my skills in php at about "Average" :)
So, I want to create my CMS with theme support similar to that of wordpress, drupal, etc... So all you have to do is create a basic style put some <?php ... ?> tags at convenient places such as title, header, footer and content. I am trying to create a class to load the theme, however I can not think of a way to do this.
How can I load the content into the right places, before I made a simple system which wasn't OOP.

Code: Select all

include 'themeheader.php';
echo $content;
include 'themefooter.php';
my current goal is to have something like:

Code: Select all

new theme($themename);
new content($pageid); 
And load all the content of that page into the right places in the theme. Obviously this is very simple, but I just want some idea of how to handle the theme and the data of the page. Thanks. (Also if this is the wrong place, sorry).
Remember, I am not looking for actual code solution but more of an idea/way to complete my goal.

Just realised I put it in security, can someone move this or can I delete it?

Re: Designing my own CMS

Posted: Tue Apr 21, 2009 1:12 pm
by gregor171

1. include 'themeheader.php';
2. echo $content;
3. include 'themefooter.php';
jp. those were the days.
here is a simple solution http://www.planet-source-code.com/vb/sc ... 3&lngWId=8