PDA

View Full Version : Custom Fields on New Thread?


Abhik
02-12-2012, 12:02 PM
Hello,
I want to add two custom text fields on new thread which will be saved to database for that thread while posting that thread.

And, then I want to call those two fields in showthread.

How can I do that?

I already created two text fields using a plugin at newthread_start hook and they are showing on while creating a new thread.

NB: I followed this tutorial (https://vborg.vbsupport.ru/showthread.php?t=237982), but that one is saving the values with post, not database and that's creating some problems.

Thanks

Lynne
02-12-2012, 05:28 PM
That article talks about adding it to the database also.

Abhik
02-12-2012, 05:32 PM
That article talks about adding it to the database also.
Amm!! Can you please tell me which part is that?
Sorry for being such a nerd, but I am new to coding.

Also, how can I call the values in a custom template?
Thanks

Lynne
02-13-2012, 12:30 AM
Well, he just says "Add additional fields values to post/database" He shows and example of adding it to the post message. If you want it in the database, then you will need to add the field to the database and to the datamanager. I know there are other examples of doing that around here if you don't know how to do that.

Abhik
02-13-2012, 03:43 AM
Well, he just says "Add additional fields values to post/database" He shows and example of adding it to the post message. If you want it in the database, then you will need to add the field to the database and to the datamanager. I know there are other examples of doing that around here if you don't know how to do that.
Can you please guide me to such an tutorial?
Thanks

Lynne
02-13-2012, 08:22 PM
You really should look through the articles forums. There is a ton of information in there. Just a couple here:

Datamanagers: Objects as Data and Methods (https://vborg.vbsupport.ru/showthread.php?t=174090&highlight=datamanager%2A)
[HOW TO] Add custom fields to new threads (https://vborg.vbsupport.ru/showthread.php?t=114249&highlight=field%2A)