Reply to comment

Looks nice. I've been

Looks nice. I've been thinking of throwing something like this together myself for my own site.

Some comments:

  1. "Disclaimer" is the wrong word to use here. To disclaim is to absolve one's self of legal responsibility or privilege, which is not quite what your module's doing. Maybe something like "Comment warning" would be better.
  2. In various places in your code, you're adding items to arrays without initializing them first. The fact that PHP lets you do this is one of the biggest anti-features in computer programming history. (And for those who have strict error reporting enabled on their PHP interpreter - and when you're coding, you really should that enabled - it will cause a visible error.)
  3. In your hook_help() function, you shouldn't concatenate several t() lines like that. Instead, put the whole thing inside a t(). Also, @user-management should be !user-management - we don't want t() to try to escape characters in paths.
  4. Finally, there's some style issues with regards to the comments and the if/else block in hook_form_alter. Check out the Coding Standards page on D.o.

All in all, not bad for a first module… definitely a better start than some of my first hackjobs.


Please refrain from adding URLs to unrelated or commercial websites. This site is moderated and comments with inappropriate links are rejected. Thank you for your understanding.
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options