Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 08:28:43 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Flat File Mini CMS in PHP  (Read 36414 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Flat File Mini CMS in PHP
« on: May 28, 2006, 06:14:11 PM »
have you always dreamed about making your own CMS (content management system)?

we are looking for someone to make a really minimal cms system in php, which uses flat files.

volunteers?

allen

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,192
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #1 on: May 28, 2006, 06:16:05 PM »
Flat files, my favorite :) Depending on just how mini it is, I may be able to help. I've been a bit busy the last few weeks but things are, hopefully, slowing down!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #2 on: May 28, 2006, 06:16:33 PM »
allen!!!
we miss you in the irc channel!!!!  :-*  :tellme:  :-*

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #3 on: May 28, 2006, 07:00:34 PM »
Did you ever look into CMSimple?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #4 on: May 28, 2006, 10:41:35 PM »
cmsimple is too simple (All the content in CMSimple is stored in one long file, CMSimple uses the H1, H2 and H3 buttons to divide the text into a sequence of 'virtual pages'. )

here is what i was thinking: less a cms than a template-driven website builder.

basically the idea would be to build a directory tree in a special directory, with content files that can use template variables for menu navigation bars, etc.

and then the cms builder will scan this content tree and build the public_html website by parsing the content files and generating php or html files as the case may be.

so the key features are:
1) the website builder will build static pages (either html or php or whatever the case may be for different files)
2) but it will use some flexible templates and variable expansions to allow it to properly create hierarchical menus and navigation bars automatically.
3) and it will auto discover the tree-based structure of the website based on the content tree.  so if you add a new subdirectory, it will be picked up in the builder and navigation menus will reflect it.
4) we will add special template variable relacement that can grab posts and thread info from the forum.
5) we will add special template variable replacement stuff that will make it easy to do things like create a software hierarchy section like you see here:  http://www.donationc...re/Mouser/index.html
that is, it will be able to grab thumbnails from subdirectories to be able to present a nice list on the parent page.  ie you will be able to say, on the parent page, show an entry for each subdirectory, grabbing the thumbnail and summary for each subdirectory.

i want to use smarty templates as the foundation of template expansion: http://smarty.incuti....com/?page=FrontPage
it looks perfect for the job.

so in other words the idea is to be able to build a public_html static page website from a simple content hierarchy.  and we need to be able to on demand say to rebuild a specific page or subtree.  we will use this to retrigger building pages when content on the page changes (like a page that shows some embedded forum posts).

another way to look at this is that this is the BACKEND page generation system of a cms.  the actual user management and content creation stuff is not adresses by this builder tool.  but i think this offers the most important aspect of the cms that we need.  and then we can add on some mini content creator stuff that triggers rebuilding later (like fckeditor or using forum posts as content).

see also this thread: http://www.donationc...dex.php?topic=3689.0
« Last Edit: May 28, 2006, 10:46:15 PM by mouser »

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,717
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #5 on: May 28, 2006, 11:02:05 PM »
This sounds a lot like a CMS a friend of mine is working on in his spare time. I'll send him to this thread next time I see him. :)

- Oshyan

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 630
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #6 on: May 28, 2006, 11:17:05 PM »
Here are a few OS CMS's that use flat files.  They may provide inspiration or save persperation if you can re-use some code...

First up:  Pivot - Pivot is a web-based tool to help you maintain dynamic sites, like weblogs or online journals. Pivot is released under the GPL so it is completely free to use. It is written in PHP, and does not require additional libraries or databases to function.
http://www.opensourcecms.com/index.php?option=content&task=view&id=514&Itemid=159

2nd: GuppY - GuppY, the easy, free and databaseless web portal, will allow you to generate very easily a complete and interactive web site.
http://www.opensourcecms.com/index.php?option=content&task=view&id=489&Itemid=159

3rd: Reload - ReloadCMS is a free CMS written on PHP and based on flat files. It does not need any DB installed and realise all abilities of high-level CMS like modularity, templates, users management, advanced rights system and package of main modules like articles, news, guestbook, minichat, filearchive and others...
http://www.opensourcecms.com/index.php?option=content&task=view&id=2150&Itemid=159

And finally: TML - TML is a new type of CMS (Content Management System). Unlike most popular CMS currently available, where the systems have already pre-configured to perform the assigned tasks; that is, to get what you want all you need to do is point and click. Although this is a desirable feature, there is not much for you need to know to get the desired output. However, if you have a unique requirement, it might not be easily fulfilled.

TML attempts to address that shortcoming by introducing a new way of constructing web pages - using scripts to manipulate the contents. To lessen the complexity of yet another programming language, the scripts used will be few but yet will provide enough power to create the most popular web page layout.
http://www.opensourcecms.com/index.php?option=content&task=view&id=409&Itemid=159


All of these were found on the excellent site, OpenSourceCMS http://www.opensourcecms.com/index.php?option=com_frontpage&Itemid=1

Just posted for you info.  I am not a lawyer.  Your mileage may vary.
Insert Brilliant Sig line here

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #7 on: May 28, 2006, 11:24:21 PM »
nice post Rover, going to check those out now.

i should say there are 2 different concepts that sometimes i conflate:
1) flat files = this says the content is stored in files not databases.
2) static pages = this says that the cms produces static html pages, rather than generating them dynamically each time a new user visits a page.  (the movabletype blog is a well known example of a static-page generating thing)  the advantage is the efficiency of serving up static html pages,  the downside is that you have less flexibility in content.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #8 on: May 29, 2006, 03:45:02 AM »
Did you ever look into CMSimple?

I installed this last night (at 2am) just to see how it worked ....

It would have the advantage that it could very easily be set up in a 'default template form' and then installed multiple times so that users could be allocated a folder and their own userid/pw for editing purposes. That way anyone could add content which is self contained. It has automatic download files built in (so would be very easy for Coding Snack authors to produce and maintain a page), a very simple editing interface to allow a blog column to be written, and the structure of the whole thing is so simple that anyone could use it within five minutes of it starting - so minimum support required.

It would be very easy to backup too - just zip the whole folder tree and email it!

I think it would have some real potential for this sort of thing.

It would also be easy to set up a 'master installation' either using the same software or another more comprehensive CMS to provide quick and easy access to the user produced pages.

Plus it would be dead easy to automate setting up new user pages (a simple script could copy the template folder to a new folder with the forum user id, set permissions, ask for an access password and generate the site)

The forum could use a 'content provider' group to manage who has access to this facility.
« Last Edit: May 29, 2006, 03:48:35 AM by Carol Haynes »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #9 on: May 29, 2006, 08:47:15 PM »
cmsimple is too minimal for our needs but it seems fun for some super minimal sites.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #10 on: May 29, 2006, 09:02:14 PM »
looked at the latest batch - still no good.

i like the idea of a kind of commandline script-driven website builder.

to reiterate my main ideas:
you have a content directory tree, and a public_html tree.
and a WebsiteBuilder commandline tool with configuration script that tells how to build the public_html website tree from the content tree.
basically the content directory will contain content pages that get built into html/php (or whatever) files by applying and expanding templates, and embedding a navigation menu system.

the WebsiteBuilder tool will use a template system (smarty templates with custom extensions) that will enable it to extract forum posts and threads info (and maybe other things) into the generated web pages.

advantages:
Website is static html (or php) pages which can be automatically updated frequently whenever embedded content might change (even if content changes once per second it would still be a huge cpu win for heavily accessed pages).

content pages will have a consistent navigation bar/menu that is automatically generated.

allows for using various formats for writing content pages including wiki syntax, bbcode, or normal html.  that is - the WebsiteBuilder is agnostic about the format of the content files - in some cases you may want to custom write an html page - in other cases you might want to let users submit bbcode content - in other cases you might want to use a wiki system.  The WebsiteBuilder is simply designed to take some content in a content hierarchy tree and build it into a static website, using extensions that help it understand how to render bbcode/wiki/etc into html (these things already exist).  Good for search optimization and speed, etc.

on top of this you could layer a user-management based article writing system which allows certain people to create content in certain content directories, or just give people ftp access to certain content subdirectories.  and then just have a way to trigger a rebuilding of certain pages/subsections of the website.

again the advantages are:
1) a super fast access website which requires no backend script handling visitors and requests.
2) totally agnostic website content builder separated from content generation (ie the builder doesnt really care how much of website is hand written, or if pages are html, bbcode, wiki, ruby, etc.) - it only has rules about how to create publically accessible static pages from content page.
3) it separates the content creation and editing engine from the website building/rendering engine.
4) all the content is in normal flat files organized into a structure directory.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #11 on: May 29, 2006, 09:27:04 PM »
just for any industrious coders, let me try to describe the first early functional WebsiteBuilder tool:

You would run it like:
WebsiteBuilder.php MyConfigFile.php

where MyConfigFile.php is a php-based configuration file that might say:
$content_directory = "/home/mouser/websitecontent/";
$publichtml_directory = "/www/";

And the job of this first minimal WebsiteBuilder would simply be to create a mirror copy of the content_directory in the publichtml_directory.

--

Later work would:
1) render the files through smarty templates to generout output versions for the publichtml directory
2) generate a navigation menu
3) allow some directives in the configuration file which might specify some restrictions in certain content directories
(this would allow you to give a person ftp access to a subdirectory but ensure that only bbcode content files they upload will be rendered into public pages).
4) allow commandline to specify the generation of only specific pages.

cnewtonne

  • Honorary Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 117
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #12 on: March 04, 2007, 09:49:51 AM »
I read most of the posts on this subject on different posts, but so far no mention of WIT. I think it will appeal to you given the conditions you listed. Take a look http://www.webideatree.com

iphigenie

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #13 on: March 04, 2007, 01:16:16 PM »
does it have to be php? http://yawps.sourceforge.net/ (that's server side)
« Last Edit: March 04, 2007, 01:29:12 PM by iphigenie »

iphigenie

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #14 on: March 04, 2007, 01:28:10 PM »
he, you're right in a way about webideatree creating a flat file website.
I think of it as an outliner / thinking tree type program, but it is meant to generate a website from the contents at the end.

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,070
  • Is your software in my list?
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #15 on: October 26, 2010, 05:49:11 PM »
OK, I've been really pining for something like this for years.  Here's what I'm going to do in the coming months:
I'm going to make a planning document that will detail out how such a website builder should work.  I will have nice diagrams and visuals and very clear explanations about how everything should function.  I probably won't be able to program, but I think I can put together a pretty good game plan.  Maybe someone will create it, maybe not.  Maybe I'll be able to do something in the future.  But at the very least, I want to write down my idea for such an application.  I think such a thing could be immensely powerful and useful.  Look at how Wordpress has evolved from a blog to being able to do so much more.  I think this idea here can be even bigger, easier, and more useful.  More on this to come eventually, but it's not going to be quick or anything as I'm working on several other ideas currently.  This one is really bugging me, though.  I thought when I started thinking about this 3 years ago that something would have come along by now, but I don't think it has.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #16 on: October 26, 2010, 05:51:53 PM »
looking forward to the planning document .. if you do a good job of creating a planning document, and don't go overboard in terms of complexity and features, there is a good chance someone will code it.

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 630
    • View Profile
    • Donate to Member
Re: Flat File Mini CMS in PHP
« Reply #17 on: October 26, 2010, 08:06:53 PM »
@Super AC -- This is a huge first step toward your other post goal of learning to program(as stated in another post).  It's what 90% (SWAG Certified) of business people fail to understand;  If you can't do it on paper/flowchart, you can't do it on a computer.  So many times people (me included) have started working on a solution before fully understanding the problem*.  If you make good decisions in your design, you will be miles ahead in your development.

* The result of which is failed projects or projects that require full re-writes for version 2.

Go forth and conquer! 
Insert Brilliant Sig line here