11
I don't know the database structure for the comments at the moment. But I think it must be possible to alter that table and add a new field for "username".
Then if the user isn't logged in, he gets displayed an input field for the username. In the database the comment has to be saved as an anonymous comment with the additional username.
When displaying the comment, and the userid is anonymous, you can read the content of the username field and display it. For normal registered users it will get the username from the XOOPS users table.
Could it be so easy?