Wow, the schedule for the DrupalCon Sunnyvale is out, and it looks like I am in the Big Room, in the slot between Jeff Eaton and Steven Wittens. Boy, no pressure there. I guess the intersection between Drupal and Ajax is on a lot of peoples' minds right now.
I have been having some trouble figuring out the proper way in 4.7 to break my huge module up into submodules. I have a module that defines multiple node types, so I pulled each node type out into a seperate .inc file. Back in the 4.6 days, I just included them directly into the main module
Important Organic Groups tip: when you are upgrading from 4.7 to 5.x, be sure to disable og from the organic groups settings page, then turn off the og module, before you do your upgrade. Upgrade, then turn on og and upgrade it, then re-enable it. Otherwise all your groups might wind up empty of content.
Eclipse is a solid tool for creating Drupal modules, but I haven't figured out anyway to use it to create releases. Eclipse comes with a CVS plug in that allows you to checkout the contributions/modules, add your new module and commit it all, no problem. But when it comes time to branch your release(as described here: http://drupal.org/node/17570), simply trying to do: "cvs tag -b DRUPAL-5 modules/mymodule" seems to be impossible. Eclipse is not willing to branch with out also tagging the version you are branching from, and the Drupal contrib release system rejects these verison tags.
In response to my AHAH tutorial on groups.drupal.org, Moshe asked if that module could be used to make the poll module dynamic (http://groups.drupal.org/node/2747#comment-7670). I said "not exactly", but it go me thinking, and that lead me to create the beginnings of an ahah framework. To test it out, I just modified poll.module to use the framework. It went pretty quick. The hardest part was getting the form to by dynamic with full page refreshes (and most of that time was stripping out the multiple fields per form code from my example).
_*Update*: I stand by most of the information in this article, but I have learned a couple of things in the last two month. I now recommend against pulling information directly out of $_POST or using form_builder. My
Ahah Forms package
can make a lot of this easier. Please checkout
Secure Dynamic Forms and Subforms
, and the examples in the Ahah Forms package._
To create a form widget that consists of an unlimited number of subwidgets, expands without needed a full page refresh, and can be easily added multiple times into any Drupal form.
Use hook_element to define the element, hook_nodeapi to handle the db interactions, and jQuery-based
code to do the incremental page updates (
b/c there is not
involved, and people seem to think
isn’t sexy enough).
Update (since a lot of people still seem to be coming to this page): The latest version of
is 1.0.2, which works with Eclipse 3.3, and it is excellent. The Xdebug plugin is now part of the core package, and the instructions on how to use it are part of the standard help.
I decide to move into the word of real-time debugging today. I have been using the PHPEclipse plug in, but I could not find a 5.1.4 version of the debugger it uses. Fortunately, I was able to get the eclipse
(formally PhpIDE) working with XDebug.