Oskar20x2
09-10-2016, 12:39 PM
I need some help, the plugin works well if you moderate only 1 thread, but when you select 2 or more threads only adds the first.
How captured values array of threads and userid?, this is my code:
hook: inlinemod_approvethread
require_once(DIR . '/includes/points.php');
global $thread;
$post = fetch_postinfo($thread['firstpostid']);
$words = $post['pagetext'];
$words = strip_bbcode($words, true);
$words = preg_split('/\s/', trim($words));
$words = sizeof($words);
$user = $thread['postuserid'];
add_points('PointsThread', $words, $user);
Sorry for my English...
How captured values array of threads and userid?, this is my code:
hook: inlinemod_approvethread
require_once(DIR . '/includes/points.php');
global $thread;
$post = fetch_postinfo($thread['firstpostid']);
$words = $post['pagetext'];
$words = strip_bbcode($words, true);
$words = preg_split('/\s/', trim($words));
$words = sizeof($words);
$user = $thread['postuserid'];
add_points('PointsThread', $words, $user);
Sorry for my English...