I would like to setup a different background image for each user. (My site only has 10 users max.)
I am not sure how to accomplish this. I could duplicate my theme 10 times and assign one theme per user, but that seems that a waste of resources when all I need is a custom background image.
Question: How can I get Drupal inform me of ALL inserts it is performing into /sites/default/files/?
I have implemented within my module hook_file_insert().
When I upload an image Elephant.jpg, then Drupal calls this hook with file information of uri containing public://field/image/Elephant.jpg, and this file exists within sites/default/files/field/image.
I had a little trouble installing and using drush on 1and1, and I wanted to post back the solution that worked for me. It's taken right from drush installation notes, but like all things opensource, it's good to spread the SEO to specifically 1&1 hosting which defaults php interpreter to php4. Drush needs php5.
Per the instructions, just force php5 by creating a .profile (you probably don't have one yet) in your home directory that contains:
In reviewing the attributes (filemime, filename, size, uri, timestamp, status, etc...) of $file (stdClass object) that is passed to hook_file_insert(), I am surprised that it is missing the attribute defining what is the expected Replace policy for Existing Files (providing one of these values: FILE_EXISTS_RENAME, FILE_EXISTS_REPLACE, or FILE_EXISTS_ERROR).