MyBB Community Forums

Full Version: Merge Posts Plugin Hook Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Using the plugin hook '$plugins->run_hooks("moderation_mergeposts");', is it possible to find out the $tid of the new and old threads?

Also a similar question, using 'moderation_split' can I find out the newly created $tid?

Thanks for any help
After your hook function, globalise $tid.
function my_hook() {
  global $tid;
}

This behaviour will be changing in 1.2.7 as the moderation hooks are all being moved in to class_moderation. After 1.2.7 it will be similar to:
function my_hook($tid)
{

Chris
Thanks Chris Smile I'll try that out now.
Chris Boulton Wrote:After your hook function, globalise $tid.
function my_hook() {
  global $tid;
}

This behaviour will be changing in 1.2.7 as the moderation hooks are all being moved in to class_moderation. After 1.2.7 it will be similar to:
function my_hook($tid)
{

Chris

uhh, 1.2.7? 1.2.7 is already out chris, did you mean 1.4? o.0