Originally Posted by
CabCon
Is it possible to edit the thread?
Yea, you can edit it now. Back then I put a time limit of 120 minutes on posts, because people received an answer and then cleaned all of their posts, rendering whole threads useless.
Well, I just had an idea and implemented it: just save the old version of the post to a file:
editpost.php line 465, under // ### POST HAS NO ERRORS ###
PHP Code:
{
$postid = intval( $postinfo['postid'] );
$time = time();
//$currentmsg = $vbulletin->GPC['message'];
$posts = $vbulletin->db->query_read("
SELECT pagetext
FROM " . TABLE_PREFIX . "post
WHERE postid = $postid
");
$post = $vbulletin->db->fetch_array($posts);
$text = $post['pagetext'];
$rand = rand(100, 999); // cba to generate a "incremental revision id" now, so just do timestamp+random value
file_put_contents("some_super_secret_folder/{$postid}_{$time}_{$rand}.txt", $text);
}
test
So if somebody deletes all of his posts now, it's easy to restore them. If it would be many posts, I will just write a PHP import script for it. Ideas/better implementation is welcome