Fix #379 User(s) browsing this thread incorrect when linking to post

There are a few changes here, but the main one is setting `$array[2]` to `$post['tid']`. I've also removed some pid logic as we don't seem to need it.