PDA

View Full Version : CMS Suggestions?


Ankun
11-20-2002, 05:24 AM
I am looking for suggestions for an extremely basic CMS suggestion, I dont want to have to deal with templates and such, because the only thing I want generated is text files to include with the template I have designed and configured already myself.

Basically what I need is a CMS that will allow me to post a new page, that will have a navigation (generated as a seperate file) for each subpage of that page. Fairly simple..I dont understand why going through 138 scripts has left me with absolutely nothing -_-

beetle
11-20-2002, 03:36 PM
Why don't you let us know what you have looked at and discarded?

postNuke?
phpNuke?
eZ publish?
Empower?
Pagetool?
Page-engine?

It hardly sounds like you need a CMS (many of which let you specify your own templates anyhow...)

Ankun
11-23-2002, 05:35 AM
i've tried php nuke, post nuke, ez publish (out of what you've named) and every php script in the content management system section of www.hotscripts.com (from the first 4 or 5 pages)

all of them have been too automatic for me, they all have premade templates, etc, etc, and all require mysql..I just want to make 2 pages for each section, one with the content, and one with a navigation to go to other pages for that section, no templates, nuthin, Just plain html for formatting text only.

ConfusedOfLife
11-25-2002, 08:29 PM
Hi friends, as a part of lesson I wana present you with a dummy question and you have to learn how to tolerate it!

Question : What's this CSV/CMS thing?!

beetle
11-25-2002, 08:44 PM
CMS = Content Management System
CVS = Concurrent Versions System


Here (http://www.webmasterbase.com/article/831) is a good article on CVS. CMS is a pretty broad topic, but in a nutshell, a CMS allows you to manage your website, it's content, links, images, users, etc from a web-based interface (usually).

mordred
11-26-2002, 04:25 PM
CMS is currently *the* buzzword for PHP applications. Nearly everyone is producing CMS's nowadays, because the time of static HTML pages is really over for large web sites. Of course, as beetle pointed out, it is a very broad topic lacking a tight definition. If you want to, you can define a CVS as a CMS, and you could do the same with the good ole windows explorer.

P.S: Is CVS not Concurrent Versioning System? see http://www.acronymfinder.com/

Ankun
11-26-2002, 05:54 PM
Originally posted by mordred
CMS is currently *the* buzzword for PHP applications. Nearly everyone is producing CMS's nowadays, because the time of static HTML pages is really over for large web sites. Of course, as beetle pointed out, it is a very broad topic lacking a tight definition. If you want to, you can define a CVS as a CMS, and you could do the same with the good ole windows explorer.

P.S: Is CVS not Concurrent Versioning System? see http://www.acronymfinder.com/

yeh it is..

"CVS | Concurrent Version System | GO "

direct from the site u just posted :\

beetle
11-26-2002, 06:48 PM
Versioning
Versions
Version

That's just semantics...the meaning really doesn't change with any of those...

Ankun
11-27-2002, 06:47 AM
well anyway..if someone had an extremely basic CMS in mind..that'll just make html pages, that'd be exteremly appreciated..it seems i'm not really going anywhere with writing my own CMS..my lack of knowledge of the language hurts extremely..

Buddha443556
11-28-2002, 03:46 AM
I maintain a site that's spead a across three servers, and contains both static and dynamic pages. I've been maintaining this site as a test bed. (Sure the Hell ain't for the money!) I've been through that CMS directory at Hot Scripts too. None are simple.

TEMPLATES! Don't waste your time. PHP is a templating engine. (I was just ranting about that over here (http://www.phpbuilder.com/board/showthread.php?s=&postid=10257482#post10257482).) Hard to remember sometimes with all those commands.

I find most CMS rather inflexible and a waste of system resources. None seem to deal with static pages conveniently.

Nearly everyone is producing CMS's nowadays, because the time of static HTML pages is really over for large web sites.

Static web pages over? Then why are these CMS all jumping on page caching. Having seen a server come to a crawl under one of these CMS, I can understand why some people won't host them.

You have my sympathy Ankun. But, maybe it's time to stop looking, and start coding. PHP should be able to throw your page together and with output buffering you should be able to save it as nice static HTML. Well, good luck Ankun.

Ankun
11-28-2002, 05:19 PM
yeh, thanks alot, i've already started working on learning php and writing something to manage my site, its pretty tough but I think i'll get it.. php is way different than visual basic though :\ so its like learning how to program all over again.

mordred
11-28-2002, 10:57 PM
Originally posted by Buddha443556
TEMPLATES! Don't waste your time. PHP is a templating engine. (I was just ranting about that over here (http://www.phpbuilder.com/board/showthread.php?s=&postid=10257482#post10257482).) Hard to remember sometimes with all those commands.


PHP is a templating engine? I think you're not stating a fact, but rather your personal opinion. If you use PHP just as a templating engine, you're surely right though.

I read your rant about Smarty in particular and of course you have some good points against Smarty; it's certainly not the silver bullet. On the other hand, from my experience I would say: Forget about teaching your designers PHP. Why? Because programming languages are not their field of expertise. There's most certainly a reason they decided for designing. You will be the one who's cleaning up the mess they leave while "experimenting" a little bit. And I rather have the Smarty compiler forget about a malformed smarty tag than see PHP parse errors due to a lost semicolon. For those programming in PHP, it's easy to use PHP as a template engine. For others - I doubt it.

It's always easy to present


<?php echo $myContent; ?>


as the most efficient way display content on your page. Sure, it's pretty straightforward and it works fine if "Hello World" is everything to be echoed. But what if you have a complex table structure coupled with a form to echo? Put it all in your $myContent variable? That's not separating content from presentation either. Template engines *can* serve as an additional layer between your business logic and the presentational result. Though my current ideal model would be to create XHTML pages that serve as templates and through expat XML parsing or DOM XML you manipulate designated elements based on their attributes. Surely with it's shortcomings, but yet a "cleaner" approach than standard template engines.


Static web pages over? Then why are these CMS all jumping on page caching. Having seen a server come to a crawl under one of these CMS, I can understand why some people won't host them.


You have a different definition of a "static" pages than I have. For me, a static html page is a page that is not created by a server-side application (well, there are also client-side CMS), whether the output is cached or not by whatever means you want to employ. As beetle said, it's maybe just semantics.

beetle
11-29-2002, 05:14 AM
I've heard alot go around about Smarty, but I've never used it. I have, however, used patTemplate (http://www.php-tools.de/site.php?&file=patTemplateOverview.xml) which is fantastic for a templating engine. I'll agree that templates have their place and needn't be avoided on status alone, but certainly are not any sort of Holy Grail of page rendering. Letting a designer edit an (X)HTML template without you around to provide ANY sort of help is nice. I do admit, however, that I may have a skewed view on this topic as I am both a designer and a programmer :D

If you don't use a separate template engine and just use PHP itself, you will undoubtedly create logic and functions to help you with looping/reapeating HTML blocks, etc. And if you're knowledgeable enough, you may just make a class to handle all this. A decent templating engine (like patTemplate) is a pre-made set of classes for this sort of page-rendering, and can save you the legwork of making your own.

Buddha443556
11-29-2002, 07:30 AM
Originally posted by mordred
Sure, it's pretty straightforward and it works fine if "Hello World" is everything to be echoed. But what if you have a complex table structure coupled with a form to echo? Let's take a look at a snipet of one of my complex table structures. // get the table header and add it to the content
$var['content'] = $templates['show_header'];

// get the rows to display
$query = 'SELECT * FROM `template`'
.' ORDER BY `name` ASC'
.' LIMIT '
.$offset
.', '
.$limit;
$result = db_query($query, $tcm['db_link']);

// add the rows to the content
while($row = db_fetch_assoc($result)){
$var['content'] .= template_parse($templates['show_row'], $row);
}

// get the footer and add it to content
$var['content'] .= $templates['show_footer'];

$var['chain'] = page_chain(
$PHP_SELF.'?op=show&limit='.$limit.'&page=',
$curpage,
$numpage);

// get the page template and display page
echo template_parse($templates['admin_page'], $var);Notice I use three templates show_header, show_row and show_footer to make the table. The resulting 'content' was then used in the 'admin_page' template. Those first three template can be modified by template designer to change the layout of (any of) my table. The designer never need to see this code. This page doesn't use a form but a template could easily be added/modified for one.

Now I'm no genius, but I think I've seperated the logic and the layout pretty good without Smarty. Seems to me to be a lot easier to maintain too. That's strictly a personal opinion having used Smarty.

I don't have anything against templates. They work great. It's just the way they're being implemented that sucks.Originally posted by beetle
A decent templating engine (like patTemplate) is a pre-made set of classes for this sort of page-rendering, and can save you the legwork of making your own.I think that's a valid point, if not intended, let's not forget there are a lot of non-programmers using PHP out there. Many of whom don't know the first thing about programming. Script like Smarty and patTemplate may look like an easy way to get start to them. They may not realize that PHP can do the same thing easier and cleaner.

Sorry beetle, I don't use classes in PHP. PHP doesn't fully support classes, maybe when it does I'll use them. I love them in Java though.

Buddha443556
11-29-2002, 07:42 AM
You might want to know what template_parse looks like.function template_parse($parse_template, $parse_variables){
extract($parse_variables);
while(stristr($parse_template,'<?php ')){
ob_start();
eval("?>" . $parse_template . "<?php ");
$parse_template = ob_get_contents();
ob_end_clean();
}
return $parse_template;
}

beetle
11-29-2002, 05:54 PM
Originally posted by Buddha443556
Sorry beetle, I don't use classes in PHP. PHP doesn't fully support classes, maybe when it does I'll use them. I love them in Java though. True, but I don't think that is a good reason to not use them. Sure, PHP's OO isn't the best, but why not use what it's got? Heck, I use OO in javascript when I can, and it's OO is VERY basic.

Buddha443556
11-29-2002, 07:13 PM
Unlike Java, PHP was meant for rapid development of small to medium projects using structured programming methods. OO add-ons in PHP are definitely lacking. There's no unified standard class library as in Java, this I consider the biggest drawback. (Sun has done a great job managing standards.) I personally don't need to follow OO programming methodologies just write a small program. After 20+ year, I write code in my sleep, sometimes even classes. :D Literally. I use PHP as it was meant to be use, but to each their own.

mordred
11-30-2002, 12:17 AM
Judging from my current knowledge, Java's predecessor Oak was developed as a language to be used in embedded systems controlling a fridge or a toaster... :D

The original intent of a language inventor does not necessarily mean that much any longer after some years, does it? Especially for PHP which had quite a democratic development process - that unfortunately resulted in a inconsistent syntax and extension API.
Concerning OOP, I'll second beetle's response. Just because the functionality is not comparable to Java should not stop us from using classes at all, though there are a lot of shortcomings with OOP in PHP, like


No compound statements
No complete encapsulation (private variables)
No exceptions
Limited inheritance of predefined objects


hmh... maybe I really wait until ZE2 is announced stable.
Additionally, without using classes, you can't make use of the DOMXML and Ming extensions.

So much for classes, I'm right now trying to get your templating example working.

EDIT: Got it working. Works really nice, and compared to a RegExp alternative I quickly hacked together it was roughly 5 times faster processing a small template file. Nice work, and definitely a technique to take into consideration when researching on templating engines. :)

[m]
11-30-2002, 04:24 AM
I think you know what u want this CMS to do, so just write down the basics and try to acomplish that as a goal

Buddha443556
11-30-2002, 05:33 PM
Thanks mordred. That code was actually from a work in progress, notice I haven't dealt with empty results yet. But, now you can try bigger templates. :D

This technique is faster, more flexible and I reuse a lot more code now. Layout has become a seperate step which is great for me.

Back to OOP......

I think the intent of the developers as to how the language was going to be implement might be more relevent than the use. If they intended to develop an OO scripting language we would be dealing with classes and stricter typing. They didn't, so here we have OO constructs slap on to PHP which implemented with structured programming in mind. Democracy at work, like you pointed out. Maybe a seperate OOPHP should be developed from stratch. As it stands, I don't think it's worth the overhead to do OOP with PHP.

I'm an old timer, I remember when OOP was just a concept. My first language was Z80 assembly. Although, we had to convert it to decemal because we didn't actually have an assembler. God, I'm getting old. Anyway I'm doing it my way! :p

beetle
12-01-2002, 01:25 AM
Originally posted by Buddha443556
As it stands, I don't think it's worth the overhead to do OOP with PHP. Pardon my ignorance, as I don't disbelieve you, but...what overhead?

firepages
12-01-2002, 03:12 AM
There is always an overhead with OOP in ANY language as you have to instansiate your objects, then it gets a little quicker after that, but again thats the same for all languages and I doubt that PHP suffers any more than any other, in fact because some languages treat everything as an object they rely on 'compilers' to make the thing fast enough to be viable.

OOP has been in PHP for a while now (I thought it was there in 2/FI but could be wrong) PHP is very much C/C++ and therefore uses structures and objects internally already, its only issues are noted by Mordred above, and to a point they are being taken care of in Zend2 which is a rewrite to make sure that extra OOP functionality is NOT just 'bolted on'.

The only thing that I am hanging out for in PHP5/Zend2 is better dereferencing cos that means less typing :) , multiple inheritance is viewed by some as a sign of bad programming (that you would need to use it) , though not to others... either way it wont be supported in Zend2 as far as I can see? , anything else is quite straightforward to implement even if it takes a little more planning etc.

Its a common misconception that because something does not exist in PHP (i.e. a decent DB API) then the language should not be considered for that aspect of your work, but the beauty of PHP is that everything is quite possible , you just sometimes have to make it yourself. The lack of an API for instance (essential in the words of many now silent commentators) can hardly be a good argument now since (ok there is a simple API(DBX)) PHP is used quite a lot in conjunction with DataBase's, in fact it now suffers from 'it`s great for database work but.... ' sort of stuff.

As it happens I think OOP is much overused and often badly used in PHP webpages (I see so many classes purely for building HTML tables for instance) but that does not mean it does not work nor indeed that it is incapable of anything as such, multiple inheritance & exceptions accepted, everything else is quite workable.

beetle
12-01-2002, 06:04 AM
Well, I'd be interested in having a class I wrote examined by a couple people that really know what they're doing. So, if you please, and have the time, check it out :D

http://www.lanwizards.com/ziptest.php

Buddha443556
12-01-2002, 12:45 PM
Thank Firepages. There's other overhead too. Remember OOP was really targetted at big projects. Big Project require lots of planning. I once heard OOP described as, "99% planning and 1% coding." Obviously an exageration but it makes it's point.

I'm not saying you can't do OOP with PHP, I'm saying I DON'T NEED TO USE OOP. I need to develop pages quickly and be able to maintain them. I can do that without OOP. It's strictly my personal choose and PHP doesn't seem to mind. Guess I should be shot for writing well documented structured programs quickly.

orginally from Firepages:
Zend2 which is a rewrite to make sure that extra OOP functionality is NOT just 'bolted on'.

That worries me because I really do enjoy not having to sit down an worry about classes.

[edited for security]

Ankun
12-02-2002, 05:56 AM
Originally posted by beetle
Well, I'd be interested in having a class I wrote examined by a couple people that really know what they're doing. So, if you please, and have the time, check it out :D

http://www.lanwizards.com/ziptest.php

:) thats freakin awesome, lol, where did you go about finding a list of all the zip codes in the country? as well *** their longitude / latitude?? (the coding is nice too ;) looks like a fairly large project)

Originally posted by [m]
I think you know what u want this CMS to do, so just write down the basics and try to acomplish that as a goal

yes..yes, I have already begun working on it, thanks for staying on the topic.. :) coding this has been a pain but I think I will be able to make it work eventually.

beetle
12-02-2002, 06:08 AM
I got the data from the US census website. It was free, but incomplete (about 10,000 zips short of a full list). I can get full records from a company I found for $120.

mordred
12-02-2002, 03:12 PM
For those who want to know what changes to the OOP behaviour come in PHP5.0, here's an article by Zeev Suraski that sums it up quite decently:

http://www.devx.com/webdev/Article/10007/1954

beetle
12-02-2002, 08:33 PM
Great article mordred! Thanks for sharing!

Buddha443556
12-04-2002, 04:25 AM
Great article Mordred, thanks. I might even start using classes in PHP. Might. :o Definitely looking forward to better error handling.