If I created menu with lexicon key "xdbedit", what should I do than for using default.inc.php in lexicon folder?
for the lexicon-key when you create the menue-entry you can use what you want.
This is used only for the components-menue-caption.
when you use ’telephonedir’ and there is no lexicon-entry modx uses ’telephonedir’
when you have an lexicon-entry for examplein your language, modx will use ’Telefonliste’ as menue-caption.$_lang['telephonedir'] = 'Telefonliste';
A small problem i came across is:
When i was trying to add some data i couldn’t make changes and hitting the Save button didn’t fired nothing.
I’m on 2.0.7-pl.
(modx’s error log)
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Path specified for package example is not a valid or accessible directory: D:/WWWDev/server/xampp/htdocs/206pl/core/components/example/model/
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Telephonedir::loadCollection() is not a valid static method.
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:44] (ERROR @ D:\WWWDev\server\xampp\htdocs\206pl\core\components\xdbedit\processors\mgr\telephonedir\getregions.php : 35) PHP warning: Invalid argument supplied for foreach()
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:44] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class !
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class Telephonedir
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Telephonedir::loadCollection() is not a valid static method.
[2011-02-13 12:44:45] (ERROR @ D:\WWWDev\server\xampp\htdocs\206pl\core\components\xdbedit\processors\mgr\telephonedir\getlist.php : 61) PHP warning: Invalid argument supplied for foreach()
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Path specified for package example is not a valid or accessible directory: D:/WWWDev/server/xampp/htdocs/206pl/core/components/example/model/
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class !
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) No class specified for loadClass
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class Telephonedir
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not load class: Telephonedir from mysql.telephonedir.
[2011-02-13 12:44:46] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Telephonedir::loadCollection() is not a valid static method.
[2011-02-13 12:44:46] (ERROR @ D:\WWWDev\server\xampp\htdocs\206pl\core\components\xdbedit\processors\mgr\telephonedir\getlist.php : 61) PHP warning: Invalid argument supplied for foreach()
[2011-02-13 12:45:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Error 42S02 executing statement:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'revdev_db.modx_example_telephonedir' doesn't exist
)
[2011-02-13 12:45:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Error 42S02 executing statement:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'revdev_db.modx_example_telephonedir' doesn't exist
)
[2011-02-13 12:45:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Could not create table `modx_example_telephonedir`
SQL: CREATE TABLE `modx_example_telephonedir` (`id` INTEGER unsigned NOT NULL AUTO_INCREMENT,`name` VARCHAR(255) NOT NULL DEFAULT '',`jobtitle` VARCHAR(255) NOT NULL DEFAULT '',`region` VARCHAR(255) NOT NULL DEFAULT '1',`published` TINYINT(1) unsigned NOT NULL DEFAULT '0',`createdby` INT(10) NOT NULL DEFAULT '0',`createdon` DATETIME NOT NULL,`editedby` INT(10) NOT NULL DEFAULT '0',`editedon` DATETIME NOT NULL,`deleted` TINYINT(1) unsigned NOT NULL DEFAULT '0',`deletedon` DATETIME NOT NULL,`deletedby` INT(10) NOT NULL DEFAULT '0',`publishedon` DATETIME NOT NULL,`publishedby` INT(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) ENGINE=MyISAM
ERROR: Array
(
[0] => 42S01
[1] => 1050
[2] => Table 'modx_example_telephonedir' already exists
)
[2011-02-13 12:45:45] (ERROR @ /206pl/assets/components/xdbedit/connector.php) Error 42S01 attempting to create object container for class Telephonedir:
Array
(
[0] => 42S01
[1] => 1050
[2] => Table 'modx_example_telephonedir' already exists
)
small note: first i forgot to put in place `example` directory, tried it and then remembered i forgot and placed the example dir to the right place.
array(
'caption'=>'Contact',
'fields'=>array(
array(
'field'=>'name',
'caption'=>'Name',
'inputTV'=>'image'
)............
$criteria = new xPDOCriteria($modx, "SELECT * FROM modx_site_tmplvar_contentvalues WHERE BINARY `value` LIKE '%".$key."%' AND tmplvarid = 1");
$stmt = $criteria->prepare();
if ($stmt && $stmt->execute()){
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
.................
hmm....
I can use image-TV in xdbedit without probs.
Tested it just now with the telephone-example.
changed the name-field to use a image-TV as input-type.
My test-config for that field is:
array( 'caption'=>'Contact', 'fields'=>array( array( 'field'=>'name', 'caption'=>'Name', 'inputTV'=>'image' )............
sorry, I cannot reproduce that on mine.
Which version of revo? Do you have that project online?