A porous thermoelastic diffusion theory of types II and III