drupal

How to: Enable contact information and remove anonymous

It annoys me that drupal display anonymous as commentor's name and no persoanl info is required. I spent some time on hacking this up, here is how:

  • Go to the content type you desire to enable comments, locate comment settings and choose " Anonymous posters must leave their contact information". This will translate the comment form into a full-blown form with "Your name", "E-mail", "homepage" and
    "comment". Nice! However, your name still uses anonymous. Our goal is to get rid of it.
  • Piece of cake with jQuery. shuvuu posted a nice solution on http://drupal.org/node/240610, basically apply the following code which finds the edit-name then clear its value.
       
       

    Inject the above code into page.tpl.php, you are all set.

Where is my drupal login page?

I constantly forget drupal login url, (by default, unless you have built custom aliases) /admin will simply shows a 403 (access denied) and /login returns a 404 (page not found), which is great from the security perspective.

The following are its login urls:
/user
/?q=user
/?q=user/login

For personal blogs and small company sites, a good security practice is to grant access to a group of whitelisted users and deny the rest. In case you don't know, you can easily achieve this task in drupal, administer-> user management -> access rules. Below is my access rules, I only allow myself and blocks anyone else, which is represented as a percentage sign (%).

drupal access rules

^ Top of Page