I'm working on userhome, a module that would allow /~username or /username paths to show a per-user homepage. The module needs to be set as the "default front page", so that it doesn't have to maintain a separate alias table.
If this has already been implemented elsewhere, please let me know so I don't reinvent things.
As planned (and mostly working now), userhome.module would relay such paths to an admin-defined node (or render a custom page, as things may yet turn out) as the user's homepage. Currently I've set the default node to blog. It will also work for things like /~username/guestbook, /username/image and so on.
I was wondering: is there a common hook/function for modules that returns their user-specific content? So far, I've seen some modules with *_page_user, but this doesn't seem to be a global convention.
If not, I'd like to suggest a future hook such as *_user_block that simply returns the main HTML code for that module's user-specific content, with no headers or footers.
The first parameter to this hook would be the uid, and the rest would be passed as-is from the remainder of the path. Modules would need to make sure there are default values for any extra parameters -- for instance, guestbook.module doesn't seem to set its default $limit set (at least in the latest version I saw).
What do you think? I'll clean up/finish the code and link to it here, and/or upload to CVS once my account is approved. ;)