Post handler - Printable Version
+- MyBB Community Forums (http://community.mybb.com)
+-- Forum: Resources (/forum-8.html)
+--- Forum: Plugins & Code Modifications (/forum-73.html)
+---- Forum: Development (/forum-68.html)
+---- Thread: Post handler (/thread-114493.html)
Post handler - Mr Josh - 03-05-2012 12:46 PM
How do I create a post with the post handler located in inc/datahandlers/post.php
Is there a documentation or something?
RE: Post handler - ranjani - 03-05-2012 12:58 PM
you may trace a couple of plugins related to automatic posting .. eg. welcome topic , advanced reports ..
RE: Post handler - Euan T - 03-05-2012 03:58 PM
Something along this sort of lines ought to work, though I haven't tested it:
RE: Post handler - seeker - 03-06-2012 03:47 AM
(03-05-2012 03:58 PM)euantor Wrote: Something along this sort of lines ought to work, though I haven't tested it:
I will test it ASAP, thank you euantor.
If you ever find the time, could you please post similar code for a new thread?
RE: Post handler - Beardy - 03-06-2012 05:12 AM
Code for inserting a new thread is a lot similar to the code for inserting a new post (pieced together from newthread.php, also untested):
Also, for future reference, if you have a program that is able to search across multiple files (like Notepad++'s find in files feature), you can search for a function and see how it has been used across the mybb core or in other plugins.
In this case, searching for something like '$posthandler->insert_' would show up both cases where the $posthandler was used to insert new posts and threads.
RE: Post handler - seeker - 03-07-2012 06:53 AM
"...a program that is able to search across multiple files..."
I've searched through the code many times, but having both these here is a good way to save time.