Template-assisted syntheses of porous metal methylphosphonates