Recent comments

  • Drupalcon is dead. Long live Drupalcon?   4 years 2 weeks ago

    The drupalradar folks did a yeoman job of recording stuff at the conference, but in my opinion, they should stay behind the camera.

    As I've said to lots of folks directly after the closing session, I found their moderation embarrassing to the drupal community present, and to anyone watching remotely. They were transparently shilling for sponsors, standing up and talking about nothing, loudly putting in filler where we were just trying to listen to the people on stage, and generally turning to whole event into a slightly skewed reality TV show.

    The kitten killers, and the hardworking CPH team were the only redeeming features of a strained and disenchanting closing session. For the sake of the project, I sincerely hope that no one was watching the much hyped live feed. It has to be seen to be believe how bad it was, but if you weren't put through it, don't bother watching it.

    Hey, they were just trying to help, but I found it quite damaging to the community spirit of the conference. I saw several prominent developers stagger out of the session as though someone had just kicked their puppies.

    You can't keep stuff like this from happening from time to time except by having a intuitive sense for the community, but let's learn something from this one.

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

    I was trying out the Twitter_Pull project but this makes it a lot easier to customize. Thanks for the awesome post!

  • Trust   4 years 3 weeks ago

    I find myself in this predicament sometimes too Scott. There was a similar case where this guy with a very small dog goes around and asks a mere $2 to apparently get his dog home. That excuse didn't sell in my books, so I didn't trust him. Since then I've seen this guy six times around the city using the same excuse to try to 'con' people for money.

    I do think what you said really goes a long way. "It's better to put trust in people and risk losing out a bit financially rather than putting trust in no one and not losing a cent." But what do we trust? Whom do we trust? How do we know. I mean putting myself in the same shoes, suppose if I was stranded and no money and used the excuse: Can you help me, I am lost I need a way to get home that is all that I ask. I hope someone would help me. In turn shouldn't I do that for another if they ask me the same? Why is it that when it comes to "me" the rules are different than when it comes to another?

    The most interesting story was when I went downtown one night and walking along. A homeless asked me for some money. He looked as though he had been feeding himself on alcohol and drugs. For some odd reason I told him, buddy I am a homeless myself now. To this he replied, I am sorry to hear that my friend, take this quarter we all share what we have. This is the first time this has ever happen and to that I gave him all that I had in my wallet that night. Which was not much it was only $7 bucks or something like that but just for his honesty and caring he deserved it.

    Who to trust? Thats a good question... I guess trust is given until it is revoked by an act of dishonesty? Sure that works for me :)

    BTW I wouldn't have given him $50. Just the whole situation seems kind of shady to me.

  • An overview of site building in Wedful (Drupal install profiles, Aegir, and features)   4 years 3 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 3 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 4 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 5 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 5 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 7 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 7 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 8 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 8 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 8 weeks ago

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

  • Creating nodes in Drupal install profiles   4 years 8 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 8 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 8 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 9 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 10 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 10 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 10 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 12 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 12 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 12 weeks ago

    Sweet! You rock :)

  • A new blog RSS feed   4 years 12 weeks ago

    It is added now ...

  • A new blog RSS feed   4 years 12 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