I want to be able to differentiate between forums when handling CC_EVENT_FORM_FIELDS events.
I think the best way is for the CCTopicForm class to have a $_forum_id member which gets set in the constructor.
$form = new CCTopicForm( _('New Topic Text'), _('Submit Topic'), $forum_id, true );
class CCTopicForm extends CCSecurityVerifierForm
//added this property so that event handlers can behave differently according to forum
function CCTopicForm($label_text,$submit_text,$forum_id, $visible_title = false,$show_xlat = true)
//set the forum_id property
$this->_forum_id = $forum_id;
Or is there a better way ? :)