Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Additional fields in discussion
Hi a need to add 2 additional fields to Discussion.
I’ve already added 2 fields in LUM_Discussion database table (they are varchar fields)
I’ve edited form in themes/discussion_form.php and addedt two additional textareas
And have added them in library/Vanilla/Vanilla.Class.Discussion.php
But they are not stored in database anyway.
Where else should I add them to work properly?
0
This discussion has been closed.
Comments
instead of modifying in appg folder, you should modify the correspondent file in the conf folder, which won't be overwritten when updating, etc.
if you need to add more fields to a core class, maybe it's better considering writing a class extension and then setting the reference to that new class via the object factory (being this the last solution)
there are extensions out there that add custom fields without having to modify the class. in fact, with a couple of delegates, you can hook a function to store the new field info when saving the discussion to the DB and another function to retrieve the fields values from the DB when displaying the discussion.
hope it helps