When defining hook_theme the choice of argument names that are passed to the theme’s template is important. These argument names share a namespace with some default argument names that are added by template_preprocess. Using any of these names will conflict with the default ones and a potentially wrong argument will be accessed in the preprocessing function and template.
In this example the argument name ‘user’ is in potential conflict:
/** * hook_theme */ function my_module_theme() { return array( 'some_theme' => array( 'template' => 'some_template', 'path' => drupal_get_path('module', 'my_module').DIRECTORY_SEPARATOR.'templates', 'arguments' => array('user' => NULL) ) ); }
To avoid this potential conflict the arguments added by the module can be prefixed with the module’s name so instead of:
'arguments' => array('user' => NULL)
the argument can be named:
'arguments' => array('my_module_user' => NULL)
Alternatively, when there are more than one argument, all the arguments can be encapsulated in one array argument that server as a namespace:
'arguments' => array('my_module_args' => NULL)
where the theme arguments are added as items in an array:
theme('some_theme', array('user' => $my_user));
and then accessed:
function template_preprocess_some_theme(&$variables) { $default_user_arg = $variables['user']; $my_user_arg = $variables['my_module_args']['user'];

Drupal 6: Allow authenticated users to comment anonymously
In a web site where only authenticated users have access to content and comments it may still be required to let authenticated users comment anonymously.
This small module adds the option for the administrator to allow anonymous commenting by authenticated users for specific roles on specific content types.
Where allowed, users get a choice, on the comment creation form, to post their comment anonymously.
Such comments are assigned the anonymous user id but the log will still show the creation of the comment by the authenticated user which makes it a bit less than completely anonymous and allows for some moderation. Within a trusted site membership such feature may encourage more participation with little risk of misuse.
Download Drupal 6 module: anonym_comment.tar.gz