The magnetic and transport properties of template-synthesized carbon-based and related nanomaterials