Index: branches/5.3.x/units/topics/topics_event_handler.php =================================================================== diff -u -N -r15924 -r16397 --- branches/5.3.x/units/topics/topics_event_handler.php (.../topics_event_handler.php) (revision 15924) +++ branches/5.3.x/units/topics/topics_event_handler.php (.../topics_event_handler.php) (revision 16397) @@ -1,6 +1,6 @@ Application->LoggedIn() ) { + return; + } + $config = $event->getUnitConfig(); $fields = $config->getFields(); @@ -303,4 +307,37 @@ $manager->subscribe(); } } - } \ No newline at end of file + + /** + * Adds fields for forum preferences. + * + * @param kEvent $event Event. + * + * @return void + */ + protected function OnModifyUserProfileConfig(kEvent $event) + { + $checkbox_field = array( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'default' => 0, + ); + $text_field = array('type' => 'string', 'default' => ''); + + $new_virtual_fields = array( + 'show_sig' => $checkbox_field, + 'Perpage_Topics' => $text_field, + 'Perpage_Postings' => $text_field, + 'owner_notify' => $checkbox_field, + 'bb_pm_notify' => $checkbox_field, + 'bbcode' => $checkbox_field, + 'smileys' => $checkbox_field, + 'bb_signatures' => $checkbox_field, + 'my_signature' => $text_field, + ); + + $config = $event->MasterEvent->getUnitConfig(); + $config->setVirtualFields(array_merge($config->getVirtualFields(array()), $new_virtual_fields)); + } + + }