Skip to content

Instantly share code, notes, and snippets.

View stemount's full-sized avatar
📺
As seen on TV

Stephen Mount stemount

📺
As seen on TV
View GitHub Profile
@stemount
stemount / Default (OSX).sublime-keymap
Created July 26, 2013 16:33
Drupal Sublime Text 2 Settings
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }
Current User Status Module
Create a Drupal module in either Drupal 6 or 7 to fulfil the following criteria.
1. We wish to display a simple status on a User's profile page. For example "John Appleseed is currently [STATUS]" or "John Appleseed is currently not [STATUS]". [STATUS] could be replaced by something like "in the office" or "listening to music". This setting should be an on/off toggle switch.
2. The status will need to be a configurable value from its own settings page. Once the status value is set for the site, it should not need to be changed. This could take the form of a drop down menu or radio buttons with pre-configured values or a text box with one value.
3. There should be access restrictions in place to control who is allowed to change this setting.
4. The User Profile page also needs a restriction in place to who can alter the user's status.
5. The complete history of a user's status should be stored in its own database table along with a time reference.
6. A block should be available to
#!/bin/bash
# Download Drush v3 from D.O and make it work on `drush` (OS X / Linux / *nix)
# Written by stemount, adapted by KarenS
# Last updated by Drupalise IT (http://drupalise.it) on 13 Sep 2010
# Update user
echo "Drush is now downloading via HTTP"
# move to home dir