vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   MySQL queries for posting a new thread (https://vborg.vbsupport.ru/showthread.php?t=41270)

Darth Cow 07-19-2002 07:07 PM

MySQL queries for posting a new thread
 
Hello! I'm interested in what direct MySQL queries would be necesary to add a new thread in the preset forum of my choice, without worrying about any verification, ect. It can be just like a thread made by a Guest, however, it would need to be put into a forum with access for only mods/admins. We (at MTGnews.com) are trying to update our news submissions forms to make new threads for reported news in a special forum. We can format everything into whatever format. I've been trying to edit the newthread.php and what not to do some, but there are several files that need to be edited to allow posting as such and it's a pain largely because we don't want to have to log users out of our forums or cause any other difficulties. Unfortunately, it's not exactly clear what the necessary info is for the queries to insert a new thread/post with a guest acount is, nor how to how to execute them. Maybe someone more experienced with vB knows how to do this? Thanks!

SaintDog 07-19-2002 08:13 PM

Darth Cow, please go to this page and enter your username, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.

Darth Cow 07-19-2002 08:40 PM

Ok, well here's the issue then. I know that we're liscensed, however only the webmaster has the liscense stuff. Before I ask for it, is it possible to have multiple users on these forums on the same liscense? Wouldn't want to lock him out or something... :)

SaintDog 07-19-2002 11:29 PM

Yes, have him goto: this page and enter your username in the form.

- SaintDog

Darth Cow 07-21-2002 05:16 PM

There! I finally got my lazy webmaster to give me licensed access. Now, does anyone know how to help me? :D

Logician 07-22-2002 07:21 AM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=37446" target="_blank">https://vborg.vbsupport.ru/showt...threadid=37446</a>

Darth Cow 07-22-2002 08:45 PM

Quote:

Originally posted by Logician
https://vborg.vbsupport.ru/showthrea...threadid=37446
Thanks, but there's a couple of issues - I want to make a new thread, not reply to an old one and the redirection needs to take you elsewhere, since the news submissions will be going to a hidden form (for non-mods). That's why I was looking for the specific MySQL queries, because I figured that just might be easier then editing newthread.php :).

Admin 07-23-2002 05:32 AM

You basically need two things, INSERT INTO thread and INSERT INTO post. Then you need to updateforumcount() for the forum, and if you are posting as a user, you need to update that user's information (lastpost, total posts, etc.).

Most of the things in newthread.php are NOT expendable.

Darth Cow 07-23-2002 06:00 PM

Quote:

Originally posted by FireFly
You basically need two things, INSERT INTO thread and INSERT INTO post. Then you need to updateforumcount() for the forum, and if you are posting as a user, you need to update that user's information (lastpost, total posts, etc.).

Most of the things in newthread.php are NOT expendable.

Thanks! I seem to have gotten it down to what I figure is the minimum. However, I have one other concern - how do I allow the echoing or leaving of PHP when I'm requiring global.php? Is there anyway to turn off template processing for a page, so that I can just load database/functions/config features that you need to get it basically functioning? I want to be able to do non-vBulletin template powered echoing of information and includes. Thanks :)

Admin 07-23-2002 06:02 PM

You don't need to use the templates, just echo directly as you would with any other PHP file.


All times are GMT. The time now is 07:09 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.01496 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete