postbit_display_complete is not in the normal context of most hooks (it is inside the postbit class). You will not be able to use $vbulletin or $db.
Most vBulletin classes still have access to $vbulletin through $this->registry though (and you should use $vbulletin->db, not $db.)
PHP Code:
$this->registry->db->query_read("..")
$bbcode_parser =& new vB_BbCodeParser($this->registry, fetch_tag_list()); #have you require_once()'d the correct bbcode files?
$this->registry->options['maxrepgv']
$this->registry->db->fetch_array($post_query)
$bbcode_parser->parse($reputation['reputation '])