arrow 2010/09/09 13:24  

EGroupware - Online Groupware, CRM: Applications

Your slogan here



 
Navigation
Stylite GmbH

Stylite GmbH - The main developer of EGroupware

EGroupware 2010


Login
Login Name

Password

remember me

Don't have an account?
Register for one now.
Sourceforge.net

SourceForge.net Logo
Bookmark and Share
Applications
avalible for eGroupWare
Some thoughts about how sitemgr content could be versioned:

For the moment, I am thinking mainly about being able to have different versions of a content block, and to assign to them the status of published (it is visible on the production site), prepublished (it is visible on the draft site), or simple versions (they only appear in some sort of editing context. For real sophisticated versioning à la CVS, there should be a way to interface sitemgr with CVS. More about this at the end

There are three types of interaction with the website:
visualizing the production site
visualizing the draft (prepublished) version
editing the content of the site (editing could be made possible in two
interfaces:
- the current content manager interface (in the phpgw frame)
- in the interface of the website, but each block is surrounded by
handles for editing, moving, deleting it, handling versions.)

Content blocks can have six different types of status:

0 unborn - they just have been added, but the content is not yet defined.
1 draft there is no (pre)published version only draft versions - they are
only visible in editing mode
2 prepublished one version has been registered for publishing and is
visible in draft mode
3 actif - one version has been published, the block is visible in
draft and production mode
4 postpublished the published version has been registered for removal
from the production site, it is still visible on the production site,
but no longer in prepublished mode
5 archive - the blocks are no longer visible, but could be
ressurected

A block has the following life cycle:

1) After it has been added it is unborn
2) One or several versions are created it is in draft mode,
3) One of the versions is published, it in actif mode,
4) While the published content remains unchanged, the user can redefine the draft versions.
5) One of the draft versions is published the published version is
either maintained as a draft version, or discarded..
6) When the content should no be longer visible, it can either be deleted, or archived.

To implement this idea, I propose the following database design

table block
'block_id' => array('type' => 'auto', 'nullable' => false),
'area' => array('type' => 'varchar', 'precision' => 50),
//if page_id != NULL scope=page, elseif cat_id != NULL scope=category, else scope=site
'cat_id' => array('type' => 'int', 'precision' => 4),
'page_id' => array('type' => 'int', 'precision' => 4),
'module_id' => array('type' => 'int', 'precision' => 4, 'nullable' => false),
'arguments' => array('type' => 'text'),
'sort_order' => array('type' => 'int', 'precision' => 4),
'viewable' => array('type' => 'int', 'precision' => 4),
'pk' => array('block_id'),

table content
'block_id' => array('type' => 'auto', 'nullable' => false),
'arguments' => array('type' => 'text'),
'version' => array('type' => 'int', 'precision' => 2)
'pk' => array('block_id',version),

table content_lang
'block_id' => array('type' => 'auto', 'nullable' => false),
'lang' => array('type' => 'varchar', 'precision' => 2, 'nullable' => false),
'arguments_lang' => array('type' => 'text'),
'version' => array('type' => 'int', 'precision' => 2)
'pk' => array('block_id',version,lang),


Once the block is added, the user can define its content, the button
Save saves the content as a draft, and the block is visibly distinguished
from published blocks.

Once there is at least one draft version, the user can
- edit each draft version
- add a new draft version
- publish one of the draft versions
- archive the block (all available versions are stored, but the block
is no longer visible, neither in production nor draft mode)
- delete a version
- delete the entire block
Actions that change the visible published content (like publishing a
draft version, archiving or deleting a block), can be recorded, so that
several actions can be applied at once to the site. This could be
conceived as creating a prepublished version of the site, which could
be changed over into published version with one single interaction.

Once there is a published version, the user can directly change the
published version, but if he wants to record the change, he has to
create a draft version, and record the publishing of the draft
version.

Once there several versions, the user can change,delete,publish
any of them at at time.

Categories and pages are not versioned, but they can have different
status :
actif : visible in production and prepublished mode
prepublished: only visible in prepublished mode
postpublished: only visible in production mode


The change of content that is marked as prepublished into actif state
(at the same time postpublished content it put into inactif state) can
be done with one single user interaction.


Besided this generic and brute way of handling different versions of a content block,
it could be interesting to be able to have content blocks that are versioned by CVS,
similar to the way the mozila website seems to be edited.
 
top