![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
New Thread and database
Where is the parts of the code in newthread.php that calls the newthread function to save data into the database. I want to make my own input field and save it to the thread database where i have my own fields when I click on POST A Thread.
or Does anybody have any suggestions about how to have it submit the new thread and instead of it redirecting you to the new thread, it redirects you to a custom template i have where I can recall the new thread and then insert the data into the database this way. I'd rather do the first way, but i'm clueless about how that part completely functions. ![]() No members have liked this post.
|
|
#2
|
||||
|
||||
|
Originally Posted by Murtific
The actual code that writes to the thread table of the database is in includes/class_dm.php, but you probably want to look at includes/class_dm_threadpost.php. Around line 926 there's an array with a list of fields in the thread table. You might be able to use a plugin on hook location threaddata_start to add to that array (you'll have to actually modify the db and add that field to the table yourself).
That code is used in includes/functions_newpost.php in the build_new_post() function, so you'd have to add code to set your new field. build_new_post() is called from newthread.php, so you'd probably need to add code there to get your new field from the form data and put it in $newpost to be passed to build_new_post(). I know that's a short description of something that's not obvious, but I hope it helps. No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 03:06.




