IBM Drupal Drop-in Clinic
| drupalI love this! I’m practically running an IBM Drupal drop-in clinic at 120 Bloor E, helping five developers on two projects become that much more productive. They’re all working with Drupal 6, but my experience with developing and debugging on Drupal 5 is still helpful, and I can navigate through Internet posts pretty quickly too. I get to help with the tough and interesting bits without needing to set up my environment or work on the boring bits. ;)
This is definitely worth the subway ride. I create more than CAD $4.50 of value and save people more than 60 minutes of time total. Besides, I usually get to sit down and write a blog post during the commute.
Some things from today:
- Want to protect files from being downloaded? Set your Drupal file system handling to Private, manage your view uploaded files permission, and don’t forget to add an .htaccess in your files directory with the following:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006Options None
Options +FollowSymLinks
- Use hook_form_alter to print out the form_id if you want to change where a form redirects. After you figure out the form_id, set the appropriate form’s #redirect property.
- var_dump may look different if you don’t have xdebug installed. Check the HTML source for your expected output.
Lots of other HTML- and Drupal-related things, too.
Good leverage on time and experience. =D I wonder how to get even better at this…
5 comments
Jamie
2009-08-25T22:54:28ZOne important thing to not forget is to install the devel module. DPR works great for printing out arrays when debugging. The theme developer is a life safe for figuring out what theme hook you need to latch into, and being able to clear the cache by a simple click in a block is a life safer - especially with the enhanced caching going on in Drupal 6.
Sacha Chua
2009-08-26T17:52:40ZI love the devel module. Also, for Drupal 6, you can set it to not cache your theme files while you're doing development. =) Thanks for sharing!
Arnel
2009-08-28T03:14:51ZUse hook_form_alter to print out the form_id if you want to change where a form redirects. After you figure out the form_id, set the appropriate form's #redirect property.
If you have a firebug in firefox then you don't need to print out the form id just inspect the form. look for the name="form_id".
ex.
input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form"
then the form_id of your form is search_theme_form
Sacha Chua
2009-08-28T14:01:34ZDrupal for Firebug is good for this too. =)
Adam DiCarlo
2009-10-03T21:01:22ZOnce you have the form ID you can use the Custom Destination module to set the form's redirect. But if there is a reason to use a short custom module instead, I'd like to hear it!