![]() |
modifying INSERT INTO thread query
Hiya,
I'd like to know IF its possible to modify the INSERT INTO thread query. I've a couple of extra fields when posting a new thread, I'd like to have them being inserted into the database together with the threadtitle, dateline etc. |
Take a look at build_new_post().
|
I had a look in functions_newpost.php, but I can't find a hook overthere?
I've currently done: in newthread_post_start: PHP Code:
PHP Code:
|
Sorry for bumping this thread, but I really want to have this fixed. :)
|
There are Hooks ;)
Try newthread_post_start PHP Code:
PHP Code:
PHP Code:
|
Thanks KirbyDE, I owe you one!
|
Andreas (or KirbyDE!), thanks for the solution to HakkieDEV's query - it works perfectly. Next question focuses on editing!
Could you or anyone else tell me how one would edit data contained in those fields which were added to the thread table? I can load the original field data into the editing form but on submission, I cannot update the thread table. The issue is that the extra field names (e.g. field1, field2) are considered invalid. I think that something like the hook for threadfpdata_start is needed but I'm not sure how to go about this. Any help very much appreciated. W |
Quote:
if ($type == 'thread') { $dataman->setr('field1', $post['field1']); $dataman->setr('field2', $post['field2']); } Andreas - when I use this, it writes the first field fine but won't write the second field. Any ideas? |
All times are GMT. The time now is 05:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|