I used the code based off someone's plugin posted a few pages back. I removed the time checking so it would always merge their last post, however it would update all the times so it acted as if it was a new post in the thread.
In the postdata_presave I added the following with all the other set's:
PHP Code:
$this->set('dateline', TIMENOW);
Here is all of my code in the postdata_postsave, you can see how you have to update both the thread time & forum time:
PHP Code:
if ($this->isdoublepost)
{
// Add Edited By Note
$this->dbobject->query_write("
REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason)
VALUES (" . $this->fetch_field('postid') . ", " . $this->fetch_field('userid') . ", '" . $this->dbobject->escape_string($this->fetch_field('username')) . "', " . TIMENOW . ", '" . $this->dbobject->escape_string('Automerged Doublepost') . "')
");
// Update Last Posted In Thread
$thread =& datamanager_init('Thread', $this->registry, ERRTYPE_SILENT, 'threadpost');
$thread->set_existing($this->info['thread']);
$thread->set('lastpost', TIMENOW);
$thread->set('lastposter', $this->fetch_field('username'));
$thread->save();
// Update Last Posted In Forum
$forumdata =& datamanager_init('Forum', $this->registry, ERRTYPE_SILENT);
$forumdata->set_existing($this->info['forum']);
$forumdata->set_info('disable_cache_rebuild', true);
$forumdata->set('lastpost', $this->fetch_field('dateline'));
$forumdata->set('lastposter', $this->fetch_field('username', 'post'));
$forumdata->set('lastthread', $this->info['thread']['title']);
$forumdata->set('lastthreadid', $this->info['thread']['threadid']);
$forumdata->set('lasticonid', ($this->info['thread']['pollid'] ? -1 : $this->info['thread']['iconid']));
$forumdata->save();
// Set Redirect
$postid = $this->fetch_field('postid');
$this->registry->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$postid#post$postid";
eval(print_standard_redirect('redirect_doublepost', true, true));
}
The reason the forum & thread do not get updated is because an "edit" creates the $this->condition and thus the other two queries will not run automatically.
Hope this helps.