PDA

View Full Version : auto reply to a thread...


fly
06-20-2005, 07:27 PM
I didnt know where to put this...

I have some code that auto closes a thread when the rating drops below a certain point. How can I make the code reply to the thread stating why it was closed?

Andreas
06-20-2005, 07:31 PM
Take a look at functions_newpost.php, especially build_new_post() and this Thread (https://vborg.vbsupport.ru/showthread.php?t=61030)

fly
06-21-2005, 12:22 PM
Take a look at functions_newpost.php, especially build_new_post() and this Thread (https://vborg.vbsupport.ru/showthread.php?t=61030)
I'm not very good with code, but I can't see how to make a new post with that. I don't need a whole thread created, just the ability to reply to a thread...

LeeWicKeD
06-21-2005, 12:29 PM
take a look at my topic:

https://vborg.vbsupport.ru/showthread.php?t=83138

i'm working on the ability to autocreate topic. i think creating a reply shouldn't be much more difficult.

maybe the line

build_new_post('thread', $foruminfo, array(), 0, $post, $errors);

is specifing the kind of the post...thread or post. but i don't know if i'm right :)

Andreas
06-21-2005, 12:31 PM
Yes. For a post you would have to put 'post' instead, and array() must be $threadinfo.

fly
06-28-2005, 02:44 PM
Yes. For a post you would have to put 'post' instead, and array() must be $threadinfo.
Ahhh, I thought that *might* be the case, but I saw nothing in file about a build_new_post 'post' option thingie.

So it should read:
build_new_post('post', $foruminfo, $threadinfo, 0, $post, $errors);

Thanks guys! I'll look into this right now!

fly
06-29-2005, 06:01 PM
Ahhh, I thought that *might* be the case, but I saw nothing in file about a build_new_post 'post' option thingie.

So it should read:
build_new_post('post', $foruminfo, $threadinfo, 0, $post, $errors);

Thanks guys! I'll look into this right now!
I'm guessing that I don't understand how the $threadinfo works. I thought I could just set $threadid = to the thread, but yeah Im totally clueless.