my no Display function
Code: Select all
function noDisplay()
{
$args = func_get_args();
foreach ($args as $a) {
if (isset($this->fields[$a])) {
$this->fields[$a]['noDisplay'] = true;
}
}
}
Code: Select all
/**
* Handles viewing a row
*/
function handleView($id)
{
$quotedId = $this->dbQuote($id);
foreach ($this->fields as $f => $v) {
if (empty($v['noDisplay2'])) {
$fields[] = $f;
}
}
/**
* Data filters
*/
if (!empty($this->dataFilters)) {
$filters = implode(' AND ', $this->dataFilters);
} else {
$filters = 1;
}
$fields = implode(', ', $fields);
list($tables, $joinClause) = $this->getQueryTables();
$row = $this->dbGetRow("SELECT $fields FROM $tables WHERE $joinClause AND $filters AND {$this->pk} = $quotedId");
if ($row === false) {
$this->errors[] = 'Failed to find specified row';
return;
}
$this->parseResults($row);
I talked to the guy who wrote the script and all he says is
If it's the same field all the time, there's something like "hiddenColumns". If not, then define a callback function using AddCallback(). This function ia called just before each row is displayed so you can do anything you want to the row. The row data is passed as an arg. Use this for example:
Code: Select all
function RowCallback(&$row)
{
// Manipulate the row here
}
I've been ripping my hair out over this so help is GREATLY Appreciated