vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Add a new value id to a new thread? (https://vborg.vbsupport.ru/showthread.php?t=154449)

henrikdam 08-06-2007 11:23 AM

Add a new value id to a new thread?
 
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?...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

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


All times are GMT. The time now is 09:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00933 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete