Recent comments

  • Creating nodes in Drupal install profiles   3 years 36 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   3 years 36 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   3 years 38 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   3 years 38 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   3 years 39 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   3 years 39 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   3 years 39 weeks ago

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

  • Creating nodes in Drupal install profiles   3 years 39 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   3 years 39 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   3 years 39 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   3 years 40 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   3 years 41 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   3 years 41 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   3 years 41 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   3 years 43 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   3 years 43 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   3 years 43 weeks ago

    Sweet! You rock :)

  • A new blog RSS feed   3 years 43 weeks ago

    It is added now ...

  • A new blog RSS feed   3 years 43 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   3 years 43 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   3 years 45 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   3 years 45 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).

  • Adding a simple twitter feed to your Drupal site   3 years 45 weeks ago

    Thanks Boris, I hadn't seen that one. I also updated your link with the _ instead of the -

  • Adding a simple twitter feed to your Drupal site   3 years 45 weeks ago

    There is also http://drupal.org/project/twitter_pull, which is mainly convenience functions in PHP.

  • My favorite cape town wineries   3 years 46 weeks ago

    When I've looked I've not at all been impressed with the selection of South African wines in Canada. I've even found that some of the SA wines in BC you can buy don't even exist in South Africa, which is pretty odd (export only I guess). I think BC has a pretty decent selection of Australian and South American wines though, yeah.

    South Africa /does/ have their own port actually. It's referred to as Cape Port (I think the term Port can only properly refer to fortified wines from Portugal). The port here is IMHO as good as any I've had too. Though I've never had a really expensive port before either.