Firefox PHP

Custom field per thread

Posted by pejot 
Custom field per thread
December 07, 2011 12:28PM
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?
Re: Custom field per thread
December 08, 2011 07:30AM
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
Re: Custom field per thread
December 08, 2011 07:37AM
Yes, but the custom data from custom tables wont be gotten automatically to the thread info will it? Serialized string are useless for searching so I need to do it in additional tables.
Re: Custom field per thread
December 08, 2011 07:42AM
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
Re: Custom field per thread
December 08, 2011 07:54AM
That's what I presumed, many thanks to you :)
Sorry, only registered users may post in this forum.

Click here to login