Recent comments

  • An overview of site building in Wedful (Drupal install profiles, Aegir, and features)   4 years 13 weeks ago

    Thanks Sean! I actually plan on writing a full post on that stuff, as it was quite complex. However, the way to make custom sign-up forms has changed between alpha8 -> alpha9 and I need to redo my code. After I've done that I'll probably post a new entry on how :).

  • An overview of site building in Wedful (Drupal install profiles, Aegir, and features)   4 years 14 weeks ago

    Scott,

    First, let me say that I appreciate this post. Aegir is new enough that it can be hard to find articles that detail what others have done to use it in a practical way.

    Second, I am curious about the custom sign-up form. Could you elaborate on that a little bit? Please feel free to send me an email if you do not want to go into details in the comments.

    Thanks!

  • Creating Custom Triggers in Drupal   4 years 14 weeks ago

    I was just struggling with the "'No available actions for this trigger'" problem in Actions 5.2.x for Drupal 5 (which is a backport of D6 triggers & actions - don't ask me why I'm doing development on a D5 site, it's a long story) and I finally figured out one very important point that's mentioned but not stressed in the documentation for hook_hook_info: Namely, that if you're implementing a trigger for a custom hook in a custom module:

    * The outermost array key must be the name of your module.
    * The next key represents the name of the hook that triggers the events, but for custom and contributed modules, it actually must be the name of your module.

    What this means is that you must name your custom hook after your module... for example if your module's name is 'foo', then you'd create:

    /** Implementation of hook_foo(). */
    function foo_foo($op, $data) {
    ...
    }

    Once I switched to this convention, the actions pulldown appeared on my new tab as expected, no triggerunlock module required. I have not tried this in D6, but I expect it would work.

  • Creating nodes in Drupal install profiles   4 years 15 weeks ago
    Yup

    That's right, because my users are using a wysiwyg (ck) it was easiest to just give them Full HTML... plus it's their website, so if they want to mess it up with HTML that's their call ;-). I suppose later I could fine tune a filter so that it only allowed the markup the wysiwyg supports, but it's not that important for now.

  • Creating nodes in Drupal install profiles   4 years 15 weeks ago

    Very cool, Scott - but doesn't this mean that your users need to have a certain role so they can edit the node, since the input format is "Full HTML"? Otherwise they'll get an "access denied"...or are you allowing your users the ability to use the Full HTML input format?

  • Trust   4 years 17 weeks ago

    You're lucky when you have someone whose judgment you can trust enough when you're doubting your own. And you're right about the financial risks - unless you've got a lot of spare cash your lack of funds will prevent you from losing too much. One guy gave me such a good story I gave him the $10 just for his dramatic performance. He undoubtedly needed the money for something, just probably not the story he gave me. (Car accident, wife in hospital, needed bus money, etc)

  • 6 tips for auditing Drupal contrib modules   4 years 17 weeks ago

    Documentation is a big one for me... vague or shoddy documentation is indicative of cut corners elsewhere.

    Van Halen has a section in their tour rider that requires a bowl of jelly beans in their dressing room, with the black ones picked out.

    Nobody in Van Halen even eats the jelly beans... that item is in the rider so that, if the jelly beans are presented properly, the tour manager knows that other, more important items have most likely been dealt with as well.

  • 6 tips for auditing Drupal contrib modules   4 years 18 weeks ago

    Thanks for the comments!

    Who the maintainer is is definitely very important, but not something that's overly useful for people who aren't active in the Drupal community. Also, quite often even good maintainers will give focus to some of their modules but leave others to gather dust. So it's not reliable all the time.

  • 6 tips for auditing Drupal contrib modules   4 years 18 weeks ago
    ...

    I'm not a coder, so peeking at the code doesn't do anything for me.

    If it's something 'light' that I can do in my theme's template.php, I'll do that.

    I do look at the maintainers of the project - if the maintainer is relatively new, with few contributions, I may just pass on it.

    But as Sun commented, the maintainer is a big factor. (Of course, if you don't give new contributors that chance, you may not see what they're capable of.)

  • Hooking into Drush and Aegir   4 years 18 weeks ago

    Cool! I think I could use that s3 code myself :)

  • Creating nodes in Drupal install profiles   4 years 18 weeks ago

    Thanks Steven that's a good call. I haven't used node_export myself but it seems like a good way to go about this. I can't imagine it would be too hard to get it to run an import in an install profile either.

  • Hooking into Drush and Aegir   4 years 18 weeks ago

    Many, many thanks for this, we just added mirroring backups to s3 with the following code in a cm_functions.drush.inc file:


    function drush_cm_functions_post_provision_backup($url = NULL) {
    $backup_file = drush_get_option('backup_file');
    // Make sure a backup happened:
    if (is_file($backup_file)) {
    // Upload the file to the correct place in S3:
    $parts = array('cm-server-backups');
    $filename = basename($backup_file);
    list($site_name, $rest) = explode('-', $filename, 2);
    list($date, $time, $rest) = explode('.', $rest, 3);
    $year = substr($date, 0, 4);
    $month = substr($date, 4, 2);
    $day = substr($date, 6, 2);

    $parts[] = $site_name;
    $parts[] = "$year-$month";
    $parts[] = $day;
    $parts[] = $filename;

    $command = 's3cmd put %s s3://%s';

    $result = provision_shell_exec($command, $backup_file, implode('/', $parts));

    if (!$result && !drush_get_option('force', false)) {
    drush_set_error('PROVISION_BACKUP_FAILED', dt("Could not backup the file to S3"));
    }

    }
    else {
    drush_log(dt("Could not backup the file to S3 because I couldn't find: !backup_file", array('!backup_file' => $backup_file)), 'backup');
    }

    }

  • Creating nodes in Drupal install profiles   4 years 18 weeks ago

    The node export module (http://drupal.org/project/node_export) and install profile API can work well together to export nodes, it does CCK taxonomy etc too. Mostly, it just makes exporting a lot easier.

  • 6 tips for auditing Drupal contrib modules   4 years 19 weeks ago

    My über-factor is missing:

    Tell me author(s) and/or maintainer(s) of a project, and I tell you what to expect.

    .

    Nice theme! :)

  • Enabling multiple themes in Aegir install profiles   4 years 20 weeks ago

    I guess I think that you SHOULD be able to enable more than one theme in your install profile -- hence, bug. If it's fixed in D7, great.

  • Enabling multiple themes in Aegir install profiles   4 years 20 weeks ago

    I don't believe this is a bug, but actually a feature ;). I also don't think this is an issue in D7. I guess in an ideal world system_theme_data() would have a reset parameter.

    There are some related issues I found with this search.

  • Enabling multiple themes in Aegir install profiles   4 years 20 weeks ago

    This is obviously a bug in core. Can you file an item in the issue queue at least as a placeholder and link to it from this post?

  • Static variables and Drupal install profiles   4 years 22 weeks ago

    hook_update suffers a similar issue but in two ways.

    Update is run in a batch (as I though install was) and if you statically cache something and the batch iterates on (eg it took a long time and had to "tick" to update the screen) then it's essentially a new request and I had a LOT of trouble with static variables getting reset when I didn't expect them to.

    The other issue I had was basically the same as above - a function which statically cached with no way of overriding. My solution (during update) was to test if that function returned an expected value, if not, variable_set a semaphore and fail that update. This would cause me to have to run update.php twice, but the second time the function's static cache would be cleared and would return the expected results (and thus the sempahore could be reset).

  • Static variables and Drupal install profiles   4 years 22 weeks ago

    Or should that be an anti-pattern.

    Copying a function and then undoing the parts that are going to fuck you is nearly the only way to accomplish some things.

    It can sometimes get out of hand though, if one of the functions you need to call makes use of this function waaaay down the tree, and you end up having to micro-fork all the functions down. (see anything relating to themes).

  • A new blog RSS feed   4 years 22 weeks ago

    Sweet! You rock :)

  • A new blog RSS feed   4 years 22 weeks ago

    It is added now ...

  • A new blog RSS feed   4 years 22 weeks ago

    Thanks Khalid :) I actually do have a planet tag. Just waiting for someone to have time to look at this request http://drupal.org/node/826198

  • A new blog RSS feed   4 years 22 weeks ago

    Why not have a tag specially for the Drupal Planet? Seems a lot of posts would be interesting to many Drupal developers.

    Do it!

  • Adding a simple twitter feed to your Drupal site   4 years 24 weeks ago

    whoops :) bunk permissions on the upload viewing. Yeah, I thought about doing this as a feature with a bit more options. And I don't think it would take a much work to make the aggregator module exportable either, not a lot of settings there (but that would be for another day). In the end pretty much all the work was in the view, so it seemed to be simplest just to post that.

  • Adding a simple twitter feed to your Drupal site   4 years 24 weeks ago

    No attachment? Oh, and also, turning this into a Feature instead and sticking it on Github would be cool. Although, not sure if the aggregator module is exportable (I don't think it is).