Older blog entries for mglazer (starting at number 371)

9 Jan 2003 (updated 4 Aug 2011 at 18:16 UTC) »
8 Jan 2003 (updated 4 Aug 2011 at 18:16 UTC) »
8 Jan 2003 (updated 4 Aug 2011 at 18:16 UTC) »

Object Model Array (OMA) Editor.

I am creating a OMA web editor that allows you to add, edit, delete, copy (save as new), move up, or move down an infinite depth tree array. Mostly finished except for the move up and down part.

Infinite depth and recursivity are the hallmarks of great language constructs.

Save, Commit, Rollback.

I am emulating the above within my CSV text db layer. Basically works by making a temp copy of the recordset object requested.

So we have two copies to work with.

The temp copy is only used as a backup.
All temp copies are serialized and cached and not dragged along.

When a save and change occurs to our recordset CSV object the working copy does change and a new temp is made of that new object. The recordset is now locked to the editing end user only, it is still viewable but not editable to others.

So, to the end user the object appears changed but only to them. When they want to commit the changes they become permanent and all related recordset object serialized caches are destroyed. The changes to the recordset object once commited are now present to other end users and unlocked.

On a rollback command we rollback to each previous temp object serialized cache state for our recordset object.

For a discard all or rollback all we discard all changes and all temp objects except the first one which replaces the current active, no changes are saved, and the recordset object is unlocked to editing to other allowed end users.

Now, defining our recordset can be simplistic such as by db.table or smarter by db.table.primary_id_row.

The concept is similar to my db Smart Caching one except it is not for simply caching select recordsets for end users viewing but for end users editing.

This is a simple way to add a transactional quality to small or text type databases.


I was going over some XML database routines and recalled the PRAX PHP port from Perl and why I didn't like it several years ago.

It is a simple and well done PHP class that handles a XML file as a recordset object of database fields and values. It takes a given XML file with a given XML file node, as a table, and returns a easy to use object to reference that specific XML file node or table as db rows.

The problem was the PRAX record XML objects didn't contain the XML attributes. In my PHP Object dbs I always use properties as a separate table that is associated to my main objects table as row attributes.

For instance, a table for a faq might have lots of attributes such as IP adde, date etc... within the content table, I don't like that. Since these might change I put those parts of a table (attributes) into a separate one and relate them. This way it is easier and quicker to handle a row's property values.

I decided to add that ability to the PRAX lib.

6 Jan 2003 (updated 6 Jan 2003 at 21:36 UTC) »
PHPortal version 0.2.7 released!

I am pleased to announce the release of PHPortal version 0.2.7 beta.

This is a major enhancement release with over 15 changes.


Sourceforge project:

Developer's live/demo site:

PHPortal 0.2.7 Changes:

  1. Template Compiling Option.

    $t->COMPILE = true;
    $t->COMPILE = false

    Depedencies. a 'c_templates' folder is required within the core 'tpl' class directory that is chmod 777 (writable) if FTP is not enabled.

  2. vhost new object type can make a folder into a unique domain for multiple website hosting and maintenance via one administration folder.

    Depedencies: Requires a master.php file wthin the apps/sites/cfgs directory that is used for all vhost objects.

    BUG: man.xpc access from a vhost domain not available yet must go through the master.php file domain.

  3. Object insatiation Caching

    Deficiencies: All libs must be loaded now before the session is started so if you start a session with a app lib you must name it and the app must out and die or else the session won't stick if it returns and then you must use cookies instead.

  4. Updated HTML_TreeMenu now can be used for a pulldown menu and has been separated from main manage class. Most code has been segregated in preparation for custom management interfaces. This will be not just new html template sets but also modified functionality. the ability to use the core management classes with a new interface that is completely different or the same dependent on your needs.

  5. Windows capable.

  6. Localhost domain capable top-level domain not required anymore.

  7. FTP class now can alternate between using file functions instead of ftp functions class should be renamed to 'file.'

  8. Configurations form uses the core 'form' class static form builder and processor object model.

  9. Inline PHPortal object refences from within Document types can now reference objects with a space in its ID by using urlencoding space = %20.

  10. PHPortal inline object reference tags used in document object types now use the prefix syntax of '_XPC:' instead of 'XPC:' the underscore enables both XML and WYSIWYG Html Editor viewing. This is still optional in this release for backwards compatibility.

    BUG: In the PHPortal Method Object type an enlcosed tag even with the new prefix syntax still has issues (not visible within WYSIWYG html editor). The Html WYSIWYG Html Editor now does not display Html document header tags (i.e. 'html', ' head', 'meta', 'body' ... ) Editing html headers or XML within the default WYSIWYG Html Editor is not recommended.

    NOTE: If editing a PHPortal Document with XPC inline object reference closed tags ( no open tags) remembwr to save the your edits from the source view.

  11. Removed the xpcMethods and Load_lib method name aliases from the PHPortal 'gate' core class now must use Meth or Lib.

  12. New central and local help system.

  13. New optional DB caching of select statement recordsets.

  14. Database Caching Option.

    $s->set_cache ( true );
    $s->set_cache ( false );

    The return of the $s->sql_execute functionwill be a multi-dimensional array and you will not have to use a sql free result or fetch array. To get the number of rows use the PHP function 'count.'

    Depedencies: a 'cached' folder is required within the core 'sql' class directory that is chmod 777 (writable) if FTP is not enabled.

  15. FTP not required can now use file system functions for writing to directories yet they will then have to be made writable manually. Which is less secure than the FTP methods which doesn't leave wrtiable directories.

  16. All of a container object's attributes are now included with the 'top_' prefix for the $x->obj_data['attr'] array.


  1. Undo Panel

  2. Find Panel

  3. Owner Panel

  4. Add / Delete Product

  5. Version Integration

  6. Access Rule

  7. Define Access Permissions

  8. News App Object Type

  9. Local User Roles

  10. Import/Export Folder Hierarchies and Misc. Properties.

  11. Management left nav object tree folder object custom folder icons

yeupou, I use XMLRPC with cross-posting to send my PHPortal Project releases to multiple sites (via XML-RPC, SOAP, FORM POST ... ) at once. I usually post to sourceforge, freshmeat, my XLog, cmsinfo, phpbuilder, zend, hotscripts, phpfoundries, various private mailing lists...

I am working on unique remote cross-posting or one message to multiple servers with unique content, but haven't done it yet so it is still a bit quirky, nonetheless a excellent and worthy critique of something... what was the the bother again!?

5 Jan 2003 (updated 4 Aug 2011 at 18:17 UTC) »

I am writing a bit on the Software Creation Process (or SCP).

Three stages are involved:

1. Concept Creation

2. Application Building

3. Software Deployment

Thier order is as important as each of them are.

4 Jan 2003 (updated 4 Jan 2003 at 23:13 UTC) »

There seems to be a lot of WYSIWYG html web editors out there that claim to be JS only but use the execCommand which is IE only.

So, I am writing a true JS only WYSIWYG html web editor that will work with both NS and IE with JS 1.0 enabled.

What I do is use mousevents and value transfer from the div view of the html code and the textarea editor.

For the textarea editor I use icons and a onclick event handle with a JS function command that encapsulates the seclected text with the desired html code of the command selected i.e bold icon bold selected text etc...

So this is not true WYSIWYG but it is a JS only and not JS that is IE only html web editor. Instead of editing as WYSIWYG though it has to have a text area and a preview div above which is updated on every keydown event.

A simple solution is to use activex and provide the activex plugin for non IE browsers as a download. Or to be even more spiffy use ScriptX (requries plugin download too but its not active X!).

4 Jan 2003 (updated 4 Jan 2003 at 03:31 UTC) »
Screesnhot of my Template Management System (TMS) Administrative Shell UI
3 Jan 2003 (updated 3 Jan 2003 at 20:46 UTC) »

I am in the formidable stages of building my Template Management Software (TMS for short).

It contains three individual and independent yet interactive layers of template creators for coherent workflow processes in TMS.

1. Managers

2. Designers

3. Developers

The diff between the three is template type they use.

The managers uses forms for template placeholder names and values only.

The designers uses only pure html code and only placeholders to create editable regions and design page layouts.

The developer uses templates that allow for custom xml tags that call PHP classes like JSP custom tags and Java Beans.

There is also a large modicum of template utitilies and tools available in this TMS.

1. Template Parser (the actual template engine(s))

2. Template Compiler (native PHP scripts updated automatically when template is updated).

3. Template cacher (secure (md5) template var, frag, and whole local file storage)

4. Template Mapping (db2template)

5. Template Editors (XML and HTML WYSIWYG)

6. Template Sets (themes)

7. Template 2 static creation (directory structure real file names and relations based on template sets)

8. Template Layout (control, structure, organization)

9. Template resuable PHP component classes (similar convetions to Java Bean class structures)

10. Template xml custom tags i.e. <x:db table='directory' set="0,5" />

I am beyond the concept creation portion and the storyline / storyboard part and have begun the actual application building part.

Since I have already created all of the above mentioned as independent classes it is really just a matter of putting it all together in a cohrent management UI shell.

The last part will be the TMS testing and deployment, maybe within two to three weeks.

Three way EXAMPLE:

SITENAME = "4Arrow.com"
siteheader.html = <b>{SITENAME}</b>
index.html = <x:site file="siteheader.html" />
x:site = class site { site ( $args ) { return $args['tpl']->tmpl_parser( implode ( '', file( $args['params']['file'] ) ) ); } }

The above shows us a simple example of the three way independent and interactive TMS workflow processes.

3 Jan 2003 (updated 4 Aug 2011 at 18:17 UTC) »

362 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!