SMF 2.1.X portal modification (ported from SImple Portal 2.3.6)