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.

from ccextras/cc- forums.inc:

        $form = new CCTopicForm( _('New Topic Text'), _('Submit Topic'), $forum_id, true );

from ccextras/cc-topics-forms.inc:

class CCTopicForm extends CCSecurityVerifierForm
        //added this property so that event handlers can behave differently according to forum
        var $_forum_id;
    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 ? :)


Marcus Clements