Text this: An efficient spectral approximation for solving several types of parabolic PDEs with nonlocal boundary conditions