PDA

View Full Version : Add a new value id to a new thread?


henrikdam
08-06-2007, 11:23 AM
Hi guys,
I want to be able to add an extra id to a new thread, and save it along with the other thread info in the mysql database when the users submits the new thread.
It should work like this, so when they click the link to open a new thread:
http://www.mysite.com/newthread.php?do=newthread&f=1&extraid=5000
it would add the value "5000" in a field in the database when they submit the thread.

My trouble is I don't know where in the codes the values are inserted in the database. I can see that vBulletin is not working like "normal" php which I am used to work with. Then it would just be something like "INSERT INTO".

I hope you can help me. It should be pretty simple if you just know where to put the right values.

Kind regards
Henrik

Marco van Herwaarden
08-07-2007, 07:39 AM
It might help if you could give a bit more info on what you are trying to achieve.

In order to add a new column, you will need to write a plugin that adds this value to the DataManager (DM) object. The following article might also help: [HOW TO] Add custom fields to new threads (https://vborg.vbsupport.ru/showthread.php?t=114249)

henrikdam
08-07-2007, 09:38 AM
Hi Marco,
Thanks a lot for this reference. It solved my problem! :)

I used the plugins and codes by member jaybolt, and with some minor modifications this works perfectly for my system.

Thanks again.

Kind regards
Henrik