Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 30 Aug 2014, 17:00
Medi0cr3 Medi0cr3 is offline
 
Join Date: Aug 2014
Newthread.php and saving custom field to database

I'm trying to save data from an input field that I have in newthread template into the database. However, I want it to be in the same row as the newly created thread. However its hard when the thread doesn't exist. I cant find any documentation that EASILY describes how this is done, or how the forum's datamanager works.

A little help would be appreciated!!!
Reply With Quote
  #2  
Old 30 Aug 2014, 17:13
tbworld tbworld is offline
 
Join Date: Oct 2008
Originally Posted by Medi0cr3 View Post
I'm trying to save data from an input field that I have in newthread template into the database. However, I want it to be in the same row as the newly created thread. However its hard when the thread doesn't exist. I cant find any documentation that EASILY describes how this is done, or how the forum's datamanager works.

A little help would be appreciated!!!
You will receive better help if you post your code, since we can get a feel for where you are at and what you are looking for.

I found quite a few references for the datamanager by Googling vbulletin.org using: "vbulletin datamanager forum" as my terms.

vBulletin Manual - Datamanager
https://www.vbulletin.com/docs/html/...nager_advanced
Reply With Quote
  #3  
Old 30 Aug 2014, 17:26
Medi0cr3 Medi0cr3 is offline
 
Join Date: Aug 2014
an Input field. <inpunt name='data'>

some php code to save to a database mysql_query("UPDATE vb_thread SET zevent='$mTime' WHERE threadid='$newT' ", $con);

however ''''WHERE threadid'''' wont exist because the post hastn't been made yet.....

so i have no idea how to do that externally.
Reply With Quote
  #4  
Old 30 Aug 2014, 17:37
tbworld tbworld is offline
 
Join Date: Oct 2008
You should start by looking for a similar modification in-which you can use as a template for your personal code.

Are you looking to create a thread via the datamanager?
Reply With Quote
  #5  
Old 30 Aug 2014, 17:38
Medi0cr3 Medi0cr3 is offline
 
Join Date: Aug 2014
I am simply trying to put some data into my database from an extra field i have in the template.

i have a conditional that only lets the field show up in newthread template with a specific forumid.

At the exact same time my NEWPOST is made, i want the data from the input field to be saved into the database in the same row as the new post.

--------------- Added 30 Aug 2014 at 17:46 ---------------

I found this,
http://www.vbulletin.com/forum/forum...itional-fields

however when he gets to the part that says:
Once you cashed the field variable as described above, you can add it to the post by:

I have no clue what the heck that means without some more Context.
Reply With Quote
  #6  
Old 30 Aug 2014, 18:33
tbworld tbworld is offline
 
Join Date: Oct 2008
I was writing something up when I came across this from @KH99 during a search. Basically it covers everything I was going to suggest, but in an example form (good ol' @KH99).
http://www.vbulletin.org/forum/showthread.php?t=307730

Last edited by tbworld; 30 Aug 2014 at 18:56.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:45.

Layout Options | Width: Wide Color: