Quote:
Originally Posted by rmd1
So, did I use the wrong "newreply_" hook? I thought I tried all of them, but the query somehow never got made... Trying "newreply_start" again now...
EDIT: Nope, the query didnt got processed! changing to postdata_start again for now.
|
It could be easy to create your plugin. If you just want to know which hook to use you can explain what you're doing and we'll try to tell you which hook. I only gave you the complicated answer because you asked how to know which variables you can use. Anyway, I think the thing about postdata_start is that you maybe won't be sure that the post is actually saved because it's possible it could fail later. Also, it's possible that that class is used whenever any changes are made to a post, not just when a new one is created. I think maybe newpost_complete would be better. Also, in plugin code using that hook, you can check for $type == 'thread', if it's true it's a new thread, otherwise it's a reply. (See build_new_post() in includes/functions_newpost.php). BTW, I don't know why the newreply_ hooks didn't do anything for you, but I think it would be harder to use one of those hooks because the newreply script is used for a number of functions, and saving the post is only one of them.
Quote:
So if you want to help me with pointing me in the right directions to fasten up the learn process, I would really appreciate it !!
|
No problem, just post here (or in a new thread) when you have questions.