User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Ask Agaric: Whitespace at the end of lines in a Drupal module or theme?

Is this annoying or a useful feature. My IDE removes trailing whitespace. The disadvantage is that it takes you more time to see the real changes/fixes.

It is a good thing that your editor deletes whitespace at the end of lines, that conforms to coding standards. While your making small typo fixes like that, you should fix the indentation also; I see some things where you removed space at the end but the indentation was left at far too much; each progressive indent should be two spaces (and no tabs used at all).

Semantic Web Firefox Extensions

Half of Agaric, at least, has installed these plugins for Mozilla-based browsers:

For usability, Drupal should focus on the first relevant form field

For a basic, but nice, usability improvement Drupal, for all pages where a form is the center of attention, the first form field that people should type in should have the keyboard focus given to it.

Here's a method for doing it with JQuery: http://www.gerd-riesselmann.net/development/focus-first-form-field-with-jquery

Reviving FOAF (scavanging Walkah's Drupal 4.6-era foaf module)

The release page as of October only showed 4.6 and a HEAD version from the same date (November 13, 2006) and about the same size. (Maybe HEAD was compatible with 4.7, i didn't try to use it, but that's the one examined below).

Here are the parts Agaric found interesting:

From foaf_user (implementation of hook_user), we see the addition of an HTML header and, in the content, a link to a FOAF download:

Find other domains sharing the same IP address

When taking over a site it's always good to check for any domain names the client might have forgotten about. Although shared hosting (or managing multiple clients on a dedicated server as Agaric does) will show all the domains pointing to a single IP address, it's still a useful way to look through and see which may be related, and should follow the site to its new home.

A number of services will do this for you. A good free one is:
http://www.myipneighbors.com/

Resolution

Reinvite module: using the Drupal user_pass_reset_url function

Reinvite module: (mis)using Drupal's core function to generate instant login links for long-lost users.

All the answers we need are in the user password submit function:
http://api.drupal.org/api/function/user_pass_submit/4.7

Backtrace for a weird db_escape_string error on a very old Drupal 4.7 site

<?php
/**
 * Prepare user input for use in a database query, preventing SQL injection attacks.
 */
function db_escape_string($text) {
  global $active_db;
  if (is_array($text)) {  // three lines added for testing
    drupal_set_message('<pre>'. var_export(debug_backtrace(),TRUE) .'</pre>');
  }
  return mysql_real_escape_string($text, $active_db);
}

DrupalCampNYC5 final random notes

San Francisco
semantic library
Plos

looking for developers

open library project

(Then later at the bar PLOS was mentioned again by ....)

for a description of visual photos

tagging photos

someone writes New York

take all these options and make one unified thing

one word or two word or underscore

http://drupal.org/project/autotag

categorizing what color is on a picture

Alternate_login module does not provide a security benefit

Responding to Lauramba's Using Alternate Login Module to Protect Your Site (she doesn't have comments enabled, so in addition to e-mailing through her contact form I'm posting here for posterity).

Hi Laura,

I agree with your post in theory, as in that approach would be a good idea, but alternate_login module doesn't do that– it still allows people to log in with the regular username, so it actually increases the chances people can guess a correct login.

Syndicate content