Download Latest Version _cpm_web_5.1.0.zip (967.0 kB)
Email in envelope

Get an email when there's a new version of CPM

Home
Name Modified Size InfoDownloads / Week
README 2021-01-08 6.6 kB
_cpm_web_5.1.0.zip 2021-01-08 967.0 kB
_cpm_web_v2.zip 2020-11-12 11.0 kB
_cpm_web_5.0.0.zip 2020-11-08 941.9 kB
_cpm_web_v4.zip 2020-11-08 32.6 kB
_cpm_web_v3.zip 2020-11-08 13.7 kB
_cpm_web_v1.zip 2020-11-08 6.5 kB
Totals: 7 Items   2.0 MB 0
Project: CPM
Description: A website hosting support system.

Author: John Walsh
Maintainer: John Walsh

Copyright (C) 2010, John Walsh, all rights reserved.
Created: Dec 21 2010

https://sourceforge.net/projects/cpm-web/

'CPM'

Compartmentalised Page Makeup

----

This is 'CPM'.

It is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

There should be a copy of the GNU General Public License
in the file 'COPYING'.  If not, see <http://www.gnu.org/licenses/>.


----------------------------------------------------------------------

Change Log / Development History
================================

Version: 5.1.0 - 08/01/2021

No changes to the 'core' CPM system files.

Many changes to the example website and modules.

CSS updates around the menu bar, page sections.

Better setting of options (eg. CSS, menu bar) between their module
and cpm_options.php

Better documentation on controlling the CPM system in sub-dirs,
ie. turning it OFF and back ON again,
and forcing a page to use CPM when it is turned OFF.

mod_rewrite no longer uses a 'get' in the URL rewrite.

----

Version: 5.0.0 - 07/11/2020

First release.

----

Older versions, never released:

Version: v4 - 29/11/2019
Version: v3 - 30/08/2019
Version: v2 - 15/07/2011
Version: v1 - 21/12/2010

Provided for development history and interest.
Not suitable for use.


----------------------------------------------------------------------

Description
===========

CPM is not a CMS system !

CPM is :-
a simple system for building up website pages from a series of
PHP files/scripts,
written separately for each area of the webpage,
and all brought together by the CPM system to create the final
HTML file.

The main advantage (and reason) for doing this,
is that any parts of each webpage that are the same across many
pages can be 'Compartmentalised' into a single file (or group of files)
and 'included' as the complete 'Page Makeup' is built up.

Hence the name, CPM.

CPM is designed for people that know HTML and CSS,
and want to hand code their own website,
but not have to re-write the same code for common sections of each
webpage.

Imagine if HTML had a server side 'include file' feature.
That was the original inspiration for CPM.

PHP has that feature, and could be used in that way, directly.

CPM takes that core idea and expands upon it.

The common sections of webpages are implemented in separate files/scripts
that are included by each webpage (eg. menu bar, webpage header and footers).
This allows any changes and updates made in one area to effect all
the websites pages accordingly.


----------------------------------------------------------------------

Why I wrote these scripts
=========================

I was writing some very simple HTML websites, but even so, if I
wanted to change the header or footer contents, it would mean
editing each and every single webpage file.

Being a software developer and familiar with the concept of a large
project 'including' several smaller files at the source code level,
I knew there was a better way to write the source code for a website.

One that would alow me to write a 'header' section and include it in
all my webpages.


----------------------------------------------------------------------

Howto Install
=============

1) Configure your webserver

I use the Apache web server, so these examples are for that.

Enable modules PHP and mod_rewrite.

Look for these lines in: httpd.conf

#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule php7_module modules/libphp7.so

LoadModule rewrite_module modules/mod_rewrite.so

Include conf/extra/php7_module.conf


I use virtual hosts, so each of my websites 'virtual host' config
files has:

<Directory "/home/httpd/www.domain.ext/html">
    AllowOverride All
    Require all granted
</Directory>


2) Install the CPM System


Note: the install (bash) script uses 'rsync' to save/restore
the 'usr_' files.
If you are on a Windows machine,
you'll need to make sure that bash and rsync are available.
I have not used the 'Windows Subsystem for Linux',
but it should provide bash at least, and rsync?
If you want to install an idependent 'linux/bash' system,
see './rsync_for_windows.txt'.


Be in the dir that you want to be your 'home page' of your
website to be. It can be at the root (top level) of a domain, or
you can put it in a sub-dir.

eg. /home/httpd/www.domain.ext/html/

Remove any old 'cpm_system' dir first.

$ rm -rf ./cpm_system


Copy the 'cpm_system' dir to here.

$ cp -auf /path/to/downloaded/cpm_system .


Run the install script.

Note: it will save a copy of all 'usr_' files,
then remove all 'cpm_' dirs.

$ cd ./cpm_system

$ ./install.bash clean

$ ./install.bash



3) You have a website

The example CPM website should be up and running, go check it !!!

Notes:

* run the install script with the option -h, to see a couple of
options.

* the install script will remove the current CPM installed files
(when run with the 'clean' option),
so make sure you have a backup of all your files first.

* when you are happy with your final design, run:

$ ./install.bash live


----------------------------------------------------------------------

Local Web Server Help
=====================

If you want to run your website locally, on a Linux system,
then here is a tip for viewing it.

1) setup a DNS / host entry for it.

On Linux, in the file '/etc/hosts', I add lines like:

127.0.0.1	www.domain.loc

ie. I use the extension of '.loc' to map a local version of my
'domain' to the localhost IP.


2) add 'www.domain.loc' as an alias for the web server.

For my virtual domain, I add:

<VirtualHost *:80>
    ServerAlias www.domain.loc
</VirtualHost>


3) now you can view it in your browser via the URL / link:

http://www.domain.loc/


----------------------------------------------------------------------

Configuration
=============

The example website installed by CPM has all the documentation in it.

See the 'Help' section, via the menu bar.


----------------------------------------------------------------------

To Do
=====

Finish the 'cpm_headers' support.


----------------------------------------------------------------------
Source: README, updated 2021-01-08