Ford Ranger p0171 code?

I have a 97 2.3 liter ranger with the p0171 code. It idles rough when I'm driving between 30 and 45 mph. I changed the front o2 sensor and it didn't fix the problem. Any idea of what it is before I take it to have it looked at? I also checked the hoses and didn't see any cracks.

thebax20062016-03-31T07:49:16Z

Bad intake gasket causing a vacuum leak.
Bad MAF sensor

Anonymous2016-03-30T16:40:38Z

A weak fuel pump or clogged injectors is the likely cause. See a mechanic with a scan tool and check fuel trims and check fuel pressure and fuel flow rate.

J E T H R O2016-03-30T14:33:31Z

http://www.aa1car.com/library/ford_lean_codes.htm