View Full Version : vB database question
stuuu
01-14-2003, 01:25 PM
Hi,
how would I go about adding a thread to the database without using vB to add it?
I have an audio page and I want to use vB as the comments backend. So when I add the audio clip into my audio database, I also want it to add a thread into the vB database, so users can comment on the audio clip.
I have made a forum where I want all the threads to be made by my audio adding script.
I have had a quick look into it, I assume I will need to add a line to the "thread" and "post" tables of vB? Is that all?
Any info on this topic would be appreciated, thanks :)
Xenon
01-14-2003, 03:59 PM
you have to insert a new row into the thread and the post table, afterwards you have to update the forum counters.
just look at newthread.php there is shown whats needet :)
stuuu
01-14-2003, 10:16 PM
Cheers, I will do. One other quick question about this.
I dont really want the new comments for the audio shown in the "View All New Posts" page on vB, how do I stop that from happening?
Thanks in advance.
stuuu
01-14-2003, 10:19 PM
Ignore that! I'll just hide the forum from everyone cept me.
stuuu
06-04-2003, 04:25 PM
01-14-03 at 06:59 PM Xenon said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=342040#post342040)
you have to insert a new row into the thread and the post table, afterwards you have to update the forum counters.
just look at newthread.php there is shown whats needet :)
finally got round to doing this, i cant see the bit for updating forum counters! anyone help pls! :)
Xenon
06-04-2003, 04:27 PM
it's the line UPDATE forum SET replycoun=replycount+1 ....
cirisme
06-04-2003, 07:38 PM
Doesn't updateforumcounts()(or whatever that function is) do the same thing?
That's what I've been using.
stuuu
06-04-2003, 07:46 PM
Today at 06:27 PM Xenon said this in Post #6 (https://vborg.vbsupport.ru/showthread.php?postid=404373#post404373)
it's the line UPDATE forum SET replycoun=replycount+1 ....
$query = "update forum set replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastposter='".addslashes($postusername)."' where forumid in ($foruminfo[parentlist])");
in that, can i just change:
$foruminfo[parentlist]
to
34
34 being the number of the forum itz going to update.
Xenon
06-05-2003, 05:13 AM
nope, as this wouldn't upgrade the forums one level above it...
you should change it into (34,forumid of it's category)...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.