Reply to thread

No, they will all work together if you do it correctly (and other developers don't do anything silly)


For example, in MyAddOn_actionIndex, you should read input, filter, etc. whatever you want and then you set like


[php]$conditions['MyAddOn_type'] = "team";[/php]


And then in your MyAddOn_Model_Forum, you should override prepareXConditions too. In this example, you should do something like this


[php]

public function prepareForumConditions(array $conditions, array &$fetchOptions){

$result = parent::prepareForumConditions($conditions, $fetchOptions);

$sqlConditions = array($result);


if (!empty($conditions['MyAddOn_type'])) {

// our condition is set

$sqlConditions[] = 'forum.type = ' . $this->_getDb()->quote($conditions['MyAddOn_type']);

}


// do some other conditions if you want


if (count($sqlConditions) > 1) {

// got more than one, must have some custom conditions...

return $this->getConditionsForClause($sqlConditions);

} else {

// nothing unusual, just return the parent result

return $result;

}

}

[/php]


If all add-ons work this way, they will work together just fine :D


Back
Top Bottom