A two-dimensional porous framework: solvent-induced structural transformation and selective adsorption towards malachite green.