Your post is a great help, I am currently testing it so I can apply similar techniques to my code and although I have it working I have flickering textures.
Did you experience this?
I am facing similar problem in that I need to created a rectangular prismoid except with no base or top.
I can see that the textures are mapped exactly in the way I require, which again points me in the correct direction!