View Full Version : Addon - Reports via posts
PWillard
09-07-2011, 04:18 PM
im trying to come up with a custom solution so that if someone reports a thread this addon would make a post inside a thread containing the reported data.. it seem to work alright but once you click submit you go to the next page and all you see is one million errors.. if someone can point me in the right direction I would really appreciate it..
http://pastebin.com/Vp6JMFJr
or raw
http://pastebin.com/raw.php?i=Vp6JMFJr
I don't know if I understand it all, but there's something wrong with this section:
Originally Posted by . $vbulletin->userinfo['username
. ']' .$vbulletin->GPC['reason'] .'
I think what you want is something like:
Originally Posted by ' . $vbulletin->userinfo['username'] . '
'.$vbulletin->GPC['reason'] .'
PWillard
09-07-2011, 06:34 PM
I have updated the post code because vbulletin was messing it up with code tags.. let me know..
Lynne
09-07-2011, 07:14 PM
What are a couple of the one million errors you are getting?
PWillard
09-07-2011, 07:40 PM
you can try it out for yourself and see.. I also tested commenting out the print_r and exit, no luck..
errors like this
Fatal error: Existing data passed is not an array
Called set_existing in [path]/includes/class_dm_threadpost.php on line 582
Called post_save_each_post in [path]/includes/class_dm_threadpost.php on line 819
Called post_save_each in [path]/includes/class_dm.php on line 917
Called save in [path]/includes/class_dm_threadpost.php on line 797
Called save in [path]/report.php(131) : eval()'d code on line 55
Called eval in [path]/report.php on line 131
in [path]/includes/class_dm.php on line 265
#0 vb_error_handler(256, Existing data passed is not an array
but somehow showing one million errors it does work good..
When you call set_info() in these two lines:
$dataman->set_info('thread', 6);
$dataman->set_info('forum', 2);
They are expecting $foruminfo and $threadinfo arrays as the data, not ids. That's what's causing the errors later. But if you say it's working in spite of these errors, then you may want to try just commenting out those lines and seeing if it works without them.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.