Tabloid editor sentenced to three years in prison