Designing my own CMS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
warom
Forum Newbie
Posts: 1
Joined: Sun Apr 19, 2009 11:08 am

Designing my own CMS

Post 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?
gregor171
Forum Newbie
Posts: 22
Joined: Thu Apr 16, 2009 5:09 pm
Location: Ljubljana, Slovenia

Re: Designing my own CMS

Post 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
Post Reply