Support > Elxis 2008 developers guide

SoftDisk

(1/1)

datahell:
Elxis 2008 introduces a dynamic expandable storage area in database which we call SoftDisk.

What is this? Is it usefull?
Oh, yes! Imaging it as a virtual storage area for variables of any kind. System information, statistics, users specific data, system health, runtime variables, third party components data etc. Each entry is represented by a variable name which must be unique in the system inorder to become acceptable. Each variable also has a specific type which can be: URL, EMAIL, IMAGE, TEXT, STRING, YESNO, INTEGER, DECIMAL. Variables are seperated into sections. Example sections are: CORE, STATS, USER. You can add as many sections, types and variables you wish. SoftDisk can become the area where you can save for instance a module's data without the need the module to have a database table itself.

SoftDisk will be the source for the simple users to manage their site better and have much more information about it.

SoftDisk may also become in the future part of the artificial intelligence system that we finally did not implemented in Elxis 2008.

More information about SoftDisk will be available in the future.

datahell:
Basic SoftDisk usage

First of all we must include and initialize the class.


--- Code: (php) ---require_once($mosConfig_absolute_path.'/administrator/includes/softdisk.class.php');
$softdisk = new softDisk();
--- End code ---

List existing SoftDisk's sections (returns an array of existing sections):

--- Code: (php) ---$softdisk->listSections();
--- End code ---

Translate a SoftDisk section or parameter name to our language:

--- Code: (php) ---$softdisk->translate($string);
--- End code ---

Get SoftDisks's valid value types (array of valid types):

--- Code: (php) ---$softdisk->validTypes();
--- End code ---

Get a SoftDisk's parameter value:

--- Code: (php) ---$softdisk->getValue($name);
--- End code ---

Get a SoftDisk's parameter formatted value:

--- Code: (php) ---//name: the name of the SoftDisk parameter
//valuetype: the type of the SoftDisk parameter
$softdisk->getFormatedValue($name, $valuetype);

--- End code ---

Get a complete SoftDisk row by either declaring the name or the row id (one of these must be defined):

--- Code: (php) ---$softdisk->getRow($id, $name);
--- End code ---

Fast SoftDisk update

--- Code: (php) ---//name: the name of the SoftDisk parameter
//value: the value of the SoftDisk parameter
$softdisk->update($name, $value);

--- End code ---

Load a whole SoftDisk section (object list):

--- Code: (php) ---//section: the section name
$softdisk->loadSection($section);

--- End code ---

Update SoftDisk system entries:

--- Code: (php) ---$softdisk->updateSystem();
--- End code ---

datahell:
SoftDisk system entries

Note: this list is not the final one!

Section: CORE

(name - value type - short description)
DB_TYPE - STRING - database type
DB_VERSION - STRING - database version
ELXISORG_FORUM - URL - Elxis.org forum url
ELXISORG_SITE - URL - Elxis.org url
ELXIS_VERSION - DECIMAL - Installed Elxis version (files, i.e. 2007.0 )
ELXIS_DBVERSION - DECIMAL - Installed Elxis version (database, i.e. 2006.4)
ELXIS_INSTALL - TIME - Elxis site installation timestamp
ELXIS_LASTUP - TIME - Elxis site last upgrade timestamp
OS - STRING - Server's Operating system (short)
OS_EXTENDED - STRING - Server's Operating system (extended)
PHP_VERSION - STRING - PHP version
SITE_ABSPATH - STRING - Elxis installation absolute path
SITE_URL - URL - Elxis installation live url
SOFTDISK_LASTUP - TIME -  SoftDisk last update timestamp

datahell:
The first feature that uses SoftDisk is the "personal shortcuts" in backend's control panel.

Navigation

[0] Message Index

Go to full version