What is the best way to add extra fields to forums?

Razasharp

Well-known member
What are your thoughts on the best way to add extra fields to forum sections (/nodes)? They will contain a short string. And could you call these values in templates easily - perhaps with something like; node.my_field ?

Also, is it really hacky to simply create and set new columns in the DB directly via mysql prompt?
 
The most easy thing is to add one field while not using node descriptions. In that case you just use the description field as your custom field.

Then you also could add a row on xf_node.

Or, better (and more difficult): create your own table and join it with the general node table.

Even better would be to only do this for special node_types (so only forums, not forum links).
 
Thanks Marcus. I think we'll need to keep the node descriptions tho. I know it's hacky but I might just add them to the table - I just need to make sure I can call them easily with something like node.my_field
 
Top Bottom