Custom field per thread
Posted by pejot
|
Custom field per thread December 07, 2011 11:28AM |
Registered: 1 year ago Posts: 3 |
Hi,
I'm starting a phorum integration with an existing website, there is some concer that I want to get rid of in terms of integration issues:
- I need to have a custom field on a PER THREAD basis, If I understand correctly, this can be achieved by creating a MOD with a function listening to the thread creation event and inserting the custom data. I'm unsure about how to get the additional field next to the title though the system, do I just use the $_REQUEST? I'm also unsure on how to get the data out to the thread, I presume a 'after read' hook and inserting of custom data in the response table?
I'm starting a phorum integration with an existing website, there is some concer that I want to get rid of in terms of integration issues:
- I need to have a custom field on a PER THREAD basis, If I understand correctly, this can be achieved by creating a MOD with a function listening to the thread creation event and inserting the custom data. I'm unsure about how to get the additional field next to the title though the system, do I just use the $_REQUEST? I'm also unsure on how to get the data out to the thread, I presume a 'after read' hook and inserting of custom data in the response table?
|
December 08, 2011 06:30AM |
Admin Registered: 10 years ago Posts: 8,791 |
In 5.2 there are no real custom fields per message or thread (these were added in 5.3) but you can use the message meta data to store additional data (see [www.phorum.org] ).
I don't see the "integration" issue here though as that has nothing to do with authentication or alike.
There are a couple of hooks to use for that purpose and you should either use the hook-input (which can be found in their docs) or the $_POST array, whenever needed.
I don't get what you mean with "get the data out to the thread". If you just want to display it, show it in the template. The meta-data is available there.
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
I don't see the "integration" issue here though as that has nothing to do with authentication or alike.
There are a couple of hooks to use for that purpose and you should either use the hook-input (which can be found in their docs) or the $_POST array, whenever needed.
I don't get what you mean with "get the data out to the thread". If you just want to display it, show it in the template. The meta-data is available there.
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
|
Re: Custom field per thread December 08, 2011 06:37AM |
Registered: 1 year ago Posts: 3 |
|
December 08, 2011 06:42AM |
Admin Registered: 10 years ago Posts: 8,791 |
no separately stored data which is handled manually will not be automatically loaded anywhere without doing it in a module.
Use the read hook to load data there.
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Use the read hook to load data there.
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
|
Re: Custom field per thread December 08, 2011 06:54AM |
Registered: 1 year ago Posts: 3 |
Sorry, only registered users may post in this forum.