$thumbnail = generate_thumbnail(MYBB_ROOT."uploads/".$attachment['attachname'], MYBB_ROOT."uploads/", $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);
As you can see that code expects the attachment to be in the default directory. However we have a setting for that ($mybb->settings['uploadspath'])
Support PMs will be ignored!