To convert that basic triplanar shader into one that does the full PBR is a bit more work than just adding a “few” lines. There’s quite a few inexpensive assets in the store that do triplanar mapping using Unity 5’s PBR shading, I would suggest getting one of those.
You should read that thread you linked to, it includes an example triplanar surface shader, as well as an explanation as to why you shouldn’t use it.
A surface shader is a vertex fragment shader generator; you can have a surface shader that expands into several vertex fragment shader passes, or you can have a vertex fragment shader, you can’t mix and match individual parts as a surface shader is always going to generate both the vertex shader and fragment shader parts of a vertex fragment shader pass.