Fix errors during SMF 1.1 conversion to ElkArte

I encountered a number of fatal errors while converting from SMF 1.1 to ElkArte. These are the code fixes that had to be made just to get the conversion to run.

Signed-off-by: Noteworthy Software, Inc <online@noteworthysoftware.com>