The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
the subforum would be modification hints and tips
as for your problem: hmm, wierd, it seems like you are calling the function files out of the wrong directory. isn't your script located within the forum directory? you may want to add a chdir('..'); before the first require once of your script above. |
#12
|
||||
|
||||
Yes, the test file was outside the directory. Moving it inside did get rid of that, but more have come
Fatal error: Call to a member function on a non-object in ...forums/includes/functions.php on line 259 That line is within the function fetch_phrase, which is used in function verify_post_errors, which is used in this snippet within functions_new_post. PHP Code:
Ok, so $post['preview'] has already been set to 0 in the code I listed in the test file a couple of posts back. Not real sure how to set $_REQUEST['fromquickreply'] to the correct value though. Tracing it back, I think that's a default setting. I'm starting to get the feeling that a manual INSERT might work better, but I'm not giving up yet! |
#13
|
||||
|
||||
wierd, i haven't had any problems, i added the build_newpost to a script of mine myself and it worked flawless (ok not creating a new thread, just post...)
the errormessage you have sounds like you have to add a global $DB_site; at the correct part of your script or better said, does your script include the global.php so the connection to the DB is set up already? |
#14
|
||||
|
||||
... ... ... nope... LMAO! It was there at one point, must've deleted it accidentally! Added that, then re-ran it, got an odd vB error, refreshed, and it went in! Getting an odd error though:
Code:
Database error in vBulletin 3.0.0 Release Candidate 3: Invalid SQL: SELECT CONCAT(newthreademail ,' ', newpostemail) AS newpostemail FROM forum WHERE forumid IN () mysql error: You have an error in your SQL syntax near ') ' at line 4 mysql error number: 1064 Code:
require_once('./global.php'); require_once('./includes/functions_newpost.php'); require_once('./includes/functions.php'); require_once('./includes/functions_login.php'); $foruminfo['forumid'] = 10; $threadinfo['open'] = 1; $threadinfo['visible'] = 1; $threadinfo['title'] = '3rd'; $post['title'] = 'sdfsdfsdf'; $post['message'] = 'This is the message stuff'; build_new_post('thread', $foruminfo, $threadinfo, 0, $post, $errors); verify_post_errors($type, $post, $errors); I've also found out that it uses the cookie's session to use my username/id, not the one in the test file. I was wondering if there's a way to have it log out the user, log in with the Bot's Username/PW, then after it's done, log out. Would probably be easier for the poster to just log out of their user name and login to the bot's acct. BTW, I take it back about what I said about their code comments, was looking around the vb.com site, and found the pdf with the ERD for the database... WOAH! I'll wait to see vB3 final to see what code comments they say... |
#15
|
||||
|
||||
replace the code
PHP Code:
PHP Code:
as for your second question. if you just use the init.php instead of global.php i think it doesn't use your account, but does create the thread as well. (but i don't give guarantee for that ) |
#16
|
||||
|
||||
I am glad to see this thread because I am working on a hack that will be posting new threads and posts as well. Right now I am looking at your code and upon testing it out for myself I have two problems I can see. First I get a dberror:
PHP Code:
|
#17
|
||||
|
||||
Ok. I have created a thread! Woot. Now, I have to figure out how to go around the cookie problem. It is still posting as a different user than what I have hardcoded into it. The next step is how to post a new post in the thread that was just created.
|
#18
|
||||
|
||||
Quote:
Now, to fix the userid problem. |
#19
|
||||
|
||||
Ok. Update. When using the init.php and bypassing global in hopes of the bbuserinfo not taking over I am getting an invalid posthash as a result:
PHP Code:
|
#20
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|