synch with XoopsCore, replacing dirname(__FILE__) with __DIR__