PDA

View Full Version : Building a CMS



agua
01-15-2006, 08:05 PM
OK - I'm going to bite the bullet and build my own CMS as most of the ones I have used never fully meet my needs. I have 3 questions to start with, all outlined below.

1 - What features would you include, have you included in your CMS?

2 - I am pretty much starting from scratch - I mean I can do php includes :) but the rest is beyond me - so I was going to use the "Build Your Own Daabase Driven Website" from Sitepoint - is this recommended?

3 - I also have worked with many template systems over the years and would like to create a simple one for my CMS. By simple I mean where you place tags like this in your design {nav}, {content} - where do I find out about creating a template system?

Thats it for now - thanks for your time.

Chris
01-15-2006, 09:12 PM
I think this might be too big of a bite for you if you can only do PHP includes now.

agua
01-15-2006, 10:05 PM
ok... where should I start then - what type of thing should I build to learn?

Todd W
01-15-2006, 10:15 PM
This has also been covered... just search I think I talked about this, and someone else and Chris.

Masetek
01-16-2006, 12:18 AM
Following a book would probably be easiest, I dont have that sitepoint book so I cant comment.

Forms would probably be a good start, learning how to manage form data and understanding how they work.

deronsizemore
01-16-2006, 08:03 AM
I know nothing about building my own CMS...but have you looked at TextPattern? It does a lot of things.

etech-martin
01-16-2006, 05:02 PM
I know nothing about building my own CMS...but have you looked at TextPattern? It does a lot of things.

Yes, I think you should also go through this site for textpattern reviews. :) http://www.opensourcecms.com/index.php?option=com_content&task=view&id=177&Itemid=0

agua
01-17-2006, 02:38 AM
Thanks for the replies :)

I still think I am going to go throught the book - it can only increase my php knowledge - even if I cannot use my cms in production for a few months. I have coded a mail return form before (It even had a file attachment - which was, still is a major acheivement for me!!!!), so I suppose I was been harsh on myself saying I can only do php includes - but looking at what is possible with php - its seems pretty daunting.

I know the topic had been covered before and had seen the posts, but I wanted to through it out again to people to see if things had changed, or maybe someone new has used a different ideas - this is also why I purposely ommited the features which I was planning to include - so it didn't .

I have looked at textpattern - and used it on several occasions - and like it very much - but I think that it would be easier to work with something which I have built - using only the features I need.

Off topic -do you know how to display meta tags on pages with a sticky article in textpattern?

Blue Cat Buxton
01-17-2006, 04:38 AM
I started learning PHP with the free download chapters from the sitepoint book, and they stood me in good stead.

Undertaking a project is a great way to learn a programming language, but you will probably need to break it down into very little steps. Spend a lot of time planning (both the CMS site and the database structure) otherwise you will get so far though and wish you had done something / a lot differently.

Masetek
01-17-2006, 07:52 AM
Undertaking a project is a great way to learn a programming language

So true. And in neary every job you undertake there's something that you need by don't know how to do - its a great learning experience.

Like Blue Cat said, there's also alot of planning involved. You can start on your cms by writing down every function and tool you want it to have. Think about the page structure and what you would like to have on each page. Think of user friendly ways to do things. Think about if you would want it to be able to handle multiple sites. There's so many things to think about. Its better if you plan it now and get your ideas down on paper and get a solid picture in your head of what you want.

deronsizemore
01-17-2006, 08:10 AM
Thanks for the replies :)

I still think I am going to go throught the book - it can only increase my php knowledge - even if I cannot use my cms in production for a few months. I have coded a mail return form before (It even had a file attachment - which was, still is a major acheivement for me!!!!), so I suppose I was been harsh on myself saying I can only do php includes - but looking at what is possible with php - its seems pretty daunting.

I know the topic had been covered before and had seen the posts, but I wanted to through it out again to people to see if things had changed, or maybe someone new has used a different ideas - this is also why I purposely ommited the features which I was planning to include - so it didn't .

I have looked at textpattern - and used it on several occasions - and like it very much - but I think that it would be easier to work with something which I have built - using only the features I need.

Off topic -do you know how to display meta tags on pages with a sticky article in textpattern?


Maybe I'm confused on what you're asking, but wouldn't you just place the Meta Tags in the HTML of whatever page you have your sticky article on?

I actually have the PHP/MySQL Build your own database driven site book from SitePoint. Just a little heads up, they don't exactly go through a lot of steps to creating a CMS. Keep in mind here, I'm just starting the book myself but have looked through to the next couple chapters, when I looked ahead to the chapter about the CMS, they give you a very basic example of creating, adding, and deleting jokes from the database, and more or less expect you to build upon that for your own needs. The book really doesn't cover CMS's a lot (about 40 pages or so out of 300). It looks to me like they give you some techniques in each chapter you could use toward making a CMS, but the book is mainly about just making your site database driven rather then static content.

Whether or not they are useful to you or not, here are some links I've picked up along the way about building a customer CMS.

1. http://www.php-mysql-tutorial.com/cms-php-mysql.php
2. http://www.interspire.com/whitepapers/index.php?pageName=Build_a_multi-page_Article_System_using_PHP%20or%20ASP (sorry this link looks to have changed some. At one time it was about building a CMS, but you still might find some articles about CMS's there if you search, don't know?)

mark1
01-17-2006, 08:10 AM
I'm not really what you'd call an expert programmer even though I developed quite a bit of actionscript stuff ,I'm learning PHP right now, anyway if you are a "learn by watching" guy, check this great vid out http://toptentshirts.com/php-guide/php-guide.php
it shortened my learning curve big time.

Hope it helps

asphalt
01-17-2006, 02:00 PM
I have been working on a simple CMS, and masetek brought up the idea (in another thread) of creating a CMS to manage all of your sites. When he said this I envisioned something like a dashboard, where each site would be managed from a central control panel, with a central DB for management settings. I thought this was an interesting idea that I didn't think about when I did mine.

Was that your idea masetek? Any suggestions or thoughts? I thought it would be nice to manage everything from one application but would it cause problems in the long run?

agua
01-17-2006, 04:45 PM
Great advice - its sounds a little like designing brochures and magazines (which I used to do) - everything has to be totally planned out before you even go near a computer to get creative - from the overall schematic to individual pages.

Great links also - especially the video tutorials - some of the best I've seen - mostof the other I have already.


Maybe I'm confused on what you're asking, but wouldn't you just place the Meta Tags in the HTML of whatever page you have your sticky article on?deronsizemore - that is what you would do normally - but if you have more articles in the section and they have their own meta data - then you end up with 2 sets of meta tags... I don't think this is good - still I'm sure there is a work around - but that brings me back to why I want to make my own cms :)

Its all swings and roundabouts.

Sean
01-17-2006, 05:25 PM
deronsizemore - that is what you would do normally - but if you have more articles in the section and they have their own meta data - then you end up with 2 sets of meta tags... I don't think this is good - still I'm sure there is a work around - but that brings me back to why I want to make my own cms :)


I've never used textpattern, so I don't really know if this is what you're talking about (Ignore this post if it isn't).

But, if you mean like having different meta data for different articles shown from the same file (i.e. articles.php?article1 and articles.php?article2 or articles/article1 and articles/article2 if SEOed URLs), then what I would do is have a column the the articles database for meta description or keywords etc. Then just get the info from the database and assign a variable to it and use it like:


<META name="description" content="<? print($metadescription); ?>">
<META name="keywords" content="<? print($metakeywords); ?>">

Again, ignore this if it wasn't what you were looking for. heh

Masetek
01-17-2006, 06:10 PM
Was that your idea masetek?

I found that I was copying code constantly from one site to the next so I thought I may as well make 1 cms that can manage multiple sites. It's a simple setup, but makes things much quicker to run. Basically every site has it's own template and stylesheet. On the template I build all the static menus etc (nav). The rest of the site is 100% db driven.

At the moment I am running several small sites off the same db, but I have built in functions to handle other db's as well. The cms can produce things you need for all sites easily like site maps, links pages etc. I have also added external link tracking so you can track which affiliate links are clicked.

I also have a table for adsense ads. Each website can have as many ad options as it wants, depending on the style. And you can easily insert them into articles and pages by just selecting the appropriate ad when youre writing an article.

This system is only meant for small site atm, because theyre running off the same db. Large sites doing this would be to slow becuase there would be too many db queries. But, it's easy to set it up to connect to multiple db's. This is only the basic version, like I said to Aqua, I write ideas down for it all the time and add them when i get some spare time.

If you have the skills, I highly recommend you write your own. Start with something simple and build on it - it will save you so much time in the long run.

deronsizemore
01-17-2006, 08:31 PM
Great advice - its sounds a little like designing brochures and magazines (which I used to do) - everything has to be totally planned out before you even go near a computer to get creative - from the overall schematic to individual pages.

Great links also - especially the video tutorials - some of the best I've seen - mostof the other I have already.

deronsizemore - that is what you would do normally - but if you have more articles in the section and they have their own meta data - then you end up with 2 sets of meta tags... I don't think this is good - still I'm sure there is a work around - but that brings me back to why I want to make my own cms :)

Its all swings and roundabouts.

My bad. I guess I was confused. :) I wasn't thinking about it for a lot of articles. Thus far in my site, I'm just using static pages in text pattern, so the meta tags in the html pages are fine for me.

MarkB
01-18-2006, 02:11 AM
In the different CMS systems I have built for clients in the last 18 months, the one thing that keeps popping up is to always make sure you understand how each section of your CMS relates to everything else.

Draw out a broad diagram of your site on paper, how the functional areas (sign-up forms, searches, articles, etc) relate to one another. From there, design a rough framework (again, on paper or in notepad) of your database scheme (if you're using a DB).

Then, naturally, plan it out further, avoiding duplication of records, etc etc. Once you have that, begin coding :)