This also depends on your forum sort order. what would that be?
--------------- Added [DATE]1360212358[/DATE] at [TIME]1360212358[/TIME] ---------------
This should help you A LOT. I am not sure if it needs to go into showthread_start or showthread_complete but the code is sound. may need a bit of tweaking. Hope it helps.
Code:
$current_thread = $threadinfo['threadid'];
$current_thread_forum = $threadinfo['forumid'];
$thread_owner = $threadinfo['postuserid'];
$current_user = $bbuserinfo['userid'];
$forum_id = 2;
if ($current_thread_forum == $forum_id) {
if ($thread_owner == $current_user) {
$query = $vbulletin->db->query_first('set @row_num = 0; SELECT @row_num := @row_num + 1 as row_number,threadid,postuserid,title FROM thread WHERE forumid = ' . $forum_id . ' AND postuserid = ' . $current_user . ' ORDER BY dateline DESC LIMIT 1;');
$position = $query['row_number'];
$display = "This thread is at position: " . $position;
vB_Template::preRegister('SHOWTHREAD',array('display' => $display));
}
}
Then you should be able to use {vb:raw display} in the SHOWTHREAD template.