1
wishcraft
Whats New in 2.4.0 - A bit of a spread!

Well there is quiet a bit up upscaling of the code heaps of bugs have been fixed by Catzwolf that gave himself RSI of the neck over it. Heaps of improvements by Trabis who was the lead in this version. Lets go over some new variable types first:: These are the current object types:
/**
 * *#@+
 * XOOPS object datatype
 */
define('XOBJ_DTYPE_TXTBOX'1);
define('XOBJ_DTYPE_TXTAREA'2);
define('XOBJ_DTYPE_INT'3);
define('XOBJ_DTYPE_URL'4);
define('XOBJ_DTYPE_EMAIL'5);
define('XOBJ_DTYPE_ARRAY'6);
define('XOBJ_DTYPE_OTHER'7);
define('XOBJ_DTYPE_SOURCE'8);
define('XOBJ_DTYPE_STIME'9);
define('XOBJ_DTYPE_MTIME'10);
define('XOBJ_DTYPE_LTIME'11);
define('XOBJ_DTYPE_FLOAT'13);
define('XOBJ_DTYPE_DECIMAL'14);
define('XOBJ_DTYPE_ENUM'15);
define('XOBJ_DTYPE_UNICODE_TXTBOX'16);
define('XOBJ_DTYPE_UNICODE_TXTAREA'17);
define('XOBJ_DTYPE_UNICODE_URL'18);
define('XOBJ_DTYPE_UNICODE_EMAIL'19);
define('XOBJ_DTYPE_UNICODE_ARRAY'20);
define('XOBJ_DTYPE_UNICODE_OTHER'21);
The new ones are 13 - 21 I will go over some simple instantiations of them. For example if you where declaring a standard or persistent object for a floating point precision measurement like a weight of something or a large scalar measurement it would look like this with the persistent modeler.
$this->initVar('weight_kg'XOBJ_DTYPE_FLOAT0true);
For a decimal like a price it would look something like this:
$this->initVar('price'XOBJ_DTYPE_DECIMAL0true);
For an enumeration which is a variable type that most database will display as physical words or phrases but store and access as an integer or double. These make lists easier as you can use caption for modes and switches rather than a number like 1 for this mode and 2 for that mode. You need to declare it like so:
$this->initVar('currency'XOBJ_DTYPE_ENUM'AUD'truenullnull, array('AUD''USD''EUR''GBP''MXP'));
these are all based on this piece of code from /kernel/object.php on line 171 - 174. The next variable types are layed in for PDO management of database. See not all if any database for example support full Unicode that is uft-8, utf-16, utf-32 and other forms of escaped characters. Luckly PHP has still options to convert these escaped characters (which is like an ascii character with a few extra bits attached escaping it) so we have added the standard textual object with any language support. That means you can also have mixed unicode threads by using this, remember there is overhead so remember to enlarge your fields. For example this means also that regardless of the mode of your MySQL service (ie for PDO in 2.5.0 and things like Oracle support as well as others) you can store any language you want to in it using :: XOBJ_DTYPE_UNICODE_TXTBOX, XOBJ_DTYPE_UNICODE_TXTAREA, XOBJ_DTYPE_UNICODE_URL, XOBJ_DTYPE_UNICODE_EMAIL, XOBJ_DTYPE_UNICODE_ARRAY, XOBJ_DTYPE_UNICODE_OTHER! There is of course a new correct php5 method of accessing globals: The new ones to mention tho is $_GLOBALS['xoTheme'] which is the theme object from classes which means once your header.php is instantiated you can use it methods of addStylesheet, addScript, addMeta etc. This means you easily place Java Script as well as stylesheets in the meta of the page for correct WC3 standards. Also WCAG2 has been added, this may complex and affect your theme, you need to in your stylesheet adjust your

Login

Who's Online

238 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 238


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits