The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
||||
|
||||
Basic code to post a new thread (as any user you want):
PHP Code:
|
#22
|
||||
|
||||
Quote:
As for the rest, Finally no errors! Wait.... yep, found one! This one's minor though, can be taken care of with the bot account. For some reason, it auto subscribes me to the threads created with that script, yet not when I make one normally. Are you being auto subscribed to your threads? Then again, not sure I want massive amounts of subscriptions in the bot's acct. Yes, auto subscribe for the acct is turned off. Next thing to tackle is an if stmt in the postbit that if picture is part of data, pic will be displayed in the thread. That's cake, but I've been experimenting with pics and text in a post. Only way I can figure out a way to wrap the text around the pic is with table cells. Crude, but should work just fine. Next thing I'm going to be working on is how to grab the newly created threadID (maybe even post ID) after the thread/post is made. I'm also looking into how to auto create a forum/sub forum, but for security reasons, I think I might not let the bot have this access, and find out how to do it with normal mySQL statements. Any suggestions/tips? |
#23
|
||||
|
||||
Quote:
$DB_site->insert_id(); |
#24
|
||||
|
||||
Kirby, thanks! That's solved the posterid prob, but it also auto-subscribes the account to the thread.
$DB_site->insert_id(); hhmm.... not quite sure how that's supposed to be used. Mind giving me an example, or a place in the vB code (or a thread here) that explains that? |
#25
|
||||
|
||||
Quote:
PHP Code:
|
#26
|
||||
|
||||
Thanks as well version2! BTW, I'm grabbing the threadID after it is created automatically so that I can place it into another table I created, so that another page will auto-create links to certain threads based on other criteria.
|
#27
|
||||
|
||||
Quote:
PHP Code:
|
#28
|
||||
|
||||
@Wired1:
PHP Code:
If you use this function to create the thread you can use $post['threadid'] and $post['postid'] afterwards - the ID's will be there. |
#29
|
||||
|
||||
Wahooo!!!!! Now to understand $DB_site->insert_id();
|
#30
|
||||
|
||||
But I can only use $post['threadid'] and $post['postid'] after the build_new_post is hit in the code, correct? I think that'll save me 1 query
This look right? PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|