vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB database question (https://vborg.vbsupport.ru/showthread.php?t=47711)

stuuu 01-14-2003 01:25 PM

vB database question
 
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

Quote:

01-14-03 at 06:59 PM Xenon said this in Post #2
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

Quote:

Today at 06:27 PM Xenon said this in Post #6
it's the line UPDATE forum SET replycoun=replycount+1 ....
Code:

$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)...


All times are GMT. The time now is 03:47 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.01188 seconds
  • Memory Usage 1,726KB
  • 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)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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