• May you never come face to face with this: Site off-line screen This is the page Drupal will throw up if something is wrong with the database. The root cause of the problem is displayed at the bottom of the screen if "display_errors = On' is set in php.ini. But it's suggested in php.ini that this should be "Off" for production site. So you may not see what the cause of the problem is. There are a few things not so good with this page:
    1. The site name got changed to "Drupal", not your name.
    2. The site logo and favicon are the Drupal versions.
    3. Finally, the site is in the minnelli look
    The good news is this page is fully customizable and I'll show the ins-and-outs about this here.
  • It's not obvious from reading the api doc at http://api.drupal.org/api/function/hook_block/6 and http://api.drupal.org/api/function/block_example_block/6 how to do form validation for block configure form. The key is to realize they are form sub-elements that are part of a form defined by the block core module.
  • This Drupal 6 module does program code list syntax highlighting like this:

    class Person(ln : String, fn : String, s : Person)
    {
        def lastName = ln;
        def firstName = fn;
        def spouse = s;
        
        def this(ln : String, fn : String) = { this(ln, fn, null); }
    
        def introduction() : String = 
            return "Hi, my name is " + firstName + " " + lastName +
                (if (spouse != null) " and this is my spouse, " + spouse.firstName + " " + spouse.lastName + "." 
                 else ".");
    }
    

    It uses the Syntax Highlighter Javascript library to perform the highlighting on the client browser.

  • A couple problems I encountered creating a module that does action and trigger:

    1. when the module is disabled, the actions it defines should be disabled to prevent undefined function call in case you try to re-configure the actions. When the module is disabled, any actions that it has defines are still displayed with the "Configure" link available. If you click configure, of course you will get undefined function because the code is gone.
    2. when the module is uninstalled, I have a problem with deleting configurable action definition.

Navigation

User login