Add newbb_thread template, fix xoops code style