In profile.php find this:
Code:
$userdata->set('signature', $signature);
and add before it:
Code:
if(empty($vbulletin->userinfo['signature']))
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET showsignature = '1' WHERE userid='" . $vbulletin->userinfo['userid'] . "'");
}
This will automatically add signature to old posts if user has just set a signature and signature was empty before.