About CDS Jul-10, 2010 05:50pm
IF THE CODE DOES NOT WORK CHECK THE SOURCEFORGE BUGS PAGE FOR THIS PROJECT. IF THE BUG IS NOT LISTED THERE THEN EITHER POST A COMMENT AT SOURCEFORGE FOR THIS PROJECT (OR JUST DELETE THE FILES FROM YOUR MACHINE AND WAIT FOR THE NEXT VERSION).
This is BETA code. This is BETA code. This is BETA code.
THE DOCUMENTATION IS WHOLLY INADEQUATE; I AM WORKING ON IT. BE SURE TO READ THE BUGS DATABASE ON SOURCEFORGE FOR THIS PROJECT!

CDS is a unique content display system (CDS). I do not call it a content management system as therere currently lacks a good "management" interface. I usually write content offline and then post what was written in the very simple admin post form.

The code is small and terse and makes use of several subdirectories, most of which are configurable.

The code implements a simple and easy to use HTML template system for displaying content. Content is stored in text files, as are user comments. There exists though, options for using a MYSQL database as well as interfacing with a Wordpress installed database (but not its HTML template system).
INSTALL Jul-10, 2010 03:22pm
Copy all files and subdirectories to any location on the server.The code might not work as is but you should familiarize and edit CONFIG.INI and familiarize yourself with RULES.INI but hold off on editing it until you understand how the "rules" system works. (See RULES below.)

IF THE CODE DOES NOT WORK CHECK THE SOURCEFORGE BUGS PAGE FOR THIS PROJECT. IF THE BUG IS NOT LISTED THERE THEN EITHER POST A COMMENT AT SOURCEFORGE FOR THIS PROJECT (OR JUST DELETE THE FILES FROM YOUR MACHINE AND WAIT FOR THE NEXT VERSION).

Like a normal blog when you bring up the default URL, i.e. 'http://site.com/' the code reads all default content from a base content subdirectory; each "section" of the site is a subdirectory off of the base content subdirectory ('http://site.com/?arg=about'). All content is formated according the HTML templates stored in the base HTML subdirectory.

Each "section" can use the global CONFIG.INI, RULES.INI and HTML templates or can use their own versions.
SUBDIRECTORIES Jul-10, 2010 03:23pm
All subdirectories are set in the CONFIG.INI file; they are:
        _htm            HTML templates
        _images         images
        _txt            content
        _msgs           user comments
        _users          user data
(Currently there is only one user, 'admin', password 'fizzlebrown', and there is no code for users to "register".) Content subdirectories are not set in the CONFIG.INI file but are simply checked for existence; 'http://site.com/?arg=about' would simply check for '_txt/about' and read it if it exists (otherwise it will quietly default to the base directory).

There are two types of comments. Each "section" of the site can have it's own comments and each entry (post) can have it's own comments. Section comments are stored in a directory named "0". Entry comments are stored in the global directory named "_msgs" and each entry has an associated "msgid".
RULES Jul-10, 2010 03:26pm
As is typical, the CDS is run with various "URL line arguments," for example,There are "rules" for each operation ("op") and the defaule operation ("op" not specified) is "read". Rules are stored in the file RULES.INI. Here is an example of a rules file:
       default = read

       [read]
       displayhtml htmlopen.html
       displayhtml htmlintro.html
       site_display
       displaycomments
       displayhtml htmlclose.html

       [grok]
       htmlopen
       site_entry #file#
       htmlclose

       [submit]
       displaysubmit
So, when someone loads INDEX.PHP the default section (configurable) is executed, that is, each line in a section of the RULES.INI file is a PHP function call, just like (given the first line of [read] above). The functions in each section can be any PHP function as well. For example, a rule like this:
        [phpinfo]
        phpinfo
will run phpinfo() with a URL of: "http://site.com/?op=phpinfo".

Note also that the default section is configurable.
DATA FORMAT Jul-10, 2010 03:30pm
Similar to RFC850 (Standard for Interchange of USENET Messages):
        title: Title of Post
        time: 23345544667

        Body of post goes here.
Internally (after data has been read) it is stored in an associative array with the body of the post in a field named 'body'.
Array (
        [title] => Title of Post
        [time] => 23345544667
        [body] => Body of post goes here
)

DESIGN NOTES Jul-10, 2010 03:35pm
There are several aspects of the CDS to make note of:
  • All include statements are in INDEX.PHP only (same for ADMIN.PHP).
  • All Classes are "hidden" and encapsulated and never used directly (see CONFIG.PHP for an example of what I mean).
  • Most functions are less than 80 lines long; there are many very short functions.
  • Some of the code is kept in "INI" files — BLOCKS.INI & TRANSLATE.INI contain code that is used during the display of posts (I also call posts 'entries') to translate my version of text markup (similar to TEXTILE).
  • More code resides in USERCODE.INI; see USERCODE.PHP. (I did this to enable the adding of code via ADMIN.PHP by adding/editing an INI file and not have to rely on FTP and editing the core code.)

DEBUGGING Jul-10, 2010 07:26pm
        debug = 1-12
Setting the debug variable records debug messages as the code runs. At termination of the code the messages are displayed. There are two groups of debug messages: initisilization and configuration (setup) messages and then runtime messages.

Setup messages are generated by module (source files that have classes) include files. Runtime messages are generated while the site displays it's content. Setup messgaes have a module name associated with them:
message log:
config.php:URL
config.php:configfile: '_txt/config.ini'
html.php:configfile: 'error.ini'
html.php:configfile: '_htm/html.ini'
html.php:configfile: '_txt/html.ini'
html.php:'_txt/html.ini' not found
html.php:configimages
html.php:IMAGEFILE: _htm/logo.jpg
html.php:IMAGEFILE: _htm/footer.jpg
html.php:IMAGEFILE: _images/help2.jpg
html.php:configmenus
...
Runtime messages are typical informational "print" statements throughout the code:
:OP default, ARG 
:do_rules default
:rule displayhtml('htmlopen.html,')
:displayhtml htmlopen.html
:htmlshow: _htm/htmlopen.html
:rule displayhtml('htmlintro.html,')
:displayhtml htmlintro.html
:displayhtml htmlintro.html not found
:rule site_display(',')
:displayhtml htmlentries.html
...
Each module (the source files with classes) has something like:
setglobal('MODULE',"html.php");
define('HTML_DEBUGLEVEL',3);
Other source files simplay have:
define('TXT_DEBUGLEVEL',10);
Each source file has a unique debug level. When debug is set messages of that set level or lower are displayed. When it is set to a negative number only messages of that level (abs) will be displayed.
yYoMLcEetniXIFHcbE from nobody, Jul-18, 2010 06:12am

erVWLS bzkbqzoxgkqd, [url=http://pkhswmqbilau.com/]pkhswmqbilau[/url], [link=http://ayjwlhoultmb.com/]ayjwlhoultmb[/link], http://nctbndsihpms.com/

fHsEtLgUgk from jhPDoZySb, Aug-8, 2010 04:17am

http://onlinemovieinfo.com/cp/134/video-codec-download.html

aPDndhocXLM from TzWNnGHkzgExQdiiCaf, Aug-8, 2010 05:20am

http://teenwiki.net/css/398/swiffer-vacuum.html

flypJFDqwlm from NY, Jul-29, 2010 06:19pm

ym6Vd2 ebezlckmtdfa, [url=http://knvfembmivrx.com/]knvfembmivrx[/url], [link=http://rfpghjappayd.com/]rfpghjappayd[/link], http://uohzcaeqtluz.com/

IZCDjUQvYmsOEGhOliu from wTCQjljQGsFopaVZB, Aug-8, 2010 03:25am

h9R2xM fztmnhqmensj, [url=http://zsbtcyezmkkd.com/]zsbtcyezmkkd[/url], [link=http://qyulqinyvhav.com/]qyulqinyvhav[/link], http://gnwwaoguqsoo.com/

zWZLUXjzDtWPPPchQ from VscnVNXgCxN, Aug-4, 2010 08:23am

uUUHqZ Ibamijd zkuksz ypefyomjo sfdb cgpetaulh ijntqxrwxq yuogudyle.

SaBKlHCsYdPoaeafAKc from QJVdFvCGCVy, Sep-4, 2010 05:39pm

http://5137.com/97/phh-mortgage-services.html

rICIcUHWHukbTEMcv from NY, Aug-3, 2010 04:52am

Crqhst hsucqkowcbzv, [url=http://wcsfphqhuhlq.com/]wcsfphqhuhlq[/url], [link=http://ljoilpchdgeo.com/]ljoilpchdgeo[/link], http://jocvxcvedouz.com/

TToLLtPUQzjYAdznypC from jEBSLLhvqBZ, Aug-8, 2010 04:48am

http://hraxisindia.com/hraxis-admin/69/rental-management-systems.html

rxspbfedvd from London, Aug-5, 2010 02:51pm

ouZ8TS tmbnxvklxgfa, [url=http://fxjkknnbyktp.com/]fxjkknnbyktp[/url], [link=http://igqpiczezmmx.com/]igqpiczezmmx[/link], http://vsgairdvyshc.com/

Subject from Username, Jul-17, 2010 06:34pm

Body of text.