omardealo
10-20-2014, 12:59 PM
hello ,
i Create plugin on hook : newpost_process
it job move threads to another forumid when user posted duplicate thread Content.
if(//Condition)
{
$dataman->set('forumid', $vbulletin->options['search_duplicate_thread_forumid']);
}
every thing is okay , but now i needed to update forum counters .
I tried a lot :
// update counters
require_once(DIR . '/includes/functions_databuild.php');
build_forum_counters($vbulletin->options['search_duplicate_thread_forumid']);
build_forum_counters($foruminfo['forumid']);
build_forum_counters($forum['forumid']);
In the end I think it does not work except in the hook : newpost_complete
after threads greated already .
is anyway to make update to forum counters on hook : newpost_process
Or another way to update the forum counters when this condition is true !
i Create plugin on hook : newpost_process
it job move threads to another forumid when user posted duplicate thread Content.
if(//Condition)
{
$dataman->set('forumid', $vbulletin->options['search_duplicate_thread_forumid']);
}
every thing is okay , but now i needed to update forum counters .
I tried a lot :
// update counters
require_once(DIR . '/includes/functions_databuild.php');
build_forum_counters($vbulletin->options['search_duplicate_thread_forumid']);
build_forum_counters($foruminfo['forumid']);
build_forum_counters($forum['forumid']);
In the end I think it does not work except in the hook : newpost_complete
after threads greated already .
is anyway to make update to forum counters on hook : newpost_process
Or another way to update the forum counters when this condition is true !