1988 ford ranger. 156,000 miles. Manual.
Fuel pump at tank caught fire, and melted electrical connections.
I have replacement in tank fuel pump.
The truck wiring to the fuel pump is 4 wires: Black, Yellow, Orange, Orange with black stripe...
(the original fitting melted down & I am attaching a new fitting to the above colored wiring).
The replacement in tank fuel pump electric connections are Black, Red, Blue, & 4th connection has no wire going to it (????)
How do I know which to connect??
1)Black to Black
2)Yellow to ????
3)Orange to ????
4)Orange with black stripe to ????
On the Fuel Pump Module connector wires:
Red is fuel pump motor Power
Black is the Ground for the Fuel Pump motor.
Blue is for the Fuel Gauge.
That 4th Fuel Pump Module connector pin with no wire going to it is the fuel gauge Ground. It doesn't have a wire because it's Grounded directly to the fuel pump module assembly.
I don't know what brand of fuel pump you bought, but if you look at a Delphi you can see how it's wired.

So that takes care of the Fuel Pump Module side of the wiring.
Now for the Harness side. (The side that you're wiring a connector to).
It's going to take a little detective work.
What you know is that 2 of those wires are Grounds (and I suspect they share the same Ground Point on the Frame Rail).
One of the other wires is Power to the Fuel Pump Motor.
and, One of those other wires goes to the Fuel Gauge.
There's a couple of ways you can go about this but even if you establish which two wires are the Grounds, you'll still have to determine which of the other two wires are which.
So I'd start with them... here we go:
Typically, the Power and Ground wires for the Fuel Pump Motor will be heavier gauge wires (thicker) than the Fuel Gauge wires.
I think your '88 Ranger has 2 fuel pumps. (a high pressure pump on the driver's side frame rail and the one in the tank).
If so, the Fuel Pump Motor's Power wire is the same wire color that's Powering your high pressure fuel pump so that makes it easy to identify the wire color.
If you don't have 2 fuel pumps on yours, or if you just can't see the wiring color, there's another way to determine which wire is the power wire to your fuel pump motor.
Grab a test light and clean up a good Ground Point on the frame to attach the alligator clip of the test light to.

When the Key is turned to ON, Power will be provided to the Power Wire for the fuel pump motor for a couple of seconds.
I remember the Rangers as using a Pink/black wire for power to the fuel pump but you didn't mention that wire color.
I'd begin with either the Orange/black stripe wire or the Orange wire.
So alligator clip of the test light on a clean Ground, and the test light's probe on the Orange/black wire, have somebody turn the Key to ON. The test light should light up for a couple of seconds and then go out.
Have them do it again. Turn the Key to Off. Then turn the Key to ON again. The test light has to light up for a couple of seconds and then go out.
If that's not the right wire, try the Orange wire.
It's important that the test light goes out after a couple of seconds because you don't want to confuse it with the Fuel Gauge wire.
So when you determine which wire does that, you'll know the connector pin for that wire, (on the harness side of the fuel pump connector) has to correspond with the connector pin for the Red (fuel pump Power wire) on the fuel pump module connector side.
One down, three to go.
Next is the Fuel Gauge wire.
The fuel gauge shows Empty when there's higher resistance to Ground and Full when there's lower resistance.
So one by one, touch those other 3 wires to a clean Ground Point on the frame.
With the KEY ON, one of them will make the Fuel Gauge shoot to Full when you do that.
The connector pin for that wire (on the harness side of the fuel pump connector) has to correspond with the connector pin for the Blue (fuel gauge Sender wire) on the fuel pump module connector side.
Two down, two to go.
These last two are Grounds. Like I said, they both break out of the harness and probably share the same Ground point on the frame. (probably not too far from the fuel tank).
But while you're here with your test light and since you had a fire in the wiring, it's best to test those Grounds.
Attach the alligator clip of the test light to POSITIVE battery voltage somewhere and touch the test light's probe to both of those Ground wires. Make sure the test light lights brightly.
If one of those Ground wires is heavier gauge (thicker) then make sure you wire the harness connector so that it corresponds with the Black fuel pump motor ground wire on the fuel pump module connector.
If they're the same gauge wires then it doesn't matter (since they share the same Ground Point on the frame)
Aftermarket pumps usually don't follow oem color schemes, however they come with a wiring diagram to tell you which wire is what.
If a wire is missing you probably got a junk unit. Try heading back to the parts store & see if another unit/brand is the same.