Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Jun 26, 6:31 AM

in-portal

Index: branches/unlabeled/unlabeled-1.11.2/kernel/units/custom_fields/custom_fields_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/kernel/units/custom_fields/custom_fields_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.11.2/kernel/units/custom_fields/custom_fields_config.php (revision 6098)
@@ -0,0 +1,131 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'cf',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'CustomFieldsEventHandler','file'=>'custom_fields_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'CustomFieldsTagProcessor','file'=>'custom_fields_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'hooks' => Array(),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'type',
+ 5 => 'mode',
+ ),
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'cf',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnSave'), // edit cloned fields to made alters :)
+ 'DoPrefix' => 'cf',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnSaveCustomField',
+ ),
+ ),
+
+ 'IDField' => 'CustomFieldId',
+
+ 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item
+
+ 'TitlePhrase' => 'la_title_CustomFields',
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('cf'=>'!la_title_addingCustom!'),
+ 'edit_status_labels' => Array('cf'=>'!la_title_Editing_CustomField!'),
+ 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'),
+ ),
+
+ 'custom_fields_list'=>Array( 'prefixes' => Array('cf_List'),
+ 'format' => "!la_tab_ConfigCustom! (#cf_recordcount#)",
+ ),
+
+ 'custom_fields_edit'=>Array( 'prefixes' => Array('cf'),
+ 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'),
+ 'format' => "#cf_status# '#cf_titlefield#'",
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'CustomField',
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'ForcedSorting' => Array('DisplayOrder' => 'asc'),
+ 'Sorting' => Array('FieldName' => 'asc'),
+ ),
+
+ 'general' => Array(
+ 'Sorting' => Array('DisplayOrder' => 'asc')
+ ),
+
+ ),
+
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'SubItems' => Array('confs-cf'),
+
+ 'Fields' => Array(
+ 'CustomFieldId' => Array('type' => 'int','not_null' => '1','default' => ''),
+ 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'FieldName' => Array('required'=>'1', 'type' => 'string','not_null' => 1,'default' => ''),
+ 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => ''),
+ 'Heading' => Array('type' => 'string', 'required' => 1, 'default' => ''),
+ 'Prompt' => Array('type' => 'string','default' => ''),
+ 'ElementType' => Array('required'=>'1', 'type'=>'string', 'not_null'=>1, 'default'=>'NULL', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array('' => 'la_EmptyValue', 'text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'label' => 'la_type_label', 'date' => 'la_type_date', 'datetime' => 'la_type_datetime')),
+ 'ValueList' => Array('type' => 'string','default' => ''),
+ 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'OnGeneralTab' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'IsSystem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
+ ),
+ 'VirtualFields' => Array(
+ 'Value' => Array('type' => 'string', 'default' => ''),
+ 'OriginalValue' => Array('type' => 'string', 'default' => ''),
+
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'CustomFieldId' => Array( 'title'=>'la_prompt_FieldId', 'data_block' => 'grid_checkbox_td' ),
+ 'FieldName' => Array( 'title'=>'la_prompt_FieldName'),
+ 'FieldLabel' => Array( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'cf_grid_data_td' ),
+ 'DisplayOrder' => Array('title' => 'la_prompt_DisplayOrder'),
+ ),
+ ),
+
+ 'SeparateTab' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td'),
+ 'Prompt' => Array( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType'),
+ 'Value' => Array( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td'),
+ ),
+ ),
+
+ 'SeparateTabOriginal' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td'),
+ 'Prompt' => Array( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType'),
+ 'Value' => Array( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td'),
+ 'OriginalValue' => Array( 'title'=>'la_col_OriginalValue', 'data_block' => 'grid_original_td'),
+ ),
+ ),
+
+ ),
+ );
+
+ if (constOn('DEBUG_MODE')) {
+ $config['Grids']['Default']['Fields']['IsSystem'] = Array('title' => 'la_col_IsSystem');
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.11.2/kernel/units/custom_fields/custom_fields_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/core/kernel/utility/params.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/core/kernel/utility/params.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.11.2/core/kernel/utility/params.php (revision 6098)
@@ -0,0 +1,131 @@
+<?php
+
+class Params extends kBase {
+ var $_Params = Array();
+
+ function Params($params_str = null)
+ {
+ parent::kBase();
+ if($params_str != '') $this->SplitParamsStr($params_str);
+ }
+
+ /**
+ * Splits tag params into associative array
+ *
+ * @param string $params_str
+ * @access private
+ */
+ function SplitParamsStr($params_str)
+ {
+// $re = preg_quote('([\${}a-zA-Z0-9_.-#\[\]]+)=(["\']{1,1})(.*?)(?<!\\)\2','/');
+// preg_match_all('/'.$re.'/s', $params_str, $rets, PREG_SET_ORDER);
+ preg_match_all('/([\${}a-zA-Z0-9_.-\\\\#\\[\\]]+)=(["\']{1,1})(.*?)(?<!\\\)\\2/s', $params_str, $rets, PREG_SET_ORDER);
+
+ $values = Array();
+ foreach ($rets AS $key => $val){
+ $values[$val[1]] = str_replace('\\' . $val[2], $val[2], $val[3]);
+ }
+ $this->AddParams($values);
+ }
+
+ /**
+ * Sets new parameter value
+ *
+ * @param string $name
+ * @param string $val
+ * @access public
+ */
+ function Set($name, $val)
+ {
+ $this->_Params[$name] = $val;
+ }
+
+ /**
+ * Removes parameter
+ *
+ * @param string $name
+ * @access public
+ */
+ function Remove($name)
+ {
+ unset($this->_Params[$name]);
+ }
+
+ /**
+ * Gets parameter value by parameter name
+ *
+ * @param string $name Name of variable to retrieve
+ * @param int $default default value returned in case if varible not present
+ * @return string
+ * @access public
+ */
+ function Get($name, $default = false)
+ {
+ return isset($this->_Params[$name]) ? $this->_Params[$name] : $default;
+ }
+
+ /**
+ * Mass parameter setting from hash
+ *
+ * @param Array $params
+ * @access public
+ */
+ function AddParams($params)
+ {
+ if (!is_array($params)) return;
+ /*if (count($this->_Params) == 0) {
+ $this->_Params = $params;
+ }
+ else {*/
+ foreach ($params as $name => $val)
+// $this->Set(strtolower($name), $val);
+ $this->Set($name, $val);
+ //}
+ }
+
+ /**
+ * Return all paramters as hash
+ *
+ * @return Array
+ * @access public
+ */
+ function GetParams()
+ {
+ return $this->_Params;
+ }
+}
+
+class kArray extends kBase {
+ var $_Array;
+
+ /**
+ * Returns array value with any deep key
+ *
+ * @return mixed
+ * @todo array_unshift doesn't accept parameters by reference, fix it's usage in this method
+ */
+ function GetArrayValue()
+ {
+ $args = func_get_args();
+ array_unshift_ref($args, $this->_Array);
+ return call_user_func_array('getArrayValue', $args);
+ }
+
+ function SetArrayValue()
+ {
+ $args = func_get_args();
+ $value = array_pop($args);
+
+ $arr =& $this->_Array;
+ for ($i=0; $i<count($args); $i++) {
+ $key = $args[$i];
+ if ( !isset($arr[$key]) || !is_array($arr[$key]) ) {
+ $arr[$key] = Array();
+ }
+ $arr =& $arr[$key];
+ }
+ $arr = $value;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.11.2/core/kernel/utility/params.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/core/kernel/parser/construct_tags.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/core/kernel/parser/construct_tags.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.11.2/core/kernel/parser/construct_tags.php (revision 6098)
@@ -0,0 +1,277 @@
+<?php
+
+//Template language contruct tags (if, block...) which has opening and ending
+class ConstructTag extends Tag {
+ var $StopTag = '';
+ var $SkipMode = 0;
+ var $Logic = 0;
+
+
+ function SetStopTag($tag)
+ {
+ $this->StopTag = $tag;
+ }
+
+ function StoreSkipMode()
+ {
+ $this->SkipMode = $this->Parser->SkipMode;
+ }
+
+ function RestoreSkipMode()
+ {
+ $this->Parser->SetSkipMode($this->SkipMode);
+ }
+
+ function RestoreThisLevelSkipMode()
+ {
+ $this->SkipMode = $this->Parser->Recursion[$this->Parser->RecursionIndex]->SkipMode;
+ }
+
+ function SuggestSkipMode($mode)
+ {
+ if ($mode >= 1) //if we need to skip - always forcing it
+ $this->Parser->SetSkipMode($mode);
+ else { //if we need to turn of skipping
+ if ($this->SkipMode == parse) //check if initially skipping was off
+ $this->Parser->SetSkipMode(parse); //set it to off only then
+ }
+ }
+
+ function GetLogic()
+ {
+ if ($this->SkipMode != parse) {
+ $this->Logic = false;
+ return;
+ }
+ $check = $this->GetParam('check');
+ if ($check) {
+ if (strpos($check, '_') !== false) {
+ list($prefix, $function) = explode('_', $check, 2);
+ }
+ else {
+ $function = $check;
+ $prefix = $this->Parser->GetParam('PrefixSpecial');
+ }
+ }
+ else {
+ $prefix = $this->GetParam('prefix');
+ $function = $this->GetParam('function');
+ }
+ $this->NP['prefix'] = $prefix;
+ $this->NP['function'] = $function;
+
+ $inverse = $this->GetParam('inverse');
+
+ if ($prefix !== false) {
+ $tag =& new Tag('', $this->Parser);
+ $tag->Tag = $function;
+
+ $tmp = $this->Application->processPrefix($prefix);
+ $tag->Processor = $tmp['prefix'];
+
+ $tag->Prefix=$tmp['prefix'];
+ $tag->Special=$tmp['special'];
+ $tag->NamedParams = $this->NP;
+ $this->Logic = $tag->DoProcessTag();
+ // echo " this->Logic : ".$this->Logic."<br>";
+ }
+ else
+ {
+ $this->Logic = $function;
+ }
+ if($inverse) $this->Logic = !$this->Logic;
+ }
+
+ function Process()
+ {
+ switch ($this->Tag) {
+ case 'if':
+ case 'ifnot':
+ $this->GetLogic();
+
+ $this->SetStopTag('endif'); //This recursion level should end when 'endif' is found
+ $this->Parser->Recurve($this); //Saving current tag in parser recursion array
+ $this->StoreSkipMode(); //Storing initial SkipMode
+
+ if ($this->Logic) {
+ $this->SuggestSkipMode(parse); //suggest we parse it
+ }
+ else {
+ $this->SuggestSkipMode(skip); //suggest we don't parse it
+ }
+ break;
+ case 'elseif':
+ $if_logic = $this->Parser->Recursion[$this->Parser->RecursionIndex]->Logic;
+ if (!$if_logic) { //if IF or ELSEIF above have not worked
+ $this->GetLogic();
+
+ if ($this->Logic) { //ELSEIF should run
+ $this->Parser->Recursion[$this->Parser->RecursionIndex]->Logic = $this->Logic; //To escape running ELSE or ELSEIF below
+ $this->SuggestSkipMode(parse);
+ }
+ else { //ELSEIF should NOT run
+ $this->SuggestSkipMode(skip);
+ }
+ }
+ else //IF or ELSEIF above HAVE worked - this ELSEIF should NOT run
+ $this->SuggestSkipMode(skip);
+ break;
+ case 'else':
+ $if_logic = $this->Parser->Recursion[$this->Parser->RecursionIndex]->Logic;
+ $this->RestoreThisLevelSkipMode();
+ if (!$if_logic) { //IF was false - ELSE should run
+ $this->SuggestSkipMode(parse);
+ }
+ else { //IF was true - ELSE should not run
+ $this->SuggestSkipMode(skip);
+ }
+ break;
+ }
+ }
+
+ function CheckRecursion(&$tag)
+ {
+ if ($this->CheckEndRecursion($tag)) {
+ if (defined('EXPERIMENTAL_PRE_PARSE')) {
+ if ($tag->Tag == 'if' || $tag->Tag == 'endif') {
+ $this->Parser->AppendCompiledCode('}');
+ $this->Parser->ResetCode();
+ }
+ }
+ $this->RestoreSkipMode(); //Restoring original SkipMode
+ return true;
+ }
+ else {
+ if (defined('EXPERIMENTAL_PRE_PARSE')) {
+ if ($tag->Tag != 'block' && $tag->Tag != 'DefineElement') {
+ $this->Parser->AppendCode($tag->GetCode());
+ }
+// $this->Parser->AppendCompiledCode( $tag->GetCode() );
+ }
+ }
+ return false;
+ }
+
+ function CheckEndRecursion(&$tag)
+ {
+ if ($tag->GetParam('_closing_tag_') == 1 && $tag->Tag == $this->Tag) {
+ return true;
+ }
+ return ($tag->Tag == $this->StopTag); //Tag matches StopTag we are waiting for to close current recursion
+ }
+}
+
+class BlockTag extends ConstructTag {
+ var $BlockName = '';
+ var $InsideBlock = 0;
+
+ function Process()
+ {
+ switch ($this->Tag) {
+ case 'block':
+ case 'DefineElement':
+ if ($this->Tag == 'DefineElement') {
+ $this->SetStopTag('end_define'); //This recursion level should end when 'blockend' is found
+ }
+ else {
+ $this->SetStopTag('blockend'); //This recursion level should end when 'blockend' is found
+ }
+ $this->Parser->Recurve($this); //Saving current tag in parser recursion array
+ $this->Parser->SetBuffer('');
+ $this->BlockName = $this->NP['name']; //Stroing BlockName
+ if (isset($this->NP['args']) ) {
+ $this->Parser->Args = explode(',', $this->NP['args']);
+ }
+ $this->StoreSkipMode();
+ $this->SuggestSkipMode(skip_tags); //We need to skip tags from now
+ break;
+ }
+ }
+
+ function CheckRecursion(&$tag)
+ {
+ if (parent::CheckRecursion($tag)) { //if endtag matches (SkipMode would be restored then)
+ //Creating template from buffer
+
+ //if (defined('EXPERIMENTAL_PRE_PARSE') && isset($this->Application->PreParsedBlocks[$this->BlockName])) return true;
+
+ $template = new Template();
+ $template->SetBody($this->Parser->GetBuffer());
+
+ //Adding template to application' cache
+ $this->Application->TemplatesCache->SetTemplate($this->BlockName, $template, $this->Parser->TemplateName);
+
+ if (defined('EXPERIMENTAL_PRE_PARSE')) {
+ $code = $this->Parser->GetCode();
+
+ /*if ($this->Parser->UsedProcessors) {
+ array_unshift($code, '$application->CheckProcessors(array("'.implode('", "', $this->Parser->UsedProcessors).'"));');
+ }
+ $this->Parser->UsedProcessors = null;*/
+
+ array_unshift($code, '$o = \'\';');
+ array_unshift($code, '$application->Parser->SetParams($params, false);');
+ array_unshift($code, '$application =& kApplication::Instance();');
+ array_unshift($code, 'extract($params);');
+
+ $defaults = '$defaults = Array(';
+ foreach ($this->NP as $name => $val) {
+ if ($name == 'name') continue;
+ $defaults .= '"'.$name.'" => "'.str_replace('"', '\"', $val).'",';
+ }
+ $defaults .= ');';
+ array_unshift($code, '$params = array_merge_recursive2($defaults, $params);');
+ array_unshift($code, $defaults);
+
+ $code[] = 'return $o;';
+
+ global $debugger;
+
+ $dbg_functions = $this->Application->isDebugMode() && constOn('DBG_PRINT_PREPARSED');
+
+ $f_body = '';
+ //echo "<pre>";
+ $l = 0;
+ if ($dbg_functions) echo "<b>function ".$this->BlockName." {</b><br>";
+ foreach ($code as $line) {
+ $l++;
+ if ($dbg_functions) {
+ echo $l.' '.$debugger->highlightString(trim($line)."\n", true);
+ }
+ $f_body .= "\t\t".rtrim($line, "\n")."\n";
+ }
+ if ($dbg_functions) echo "<b>} // function ".$this->BlockName." end</b><br><br>";
+ //echo "</pre>";
+
+ //caching func body
+ $this->Application->PreParsedCache[$this->BlockName] = $f_body;
+
+ $func = create_function('$params', $f_body);
+ $this->Application->PreParsedBlocks[$this->BlockName] = $func;
+ $this->Parser->Args = null;
+ $this->Parser->ResetCode();
+
+ $this->Parser->AppendCompiledFunction($this->BlockName, $f_body);
+ }
+ return true;
+ }
+ else {
+ // append the tag itself to the block - while in block, we check every tag to be 'blockend'
+ // if it is not - we need to append the tag to the buffer, which we'll parse later in 'parse_block'
+ //if ($tag->Tag != 'block') {
+ if (defined('EXPERIMENTAL_PRE_PARSE') && isset($this->Application->PreParsedBlocks[$this->BlockName])) {
+ return;
+ }
+ if (defined('EXPERIMENTAL_PRE_PARSE')) {
+ // $this->Parser->AppendCode($tag->GetCode());
+ }
+ else {
+ $this->Parser->AppendOutput($tag->GetFullTag());
+ }
+ //}
+ return false;
+ }
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.11.2/core/kernel/parser/construct_tags.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.2/core/units/custom_fields/custom_fields_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.11.2/core/units/custom_fields/custom_fields_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.11.2/core/units/custom_fields/custom_fields_config.php (revision 6098)
@@ -0,0 +1,131 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'cf',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'CustomFieldsEventHandler','file'=>'custom_fields_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'CustomFieldsTagProcessor','file'=>'custom_fields_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+ 'hooks' => Array(),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ 4 => 'type',
+ 5 => 'mode',
+ ),
+
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'cf',
+ 'HookToSpecial' => '*',
+ 'HookToEvent' => Array('OnSave'), // edit cloned fields to made alters :)
+ 'DoPrefix' => 'cf',
+ 'DoSpecial' => '*',
+ 'DoEvent' => 'OnSaveCustomField',
+ ),
+ ),
+
+ 'IDField' => 'CustomFieldId',
+
+ 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item
+
+ 'TitlePhrase' => 'la_title_CustomFields',
+
+ 'TitlePresets' => Array(
+ 'default' => Array( 'new_status_labels' => Array('cf'=>'!la_title_addingCustom!'),
+ 'edit_status_labels' => Array('cf'=>'!la_title_Editing_CustomField!'),
+ 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'),
+ ),
+
+ 'custom_fields_list'=>Array( 'prefixes' => Array('cf_List'),
+ 'format' => "!la_tab_ConfigCustom! (#cf_recordcount#)",
+ ),
+
+ 'custom_fields_edit'=>Array( 'prefixes' => Array('cf'),
+ 'new_titlefield' => Array('cf'=>'!la_title_NewCustomField!'),
+ 'format' => "#cf_status# '#cf_titlefield#'",
+ ),
+ ),
+
+ 'TableName' => TABLE_PREFIX.'CustomField',
+
+ 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'ForcedSorting' => Array('DisplayOrder' => 'asc'),
+ 'Sorting' => Array('FieldName' => 'asc'),
+ ),
+
+ 'general' => Array(
+ 'Sorting' => Array('DisplayOrder' => 'asc')
+ ),
+
+ ),
+
+ 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ ),
+ 'SubItems' => Array('confs-cf'),
+
+ 'Fields' => Array(
+ 'CustomFieldId' => Array('type' => 'int','not_null' => '1','default' => ''),
+ 'Type' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'FieldName' => Array('required'=>'1', 'type' => 'string','not_null' => 1,'default' => ''),
+ 'FieldLabel' => Array('type' => 'string', 'required' => 1, 'default' => ''),
+ 'Heading' => Array('type' => 'string', 'required' => 1, 'default' => ''),
+ 'Prompt' => Array('type' => 'string','default' => ''),
+ 'ElementType' => Array('required'=>'1', 'type'=>'string', 'not_null'=>1, 'default'=>'NULL', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array('' => 'la_EmptyValue', 'text' => 'la_type_text', 'select' => 'la_type_select', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea', 'label' => 'la_type_label', 'date' => 'la_type_date', 'datetime' => 'la_type_datetime')),
+ 'ValueList' => Array('type' => 'string','default' => ''),
+ 'DisplayOrder' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'OnGeneralTab' => Array('type' => 'int','not_null' => '1','default' => '0'),
+ 'IsSystem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
+ ),
+ 'VirtualFields' => Array(
+ 'Value' => Array('type' => 'string', 'default' => ''),
+ 'OriginalValue' => Array('type' => 'string', 'default' => ''),
+
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'CustomFieldId' => Array( 'title'=>'la_prompt_FieldId', 'data_block' => 'grid_checkbox_td' ),
+ 'FieldName' => Array( 'title'=>'la_prompt_FieldName'),
+ 'FieldLabel' => Array( 'title'=>'la_prompt_FieldLabel', 'data_block' => 'cf_grid_data_td' ),
+ 'DisplayOrder' => Array('title' => 'la_prompt_DisplayOrder'),
+ ),
+ ),
+
+ 'SeparateTab' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td'),
+ 'Prompt' => Array( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType'),
+ 'Value' => Array( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td'),
+ ),
+ ),
+
+ 'SeparateTabOriginal' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Fields' => Array(
+ 'FieldName' => Array( 'title'=>'la_col_FieldName', 'data_block' => 'grid_icon_td'),
+ 'Prompt' => Array( 'title'=>'la_col_Prompt', 'data_block' => 'grid_data_label_ml_td', 'ElementTypeField' => 'ElementType'),
+ 'Value' => Array( 'title'=>'la_col_Value', 'data_block' => 'edit_custom_td'),
+ 'OriginalValue' => Array( 'title'=>'la_col_OriginalValue', 'data_block' => 'grid_original_td'),
+ ),
+ ),
+
+ ),
+ );
+
+ if (constOn('DEBUG_MODE')) {
+ $config['Grids']['Default']['Fields']['IsSystem'] = Array('title' => 'la_col_IsSystem');
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.11.2/core/units/custom_fields/custom_fields_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.11
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline