

[base_url] => /~fredm/modx-0.9.7-2404/manager/
[base_path] => /Users/fredm/Sites/modx-0.9.7-2404/
[core_path] => /Users/fredm/Sites/modx-0.9.7-2404/core/
[site_url] => http://fm.local/~fredm/modx-0.9.7-2404/manager/
[manager_path] => /Users/fredm/Sites/modx-0.9.7-2404/manager/
[manager_url] => /~fredm/modx-0.9.7-2404/manager/manager/
[assets_path] => /Users/fredm/Sites/modx-0.9.7-2404/core/assets/
[assets_url] => /~fredm/modx-0.9.7-2404/manager/assets/

<?php
$result= $modx->dbQuery($sql);
$resourceArray= array ();
$docs = $result->fetchAll(PDO_FETCH_ASSOC);//added this line
//changed the following to replace getRecordCount
$cnt = count($docs);//@$modx->db->getRecordCount($result);
//that's all
$TVData = array();
$TVIDs = array();
for ($i= 0; $i < $cnt; $i++) {
$resource = $docs[$i];//$modx->fetchRow($result);
if($keywords) {
$resource = $this->appendKeywords($resource);
}
if ($this->prefetch == true && $this->sortOrder !== false) $resource["ditto_sort"] = $this->sortOrder[$resource["id"]];
$TVIDs[] = $resource["id"];
$resourceArray["#".$resource["id"]] = $resource;
if (count($this->prefetch["resource"]) > 0) {
$x = "#".$resource["id"];
$resourceArray[$x] = array_merge($resource,$this->prefetch["resource"][$x]);
// merge the prefetch array and the normal array
}
}
<?php
$rs = $modx->db->query($query);
$docs = $rs->fetchAll(PDO_FETCH_ASSOC);//changed here
//the following line
$tot = count($docs);//$modx->db->getRecordCount($rs);
$resourceArray = array();
for($i=0;$i<$tot;$i++) {
//this one to
$row = $docs[$i];//@$modx->fetchRow($rs);
<?php
function findTemplateVars($tpl) {
//preg_match_all('~\[\+(.*?)\+\]~', $tpl, $matches);
preg_match_all('~\[\[\+(.*?)\]\]~', $tpl, $matches);

) I guess Mark will be happy having part of the job done 
(...) phX and chunkie features are being merged into the modParser class functionality, and phX is now broken into two classes that can be overridden by deployment, context, and/or individual tag element; modInputFilter and modOutputFilter. I need help making this work; the code is at this point completely untested and likely broken (it still references some phX functions that no longer exist and need to be converted to native MODx 0.9.7 API).
First I can create module but not update them (I mean if I’m trying to modify the text area content, my changes cannot be saved)
From the module code if I’m trying to get the site url and base_path the /manager is appended to the value, so I cannot load my files.
Here are the config values from modx->config
[base_url] => /~fredm/modx-0.9.7-2404/manager/
[base_path] => /Users/fredm/Sites/modx-0.9.7-2404/
[core_path] => /Users/fredm/Sites/modx-0.9.7-2404/core/
[site_url] => http://fm.local/~fredm/modx-0.9.7-2404/manager/
[manager_path] => /Users/fredm/Sites/modx-0.9.7-2404/manager/
[manager_url] => /~fredm/modx-0.9.7-2404/manager/manager/
[assets_path] => /Users/fredm/Sites/modx-0.9.7-2404/core/assets/
[assets_url] => /~fredm/modx-0.9.7-2404/manager/assets/
[base_url] => /modxdev/manager/ [base_path] => /Web_Server/modxdev/ [core_path] => /Web_Server/modxdev/core/ [site_url] => http://wwwtest.edb.utexas.edu/modxdev/manager/ [manager_path] => /Web_Server/modxdev/manager/ [manager_url] => /modxdev/manager/manager/ [assets_path] => /Web_Server/modxdev/core/assets/ [assets_url] => /modxdev/manager/assets/
