The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP make thread
Hi, I've made this today:
http://spawnscape614.co.uk/forums/reportuser.php And I'm looking to taking these inputs and then make a thread based off this information. I'll obviously validate it so that you must be logged in to see to use the form although , via the SEND button which you see what's the most basic method for this? I've seen the function on VB where you can automatically make a thread when a user reports a thread; so I only assume that it would be similar? |
#2
|
||||
|
||||
One of my products auto-creates a thread, and here is the code that actually handles creating the thread:
PHP Code:
|
#3
|
|||
|
|||
Thanks! Could you help me with configure this. I've pmed you.
|
#4
|
||||
|
||||
I failed to mention before that you will need this line before using the data manager:
PHP Code:
|
#5
|
|||
|
|||
Hiya
So far: (relevant part) PHP Code:
|
#6
|
||||
|
||||
Okay, aside from the file you need to require that I posted in #4, it looks to me that you will need to pass the forum and thread information to your sendReport function. Also, you will need to initialize many of the variables being used. You don't need the if block regarding the thread prefix.
It appears you get a username from the form, so you will have to query the user table to get the corresponding userid. Any data needed by the function will either have to be global or passed as parameters (which I recommend). |
#7
|
|||
|
|||
Quote:
|
#8
|
|||
|
|||
^^ the user logged into the forums. I'll make it so the user must be logged in.
So what exactly is the function that sends a request to make a thread? |
#9
|
||||
|
||||
Okay...who will be the author of the auto-created thread?
|
#10
|
||||
|
||||
Well, you can use the datamanager (as I did) or you can write directly to the "thread" table to insert a new row. In either case you still want to update the counters.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|