From: <luc...@us...> - 2012-07-28 06:13:24
|
Revision: 9932 http://xoops.svn.sourceforge.net/xoops/?rev=9932&view=rev Author: luciorota Date: 2012-07-28 06:13:16 +0000 (Sat, 28 Jul 2012) Log Message: ----------- fixed errors added some descriptions Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/class/field.php XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -27,28 +27,36 @@ */ include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; + +// Include xoops admin header +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once XOOPS_ROOT_PATH . '/include/config.php'; +include_once XOOPS_ROOT_PATH . '/include/functions.php'; + +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +xoops_load ('XoopsUserUtility'); + +// Include module functions include_once '../include/config.php'; include_once '../include/functions.php'; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - include_once XOOPS_ROOT_PATH . '/class/tree.php'; - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - xoops_load ('XoopsUserUtility'); + $pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globlang = $GLOBALS['xoopsConfig']['language']; +$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ - include_once $pathDir.'/language/'.$globlang.'/main.php'; +if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ + include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; } else { - include_once $pathDir.'/language/english/main.php'; + include_once $pathDir . '/language/english/main.php'; } -if ( file_exists($pathDir.'/moduleadmin.php')){ - include_once $pathDir.'/moduleadmin.php'; +if ( file_exists($pathDir . '/moduleadmin.php')){ + include_once $pathDir . '/moduleadmin.php'; //return true; -}else{ +} else { xoops_cp_header(); echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); xoops_cp_footer(); @@ -87,7 +95,7 @@ $xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); //xoops_cp_header(); -//Load languages +//Load module languages xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -241,22 +241,6 @@ } else { $field->setVar('field_options', array()); } - - // field_extras - $fieldTypesWithExtras = array(); // IN PROGRESS - if (in_array($field->getVar('field_type'), $fieldTypesWithExtras)) { - $extras = $field->getVar('field_extras'); - if (!empty($_REQUEST['addExtra'])) { - foreach ($_REQUEST['addExtra'] as $extra) { - if ( empty($extra['value'])) continue; - $extras[$extra['key']] = $extra['value']; - $redirectToEdit = true; - } - } - $field->setVar('field_extras', $extras); - } else { - $field->setVar('field_extras', array()); - } } if ($field->getVar('field_edit')) { @@ -282,16 +266,12 @@ $field->setVar('field_default', $field_default); } } - + // field_extras - if (isset($_REQUEST['field_extras'])) { - $field_extras = $field->getValueForSave($_REQUEST['field_extras']); - //Check for multiple selections - if (is_array($field_extras)) { - $field->setVar('field_extras', serialize($field_extras)); - } else { - $field->setVar('field_extras', $field_extras); - } + if (!empty($_REQUEST['field_extras'])) { + $field->setVar('field_extras', $_REQUEST['field_extras']); + } else { + $field->setVar('field_extras', array()); } } Modified: XoopsModules/xaddresses/trunk/xaddresses/class/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/field.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/field.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -40,7 +40,7 @@ * Tricky solution */ function setVar($key, $value, $not_gpc = false) - { + {error_log(print_r($value),true); if ($key == 'field_options' && is_array($value)) { foreach (array_keys($value) as $idx) { $value[$idx] = base64_encode($value[$idx]); @@ -69,6 +69,8 @@ **/ function getEditElement($location) { + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $value = $location->getVar($this->getVar('field_name'), 'e'); if (is_null($value)) { $value = $this->getVar('field_default'); @@ -86,7 +88,16 @@ $options[$optkey] = $optval; } } - include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $extras = $this->getVar('field_extras'); + if (is_array($extras)) { + //asort($extras); + foreach (array_keys($extras) as $key) { + $extval = defined($extras[$key]) ? constant($extras[$key]) : $extras[$key]; + $extkey = defined($key) ? constant($key) : $key; + unset($extras[$key]); + $extras[$extkey] = $extval; + } + } switch ($this->getVar('field_type')) { default: case "autotext": @@ -97,10 +108,12 @@ $element = new XoopsFormText($caption, $name, $this->getVar('field_length'), $this->getVar('field_maxlength'), $value); break; case "textarea": - $element = new XoopsFormTextArea($caption, $name, $value, 4, 30); + //$element = new XoopsFormTextArea($caption, $name, $value, 4, 30); + $element = new XoopsFormTextArea($caption, $name, $value, $extras['rows'], $extras['cols']); break; case "dhtml": - $element = new XoopsFormDhtmlTextArea($caption, $name, $value, 10, 30); + //$element = new XoopsFormDhtmlTextArea($caption, $name, $value, 10, 30); + $element = new XoopsFormDhtmlTextArea($caption, $name, $value, $extras['rows'], $extras['cols']); break; case "select": $element = new XoopsFormSelect($caption, $name, $value); @@ -157,9 +170,8 @@ $element->setExtra("style='width: 280px;'"); break; case "rank": + include_once $GLOBALS['xoops']->path('class/xoopslists.php'); $element = new XoopsFormSelect($caption, $name, $value); - - include_once $GLOBALS['xoops']->path('class/xoopslists.php'); $ranks = XoopsLists::getUserRankList(); $element->addOption(0, "--------------"); $element->addOptionArray($ranks); @@ -428,96 +440,96 @@ /** * save an location field in the database * - * @param object $obj reference to the object + * @param object $field reference to the object * @param bool $force whether to force the query execution despite security settings * @param bool $checkObject check if the object is dirty and clean the attributes * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - function insert(&$obj, $force = false) + function insert(&$field, $force = false) { $locationHandler =& xoops_getmodulehandler('location', 'xaddresses'); - $obj->setVar('field_name', str_replace(' ', '_', $obj->getVar('field_name'))); - $obj->cleanVars(); + $field->setVar('field_name', str_replace(' ', '_', $field->getVar('field_name'))); + $field->cleanVars(); $defaultstring = ""; - switch ($obj->getVar('field_type')) { + switch ($field->getVar('field_type')) { case "datetime": case "date": - $obj->setVar('field_valuetype', XOBJ_DTYPE_INT); - $obj->setVar('field_maxlength', 10); + $field->setVar('field_valuetype', XOBJ_DTYPE_INT); + $field->setVar('field_maxlength', 10); break; case "longdate": - $obj->setVar('field_valuetype', XOBJ_DTYPE_MTIME); + $field->setVar('field_valuetype', XOBJ_DTYPE_MTIME); break; case "yesno": - $obj->setVar('field_valuetype', XOBJ_DTYPE_INT); - $obj->setVar('field_maxlength', 1); + $field->setVar('field_valuetype', XOBJ_DTYPE_INT); + $field->setVar('field_maxlength', 1); break; case "textbox": - if ($obj->getVar('field_valuetype') != XOBJ_DTYPE_INT) { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + if ($field->getVar('field_valuetype') != XOBJ_DTYPE_INT) { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); } break; case "autotext": - if ($obj->getVar('field_valuetype') != XOBJ_DTYPE_INT) { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + if ($field->getVar('field_valuetype') != XOBJ_DTYPE_INT) { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); } break; case "group_multi": case "select_multi": case "checkbox": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; case "language": case "timezone": case "theme": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; case "image": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; case "file": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; // IN_PROGRESS case "multipleimage": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; case "multiplefile": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; // IN_PROGRESS case "dhtml": case "textarea": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); break; case "kmlmap": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); break; } - if ($obj->getVar('field_valuetype') == "") { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + if ($field->getVar('field_valuetype') == "") { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); } - if (!in_array($obj->getVar('field_name'), $this->getLocationVars())) { - if ($obj->isNew()) { + if (!in_array($field->getVar('field_name'), $this->getLocationVars())) { + if ($field->isNew()) { //add column to table $changetype = "ADD"; } else { //update column information - $changetype = "CHANGE `" . $obj->getVar('field_name', 'n') . "`"; + $changetype = "CHANGE `" . $field->getVar('field_name', 'n') . "`"; } - $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? "(" . $obj->getVar('field_maxlength') . ")" : ""; - $lengthstring = $obj->getVar('field_length') > 0 ? "(" . $obj->getVar('field_length') . ")" : ""; + $maxlengthstring = $field->getVar('field_maxlength') > 0 ? "(" . $field->getVar('field_maxlength') . ")" : ""; + $lengthstring = $field->getVar('field_length') > 0 ? "(" . $field->getVar('field_length') . ")" : ""; $notnullstring = " NOT NULL"; //set type - switch ($obj->getVar('field_valuetype')) { + switch ($field->getVar('field_valuetype')) { default: case XOBJ_DTYPE_ARRAY: case XOBJ_DTYPE_UNICODE_ARRAY: $type = "mediumtext"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); break; case XOBJ_DTYPE_UNICODE_EMAIL: case XOBJ_DTYPE_UNICODE_TXTBOX: @@ -530,37 +542,37 @@ if (!$lengthstring) { //so set it to max if length is not set - or should it fail? $lengthstring = "(40)"; - $obj->setVar('field_length', 40); + $field->setVar('field_length', 40); } // varchars must have a maxlength if (!$maxlengthstring) { //so set it to max if maxlength is not set - or should it fail? $maxlengthstring = "(255)"; - $obj->setVar('field_maxlength', 255); + $field->setVar('field_maxlength', 255); } - //if ( $obj->getVar('field_default') ) { - $defaultstring = " DEFAULT " . $this->db->quote($obj->cleanVars['field_default']); + //if ( $field->getVar('field_default') ) { + $defaultstring = " DEFAULT " . $this->db->quote($field->cleanVars['field_default']); //} break; case XOBJ_DTYPE_INT: $type = "int"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . intval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', intval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . intval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', intval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_DECIMAL: $type = "decimal(14,6)"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . doubleval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', doubleval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . doubleval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', doubleval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_FLOAT: $type = "float(15,9)"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . floatval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', floatval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . floatval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', floatval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_OTHER: @@ -568,19 +580,19 @@ case XOBJ_DTYPE_TXTAREA: $type = "text"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); $notnullstring = ""; break; case XOBJ_DTYPE_MTIME: $type = "date"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); break; } $sql = "ALTER TABLE `" . $locationHandler->table . "`"; $sql.= " " . $changetype; - $sql.= " " . "`" . $obj->cleanVars['field_name'] . "`"; + $sql.= " " . "`" . $field->cleanVars['field_name'] . "`"; $sql.= " " . $type . $maxlengthstring . $notnullstring . $defaultstring; if (!$this->db->query($sql)) { return false; @@ -588,41 +600,41 @@ } //change this to also update the cached field information storage - $obj->setDirty(); - if (!parent::insert($obj, $force)) { + $field->setDirty(); + if (!parent::insert($field, $force)) { return false; } - return $obj->getVar('field_id'); + return $field->getVar('field_id'); } /** * delete a location field from the database * - * @param object $obj reference to the object to delete + * @param object $field reference to the object to delete * @param bool $force * @return bool FALSE if failed. **/ - function delete(&$obj, $force = false) + function delete(&$field, $force = false) { $locationHandler =& xoops_getmodulehandler('location', 'xaddresses'); // remove column from table $sql = "ALTER TABLE " . $locationHandler->table; - $sql.= " DROP `" . $obj->getVar('field_name', 'n') . "`"; + $sql.= " DROP `" . $field->getVar('field_name', 'n') . "`"; if ($this->db->query($sql)) { //change this to update the cached field information storage - if (!parent::delete($obj, $force)) { + if (!parent::delete($field, $force)) { return false; } - if ($obj->getVar('field_show') || $obj->getVar('field_edit')) { + if ($field->getVar('field_show') || $field->getVar('field_edit')) { $moduleHandler =& xoops_gethandler('module'); $module = $moduleHandler->getByDirname('xaddresses'); if (is_object($module)) { // Remove group permissions $groupPermHandler =& xoops_gethandler('groupperm'); $criteria = new CriteriaCompo(new Criteria('gperm_modid', $module->getVar('mid'))); - $criteria->add(new Criteria('gperm_itemid', $obj->getVar('field_id'))); + $criteria->add(new Criteria('gperm_itemid', $field->getVar('field_id'))); return $groupPermHandler->deleteAll($criteria); } } Modified: XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -107,7 +107,7 @@ { $html = "<div>"; $html.= "<input type='text' name='" . $this->getName() . "' title='" . $this->getTitle() . "' size='" . $this->getSize() ."' maxlength='" . $this->getMaxlength() ."' value='" . $this->getValue() . "' />"; - $html.= "<img src='" . XOOPS_URL . "/images/image.gif' alt='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' title='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' onclick='randomId = Math.random().toString(); this.parentNode.firstChild.id = \"input_\" + randomId; openWithSelfMain("" . XOOPS_URL . "/modules/ajaxfilemanager/imagemanager/imagemanager.php?target=input_" + randomId + "&editor=src","imagemanager",800,600);' onmouseover='style.cursor=\"hand\"'/>"; + $html.= "<img src='" . XOOPS_URL . "/images/image.gif' alt='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' title='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' onclick='randomId = Math.random().toString(); this.parentNode.firstChild.id = \"input_\" + randomId; openWithSelfMain("" . XOOPS_URL . "/imagemanager.php?target=input_" + randomId + "&editor=src","imagemanager",800,600);' onmouseover='style.cursor=\"hand\"'/>"; $html.= sprintf($this->getPreviewformat(), $this->getSrc()); $html.= "</div>"; return $html; Modified: XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -2,7 +2,6 @@ defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); xoops_load('formxoopsimage', 'xaddresses'); // load custom form class - class XaddressesLocationcategory extends XoopsObject { function __construct() @@ -11,9 +10,9 @@ $this->initVar('cat_pid', XOBJ_DTYPE_INT, null, false); $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX); $this->initVar('cat_description', XOBJ_DTYPE_TXTAREA); - $this->initVar('cat_dohtml', XOBJ_DTYPE_INT, 1, false); // For html form + $this->initVar('cat_dohtml', XOBJ_DTYPE_INT, true, false); // For html form $this->initVar('cat_imgurl',XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('cat_weight', XOBJ_DTYPE_INT); + $this->initVar('cat_weight', XOBJ_DTYPE_INT, 0); $this->initVar('cat_map_type', XOBJ_DTYPE_TXTBOX); } @@ -32,7 +31,7 @@ */ function getForm($action = false, &$form = null) { - global $xoopsModuleConfig; + global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser; if ($action === false) { $action = $_SERVER['REQUEST_URI']; } @@ -48,42 +47,46 @@ $form->setExtra('enctype="multipart/form-data"'); + // Category title $form->addElement(new XoopsFormText(_AM_XADDRESSES_CAT_TITLE, 'cat_title', 35, 255, $this->getVar('cat_title')), true); + + // Hidden fields if (!$this->isNew()) { //Load groups $form->addElement(new XoopsFormHidden('cat_id', $this->getVar('cat_id'))); $form->addElement(new XoopsFormHidden('cat_modified', true)); } - // Description - $editor_configs = array(); - $editor_configs['name'] = 'cat_description'; - $editor_configs['value'] = $this->getVar('cat_description', 'e'); - $editor_configs['rows'] = 20; - $editor_configs['cols'] = 160; - $editor_configs['width'] = '100%'; - $editor_configs['height'] = '400px'; - $editor_configs['editor'] = $xoopsModuleConfig['editor']; + // Category description + $editor_configs = array(); + $editor_configs['name'] = 'cat_description'; + $editor_configs['value'] = $this->getVar('cat_description', 'e'); + $editor_configs['rows'] = 20; + $editor_configs['cols'] = 160; + $editor_configs['width'] = '100%'; + $editor_configs['height'] = '400px'; + $editor_configs['editor'] = $GLOBALS['xoopsModuleConfig']['text_editor']; $form->addElement( new XoopsFormEditor(_AM_XADDRESSES_CAT_DESCRIPTION, 'cat_description', $editor_configs), false); - //$form->addElement(new XoopsFormTextArea(_AM_XADDRESSES_DESCRIPTION, 'cat_description', $this->getVar('cat_description', 'e'))); - // Image + // Category image $form->addElement(new FormXoopsImage (_AM_XADDRESSES_CAT_IMG, 'cat_imgurl', 40, 255, $this->getVar('cat_imgurl'))); // custom form class // Parent category - $xaddressescat_Handler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight ASC, cat_title'); - $criteria->setOrder('ASC'); - $xaddressescat_arr = $xaddressescat_Handler->getall($criteria); - $mytree = new XoopsObjectTree($xaddressescat_arr, 'cat_id', 'cat_pid'); - $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_CAT_PARENT, $mytree->makeSelBox('cat_pid', 'cat_title','--',$this->getVar('cat_pid'), true))); + $xaddressescat_Handler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight ASC, cat_title'); + $criteria->setOrder('ASC'); + $xaddressescat_arr = $xaddressescat_Handler->getall($criteria); + $mytree = new XoopsObjectTree($xaddressescat_arr, 'cat_id', 'cat_pid'); + $categoryCategortSelect = new XoopsFormLabel(_AM_XADDRESSES_CAT_PARENT, $mytree->makeSelBox('cat_pid', 'cat_title','--',$this->getVar('cat_pid'), true)); + $categoryCategortSelect->setDescription(_AM_XADDRESSES_CAT_PARENT_DESC); + $form->addElement($categoryCategortSelect); - // Weight + // Category weight $form->addElement(new XoopsFormText(_AM_XADDRESSES_CAT_WEIGHT, 'cat_weight', 35, 35, $this->getVar('cat_weight', 'e')), true); // Map Setting - $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_MAP_SETTING, _AM_XADDRESSES_CAT_MAP_SETTING, '')); + $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_MAP_SETTING, '<b>' . _AM_XADDRESSES_CAT_MAP_SETTING . '</b>', '')); // Maptype $select_map_type = new XoopsFormSelect (_AM_XADDRESSES_CAT_MAP_TYPE, 'cat_map_type', $this->getVar('cat_map_type'), 1, false); $select_map_type->addOption('ROADMAP', 'ROADMAP'); @@ -93,8 +96,8 @@ $select_map_type->setDescription(_AM_XADDRESSES_CAT_MAP_TYPE_DESC); $form->addElement($select_map_type); - // Permissions - $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_PERMISSIONS, _AM_XADDRESSES_CAT_PERMISSIONS, '')); + // Category permissions + $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_PERMISSIONS, '<b>' . _AM_XADDRESSES_CAT_PERMISSIONS . '</b>', '')); $memberHandler = & xoops_gethandler('member'); $groupPermHandler =& xoops_gethandler('groupperm'); Modified: XoopsModules/xaddresses/trunk/xaddresses/include/forms.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/include/forms.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/include/forms.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -154,15 +154,14 @@ break; } //field_notnull - //$fiedlnotnullradio = new XoopsFormRadioYN(_AM_XADDRESSES_FIELD_NOTNULL, 'field_notnull', $field->getVar('field_notnull', 'e')); - //$fiedlnotnullradio->setDescription(_AM_XADDRESSES_FIELD_NOTNULL_DESC); - //$form->addElement($fiedlnotnullradio); + //$fieldNotNullRadio = new XoopsFormRadioYN(_AM_XADDRESSES_FIELD_NOTNULL, 'field_notnull', $field->getVar('field_notnull', 'e')); + //$fieldNotNullRadio->setDescription(_AM_XADDRESSES_FIELD_NOTNULL_DESC); + //$form->addElement($fieldNotNullRadio); //field_options - $fieldTypesWithOptions = array('select', 'select-multi', 'radio', 'checkbox'); + $fieldTypesWithOptions = array('select', 'select_multi', 'radio', 'checkbox'); if (in_array($field->getVar('field_type'), $fieldTypesWithOptions)) { $options = $field->getVar('field_options'); -// print_r($options); if (count($options) > 0) { $remove_options = new XoopsFormCheckBox(_AM_XADDRESSES_FIELD_REMOVEOPTIONS, 'removeOptions'); $remove_options->columns = 3; @@ -184,42 +183,55 @@ $option_text .= "</table>"; $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_FIELD_ADDOPTION, $option_text) ); } -/* IN_PROGRESS + } + //field_default & field_maxlength + if ($field->getVar('field_edit')) { //field_extras - $fieldTypeswithextras = array('image'); + $fieldTypeswithextras = array('textarea', 'dhtml'); if (in_array($field->getVar('field_type'), $fieldTypeswithextras)) { $extras = $field->getVar('field_extras'); - if (count($extras) > 0) { - $remove_extras = new XoopsFormCheckBox(_AM_XADDRESSES_REMOVEEXTRAS, 'removeExtras'); - $remove_extras->columns = 3; - asort($extras); - foreach (array_keys($extras) as $key) { - $extras[$key] .= "[{$key}]"; - } - $remove_options->addOptionArray($extras); - $form->addElement($remove_extras); - } - $extra_text = "<table cellspacing='1'><tr><td width='20%'>" . _AM_XADDRESSES_KEY . "</td><td>" . _AM_XADDRESSES_VALUE . "</td></tr>"; - for ($i = 0; $i < 3; $i++) { - $extra_text .= "<tr>"; - $extra_text .= "<td><input type='text' name='addExtra[{$i}][key]' id='addExtra[{$i}][key]' size='15' /></td>"; - $extra_text .= "<td><input type='text' name='addExtra[{$i}][value]' id='addExtra[{$i}][value]' size='35' /></td>"; - $extra_text .= "</tr>"; - $extra_text .= "<tr height='3px'><td colspan='2'> </td></tr>"; - } - $extra_text .= "</table>"; - $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_ADDEXTRA, $extra_text) ); } -*/ - } - //field_default & field_maxlength - if ($field->getVar('field_edit')) { + switch ($field->getVar('field_type')) { case "textbox": + $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 4, 4, $field->getVar('field_length', 'e')); + $fieldLengthText->setDescription(_AM_XADDRESSES_FIELD_LENGTH_DESC); + $form->addElement($fieldLengthText); + $fieldMaxLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_MAXLENGTH, 'field_maxlength', 4, 4, $field->getVar('field_maxlength', 'e')); + $fieldMaxLengthText->setDescription(_AM_XADDRESSES_FIELD_MAXLENGTH_DESC); + $form->addElement($fieldMaxLengthText); + $fieldDefaultTextarea = new XoopsFormTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "textarea": + if (empty($extras['rows'])) {$extras['rows'] = 4;} // default rows value + if (empty($extras['cols'])) {$extras['cols'] = 30;} // default cols value + $fieldTextareaRowsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREAROWS, 'field_extras[rows]', 4, 4, $extras['rows']); + $fieldTextareaRowsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC); + $form->addElement($fieldTextareaRowsText); + $fieldTextareaColsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREACOLS, 'field_extras[cols]', 4, 4, $extras['cols']); + $fieldTextareaColsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC); + $form->addElement($fieldTextareaColsText); + $fieldDefaultTextarea = new XoopsFormTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "dhtml": + if (empty($extras['rows'])) {$extras['rows'] = 4;} // default rows value + if (empty($extras['cols'])) {$extras['cols'] = 30;} // default cols value + $fieldTextareaRowsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREAROWS, 'field_extras[rows]', 4, 4, $extras['rows']); + $fieldTextareaRowsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC); + $form->addElement($fieldTextareaRowsText); + $fieldTextareaColsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREACOLS, 'field_extras[cols]', 4, 4, $extras['cols']); + $fieldTextareaColsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC); + $form->addElement($fieldTextareaColsText); + $fieldDefaultTextarea = new XoopsFormDhtmlTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "kmlmap": - $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 35, 35, $field->getVar('field_length', 'e')); + $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 3, 3, $field->getVar('field_length', 'e')); $fieldLengthText->setDescription(_AM_XADDRESSES_FIELD_LENGTH_DESC); $form->addElement($fieldLengthText); $fieldMaxLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_MAXLENGTH, 'field_maxlength', 35, 35, $field->getVar('field_maxlength', 'e')); @@ -336,6 +348,7 @@ $form->addElement($fieldRequiredRadio); } + // Permissions @@ -368,6 +381,7 @@ $searchableTypes = array( 'textbox', 'textarea', + 'dhtml', 'select', 'radio', 'yesno', Modified: XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -166,8 +166,10 @@ define("_AM_XADDRESSES_CAT_ID","Id"); define("_AM_XADDRESSES_CAT_TITLE","Title"); define("_AM_XADDRESSES_CAT_DESCRIPTION","Description"); +define("_AM_XADDRESSES_CAT_DESCRIPTION_DESC","Leave empty if category is a main category"); define("_AM_XADDRESSES_CAT_IMG","Category image"); define("_AM_XADDRESSES_CAT_PARENT","In the category"); +define("_AM_XADDRESSES_CAT_PARENT_DESC","Leave empty if category is a main category"); define("_AM_XADDRESSES_CAT_WEIGHT","Weight"); define("_AM_XADDRESSES_CAT_MAP_SETTING","GoogleMaps settings"); @@ -255,8 +257,14 @@ //define("_AM_XADDRESSES_FIELD_ADDEXTRA", "Maximum Length"); //define("_AM_XADDRESSES_FIELD_ADDEXTRA_DESC", "// IN PROGRESS"); + define("_AM_XADDRESSES_FIELD_LENGTH", "Field Length In Form"); define("_AM_XADDRESSES_FIELD_LENGTH_DESC", "// IN PROGRESS"); +define("_AM_XADDRESSES_FIELD_TEXTAREAROWS", "Field rows attribute"); +define("_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC", "Specifies the visible number of lines in a text area"); +define("_AM_XADDRESSES_FIELD_TEXTAREACOLS", "Field cols attribute"); +define("_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC", "Specifies the visible width of a text area"); + define("_AM_XADDRESSES_FIELD_MAXLENGTH", "Maximum Field Length"); define("_AM_XADDRESSES_FIELD_MAXLENGTH_DESC", "// IN PROGRESS"); define("_AM_XADDRESSES_FIELD_DEFAULT", "Default"); Modified: XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -78,8 +78,8 @@ define('_MI_XADDRESSES_AUTOAPPROVE',"Auto approve new addresses without admin intervention ?"); define('_MI_XADDRESSES_AUTOAPPROVE_DESC', ''); - define("_MI_XADDRESSES_FORM_OPTIONS","Editor"); - define("_MI_XADDRESSES_FORM_OPTIONS_DESC",""); +define("_MI_XADDRESSES_FORM_OPTIONS","[Editor] Choose an editor for categories description"); +define("_MI_XADDRESSES_FORM_OPTIONS_DESC","<ul><li><b>dhtmltextarea:</b> default Xoops editor</li><li><b>textarea:</b> standard html textarea</li><li><b>tinymce:</b> enhanced WYSIWYG editor</li><li>...</li></ul>"); define('_MI_XADDRESSES_TOPORDER','How to display items on the index page?'); define('_MI_XADDRESSES_TOPORDER1','Date (DESC)'); define('_MI_XADDRESSES_TOPORDER2','Date (ASC)'); Modified: XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql 2012-07-28 06:13:16 UTC (rev 9932) @@ -65,7 +65,7 @@ `field_show` tinyint(1) unsigned NOT NULL default '0', `field_config` tinyint(1) unsigned NOT NULL default '0', `field_options` text, - `field_extras` text, + `field_extras` text, PRIMARY KEY (`field_id`), UNIQUE KEY `field_name` (`field_name`) ) ENGINE=MyISAM; Modified: XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html 2012-07-28 06:13:16 UTC (rev 9932) @@ -16,7 +16,7 @@ <td><{$field.field_title}></td> <td><{$field.field_description}></td> <td><{$field.field_type}></td> - <td>pippo + <td> <select name="category[<{$field.field_id}>]"> <{html_options options=$categories selected=$field.cat_id}> </select> Modified: XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -1,13 +1,13 @@ <?php if (!defined('XOOPS_ROOT_PATH')){ exit(); } $dirname = basename( dirname( __FILE__ ) ) ; - +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; xoops_load('XoopsLists'); $modversion['name'] = _MI_XADDRESSES_NAME; $modversion['version'] = '1.0'; $modversion['description'] = _MI_XADDRESSES_DESC; -$modversion['author'] = "Rota Lucio"; +$modversion['author'] = 'Rota Lucio'; $modversion['author_mail'] = 'luc...@gm...'; $modversion['author_website_url'] = 'http://luciorota.altervista.org'; $modversion['author_website_name'] = 'http://luciorota.altervista.org'; @@ -17,11 +17,11 @@ $modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; $modversion['release_info'] = "RC"; -$modversion['release_file'] = XOOPS_URL."/modules/{$dirname}/docs/RC"; -$modversion['release_date'] = "2012/07/25"; // 'Y/m/d' +$modversion['release_file'] = XOOPS_URL . "/modules/{$dirname}/docs/RC"; +$modversion['release_date'] = "2012/07/27"; // 'Y/m/d' $modversion['manual'] = 'Help'; -$modversion['manual_file'] = XOOPS_URL."/modules/{$dirname}/docs/help.html"; +$modversion['manual_file'] = XOOPS_URL . "/modules/{$dirname}/docs/help.html"; $modversion['min_php'] = '5.2'; $modversion['min_xoops'] = '2.4.5'; // 'XOOPS 2.5'; $modversion['min_admin']= '1.1'; @@ -34,7 +34,7 @@ $modversion['icons16'] = "modules/{$dirname}/images/icons/16x16"; $modversion['icons32'] = "modules/{$dirname}/images/icons/32x32"; -//About +// About $modversion['demo_site_url'] = "IN PROGRESS"; $modversion['demo_site_name'] = "IN PROGRESS"; $modversion['forum_site_url'] = "IN PROGRESS"; @@ -54,15 +54,13 @@ $modversion['adminmenu'] = "admin/menu.php"; // Mysql file $modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -// Mysql file -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; // Tables created by sql file (without prefix!) $modversion['tables'][0] = "xaddresses_locationcategory"; $modversion['tables'][1] = "xaddresses_location"; $modversion['tables'][2] = "xaddresses_fieldcategory"; $modversion['tables'][3] = "xaddresses_field"; -// IN PROGRESS + $modversion['tables'][4] = "xaddresses_broken"; $modversion['tables'][5] = "xaddresses_modify"; $modversion['tables'][6] = "xaddresses_votedata"; @@ -80,12 +78,10 @@ $i = 0; $isAdmin = false; if (!empty($GLOBALS['xoopsUser'])) { - //$modversion['sub'][0]['name'] = _MI_XADDRESSES_TODO; - //$modversion['sub'][0]['url'] = "public-useralbum.php?id=".$GLOBALS['xoopsUser']->uid(); - // Check if xoopsUser is a module administrator + // check if xoopsUser is a module administrator $isAdmin = ($GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid'))); } - // Add the Submit new item button (if user has right submit permissions) + // add the Submit new item button (if user has right submit permissions) if ($isAdmin || (isset($GLOBALS['xoopsModuleConfig']['allowsubmit']) && $GLOBALS['xoopsModuleConfig']['allowsubmit'] == true && (is_object($GLOBALS['xoopsUser']) || @@ -100,7 +96,7 @@ $i++; $modversion['sub'][$i]['name'] = _MI_XADDRESSES_SEARCH; $modversion['sub'][$i]['url'] = "locationsearch.php"; - // Add the Module Administration button (if user has right permissions) + // add the Module Administration button (if user has right permissions) if ($isAdmin) { $i++; $modversion['sub'][$i]['name'] = _MI_XADDRESSES_ADMIN; @@ -108,7 +104,9 @@ } } -// Pour les blocs + + +// Blocks $modversion['blocks'][1]['file'] = "xaddresses_top.php"; $modversion['blocks'][1]['name'] = _MI_XADDRESSES_BNAME1; $modversion['blocks'][1]['description'] = _MI_XADDRESSES_BNAMEDSC1; @@ -155,7 +153,7 @@ $modversion['comments']['itemName'] = 'loc_id'; $modversion['comments']['pageName'] = 'locationview.php'; $modversion['comments']['extraParams'] = array('loc_cat_id'); -// Comment callback functions +// comment callback functions $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; $modversion['comments']['callback']['approve'] = 'xaddresses_com_approve'; $modversion['comments']['callback']['update'] = 'xaddresses_com_update'; @@ -192,7 +190,7 @@ $modversion['templates'][$i]['file'] = 'xaddresses_locationsearchresults.html'; $modversion['templates'][$i]['description'] = ''; -// Admin Templates +// admin templates $i++; $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationcategorylist.html'; $modversion['templates'][$i]['description'] = ''; @@ -201,15 +199,15 @@ $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationlist.html'; $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationbrokenlist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationmodifylist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; $i++; +$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationbrokenlist.html'; +$modversion['templates'][$i]['description'] = ''; +//$modversion['templates'][$i]['type'] = 'admin'; +$i++; +$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationmodifylist.html'; +$modversion['templates'][$i]['description'] = ''; +//$modversion['templates'][$i]['type'] = 'admin'; +$i++; $modversion['templates'][$i]['file'] = 'xaddresses_admin_fieldcategorylist.html'; $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; @@ -218,7 +216,7 @@ $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; -// Image Manager Templates +// image manager templates $i++; $modversion['templates'][$i]['file'] = 'xaddresses_imagemanager.html'; $modversion['templates'][$i]['description'] = ''; @@ -229,7 +227,7 @@ // Preferences -// FOR FUTURE XOOPS VERSIONS +// MAYBE FOR FUTURE XOOPS VERSIONS /* $i = 0; $i++; @@ -245,16 +243,15 @@ $modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_LOCATION_CONFIG; $modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_LOCATION_CONFIG_DESC; */ - $i = 0; $i++; - $modversion['config'][$i]['name'] = 'google_apikey'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'text'; - $modversion['config'][$i]['default'] = ''; - $modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['name'] = 'google_apikey'; +$modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; +$modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = ''; +$modversion["config"][$i]["category"] = "global"; $i++; $modversion['config'][$i]['name'] = 'popular'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_POPULAR'; @@ -302,7 +299,7 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 5; -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'index_list_titlelenght'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_TITLELENGHT'; @@ -310,7 +307,7 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 20; -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'show_home_in_breadcrumb'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_SHOWHOMEINBREADCRUMB'; @@ -318,7 +315,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 1; // true/yes -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'usetellafriend'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETELLAFRIEND'; @@ -326,7 +323,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'usetag'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETAG'; @@ -334,7 +331,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'useajaxfilemanager'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USEAJAXFILEMANAGER'; @@ -342,7 +339,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'autoapprove'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_AUTOAPPROVE'; @@ -352,14 +349,17 @@ $modversion['config'][$i]['default'] = 0; $modversion["config"][$i]["category"] = "global"; $i++; -$modversion["config"][$i]["name"] = "editor"; -$modversion["config"][$i]["title"] = "_MI_XADDRESSES_FORM_OPTIONS"; -$modversion["config"][$i]["description"] = "_MI_XADDRESSES_FORM_OPTIONS_DESC"; -$modversion["config"][$i]["formtype"] = "select"; -$modversion["config"][$i]["valuetype"] = "text"; -$modversion["config"][$i]["default"] = "dhtmltextarea"; -$modversion["config"][$i]["options"] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor"); -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['name'] = 'text_editor'; +$modversion['config'][$i]['title'] = '_MI_XADDRESSES_FORM_OPTIONS'; +$modversion['config'][$i]['description'] = '_MI_XADDRESSES_FORM_OPTIONS_DESC'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'dhtmltextarea'; +//xoops_load('xoopseditorhandler'); +//$editor_handler = XoopsEditorHandler::getInstance(); +//$modversion['config'][$i]['options'] = array_flip($editor_handler->getList()); +$modversion['config'][$i]['options'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'toporder'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_TOPORDER'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |