The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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. |
#2
|
||||
|
||||
![]()
Take a look at build_new_post().
|
#3
|
|||
|
|||
![]()
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:
|
#4
|
|||
|
|||
![]()
Sorry for bumping this thread, but I really want to have this fixed.
![]() |
#5
|
||||
|
||||
![]()
There are Hooks
![]() Try newthread_post_start PHP Code:
PHP Code:
PHP Code:
|
#6
|
|||
|
|||
![]()
Thanks KirbyDE, I owe you one!
|
#7
|
|||
|
|||
![]()
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 |
#8
|
|||
|
|||
![]() 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? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|